Hazelcast C++ Client
|
Cluster-wide unique id generator. More...
#include <IdGenerator.h>
Public Types | |
enum | { BLOCK_SIZE = 1000 } |
Public Member Functions | |
bool | init (long id) |
Try to initialize this IdGenerator instance with given id. More... | |
long | newId () |
Generates and returns cluster-wide unique id. More... | |
Friends | |
class | impl::HazelcastClientInstanceImpl |
Cluster-wide unique id generator.
bool hazelcast::client::IdGenerator::init | ( | long | id | ) |
Try to initialize this IdGenerator instance with given id.
long hazelcast::client::IdGenerator::newId | ( | ) |
Generates and returns cluster-wide unique id.
Generated ids are guaranteed to be unique for the entire cluster as long as the cluster is live. If the cluster restarts then id generation will start from 0.