public class IdGeneratorProxy extends AbstractDistributedObject<IdGeneratorService> implements IdGenerator
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)
Tries to initialize this  
IdGenerator instance with the given ID. | 
long | 
newId()
Generates and returns a cluster-wide unique ID. 
 | 
protected void | 
postDestroy()  | 
destroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, preDestroy, throwNotActiveException, toData, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getPartitionKeypublic IdGeneratorProxy(IAtomicLong blockGenerator, String name, NodeEngine nodeEngine, IdGeneratorService service)
public boolean init(long id)
IdGeneratorIdGenerator instance with the given ID.
 The next generated ID will be 1 greater than the supplied ID.
init in interface IdGeneratortrue if initialization succeeded, false otherwise.public long newId()
IdGeneratornewId in interface IdGeneratorpublic String getName()
DistributedObjectDistributedObjectUtil.getName(DistributedObject)
 because this might be also a PrefixedDistributedObject.getName in interface DistributedObjectpublic String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectgetServiceName in class AbstractDistributedObject<IdGeneratorService>protected void postDestroy()
postDestroy in class AbstractDistributedObject<IdGeneratorService>Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.