public class ReliableIdGeneratorProxy extends AbstractDistributedObject<ReliableIdGeneratorService> implements ReliableIdGenerator
| Modifier and Type | Field and Description |
|---|---|
static int |
BITS_NODE_ID |
static int |
BITS_SEQUENCE |
static int |
BITS_TIMESTAMP |
static long |
INCREMENT |
PARTITIONING_STRATEGY| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the unique name for this DistributedObject.
|
String |
getServiceName()
Returns the service name for this object.
|
long |
newId()
Generates and returns a cluster-wide unique ID.
|
IdBatch |
newIdBatch(int batchSize) |
destroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, postDestroy, preDestroy, throwNotActiveException, toData, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getPartitionKeypublic static final int BITS_TIMESTAMP
public static final int BITS_SEQUENCE
public static final int BITS_NODE_ID
public static final long INCREMENT
public long newId()
ReliableIdGeneratorThe call is typically local on member. A batch of IDs is pre-fetched and then used for preconfigured time locally.
Note: Values returned from this method may be not strictly ordered.
newId in interface ReliableIdGeneratorpublic IdBatch newIdBatch(int batchSize)
public 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<ReliableIdGeneratorService>Copyright © 2018. All Rights Reserved.