public class IdGeneratorProxy extends AbstractDistributedObject<IdGeneratorService> implements IdGenerator
Modifier and Type | Field and Description |
---|---|
static int |
BLOCK_SIZE |
PARTITIONING_STRATEGY
Constructor and Description |
---|
IdGeneratorProxy(IAtomicLong blockGenerator,
String name,
NodeEngine nodeEngine,
IdGeneratorService service) |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the unique name for this DistributedObject.
|
String |
getServiceName()
Returns the service name for this object.
|
boolean |
init(long id)
Try to initialize this IdGenerator instance with the given id.
|
long |
newId()
Generates and returns a cluster-wide unique id.
|
protected void |
postDestroy() |
destroy, equals, getId, getNameAsPartitionAwareData, getNodeEngine, getPartitionKey, getService, hashCode, invalidate, throwNotActiveException, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
destroy, getId, getPartitionKey
public static final int BLOCK_SIZE
public IdGeneratorProxy(IAtomicLong blockGenerator, String name, NodeEngine nodeEngine, IdGeneratorService service)
public boolean init(long id)
IdGenerator
init
in interface IdGenerator
public long newId()
IdGenerator
newId
in interface IdGenerator
public String getName()
DistributedObject
getName
in interface DistributedObject
public String getServiceName()
DistributedObject
getServiceName
in interface DistributedObject
getServiceName
in class AbstractDistributedObject<IdGeneratorService>
protected void postDestroy()
postDestroy
in class AbstractDistributedObject<IdGeneratorService>
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.