Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
state(DISCONNECTED),
monclient(cct_),
messenger(NULL),
+ instance_id(0),
objecter(NULL),
lock("librados::RadosClient::lock"),
timer(cct, lock),
finisher.start();
state = CONNECTED;
+ instance_id = monclient.get_global_id();
lock.Unlock();
objecter->shutdown_locked();
}
state = DISCONNECTED;
+ instance_id = 0;
timer.shutdown(); // will drop+retake lock
lock.Unlock();
monclient.shutdown();
uint64_t librados::RadosClient::get_instance_id()
{
- Mutex::Locker l(lock);
- if (state == DISCONNECTED)
- return 0;
- uint64_t id = monclient.get_global_id();
- return id;
+ return instance_id;
}
librados::RadosClient::~RadosClient()
MonClient monclient;
SimpleMessenger *messenger;
+ uint64_t instance_id;
+
bool _dispatch(Message *m);
bool ms_dispatch(Message *m);