public interface AsyncAtomicIdGenerator extends DistributedPrimitive
DistributedPrimitive.Status, DistributedPrimitive.Type
DEFAULT_OPERATION_TIMEOUT_MILLIS, DEFAULT_OPERTATION_TIMEOUT_MILLIS
Modifier and Type | Method and Description |
---|---|
default AtomicIdGenerator |
asAtomicIdGenerator()
Returns a new
AtomicIdGenerator that is backed by this instance and with a default operation timeout. |
default AtomicIdGenerator |
asAtomicIdGenerator(long timeoutMillis)
Returns a new
AtomicIdGenerator that is backed by this instance. |
java.util.concurrent.CompletableFuture<java.lang.Long> |
nextId()
Returns the next globally unique numeric ID.
|
default DistributedPrimitive.Type |
primitiveType()
Returns the type of primitive.
|
addStatusChangeListener, applicationId, destroy, name, removeStatusChangeListener, statusChangeListeners
default DistributedPrimitive.Type primitiveType()
DistributedPrimitive
primitiveType
in interface DistributedPrimitive
java.util.concurrent.CompletableFuture<java.lang.Long> nextId()
default AtomicIdGenerator asAtomicIdGenerator(long timeoutMillis)
AtomicIdGenerator
that is backed by this instance.timeoutMillis
- timeout duration for the returned ConsistentMap operationsAtomicIdGenerator
instancedefault AtomicIdGenerator asAtomicIdGenerator()
AtomicIdGenerator
that is backed by this instance and with a default operation timeout.AtomicIdGenerator
instance