Revision d5d6cb96 include/FedReplicaManager.h

View differences:

include/FedReplicaManager.h
147 147
    };
148 148

  
149 149
    /**
150
     *  Return the last index of the fed log
150
     *  @return the last index of the fed log (from DB to use this method in
151
     *  HA followers)
151 152
     */
152
    int get_last_index() const
153
    unsigned int get_last_index() const
153 154
    {
154
        return last_index;
155
        unsigned int li;
156

  
157
        get_last_index(li);
158

  
159
        return li;
155 160
    }
156 161

  
157 162
private:
......
193 198
    // -------------------------------------------------------------------------
194 199
    struct ZoneServers
195 200
    {
196
        ZoneServers(int z, unsigned int l, const std::map<int,std::string>& s):
197
            zone_id(z), servers(s), next(l){};
201
        ZoneServers(int z, unsigned int l, const std::string& s):
202
            zone_id(z), endpoint(s), next(l){};
198 203

  
199 204
        ~ZoneServers(){};
200 205

  
201 206
        int zone_id;
202 207

  
203
        std::map<int, std::string> servers;
208
        std::string  endpoint;
204 209

  
205 210
        unsigned int next;
206 211
    };
......
260 265
     *    @param index
261 266
     *    @return 0 on success
262 267
     */
263
    int get_last_index(unsigned int& index);
268
    int get_last_index(unsigned int& index) const;
264 269

  
265 270
    /**
266 271
     *  Get the nest record to replicate in a zone
......
270 275
     *    @return 0 on success, -1 otherwise
271 276
     */
272 277
    int get_next_record(int zone_id, int& index, std::string& sql,
273
        std::map<int, std::string>& zservers);
278
        std::string& zservers);
274 279
};
275 280

  
276 281
#endif /*FED_REPLICA_MANAGER_H_*/

Also available in: Unified diff