Package org.onosproject.store.primitives
Class DefaultAtomicIdGenerator
- java.lang.Object
-
- org.onosproject.store.service.Synchronous<AsyncAtomicIdGenerator>
-
- org.onosproject.store.primitives.DefaultAtomicIdGenerator
-
- All Implemented Interfaces:
AtomicIdGenerator
,DistributedPrimitive
public class DefaultAtomicIdGenerator extends Synchronous<AsyncAtomicIdGenerator> implements AtomicIdGenerator
Default implementation for aAtomicIdGenerator
backed by aAsyncAtomicIdGenerator
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.onosproject.store.service.DistributedPrimitive
DistributedPrimitive.Status, DistributedPrimitive.Type
-
-
Field Summary
-
Fields inherited from interface org.onosproject.store.service.DistributedPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS
-
-
Constructor Summary
Constructors Constructor Description DefaultAtomicIdGenerator(AsyncAtomicIdGenerator asyncIdGenerator, long operationTimeoutMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
nextId()
Gets the next globally unique numeric identifier.-
Methods inherited from class org.onosproject.store.service.Synchronous
destroy, name, primitiveType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.store.service.AtomicIdGenerator
primitiveType
-
Methods inherited from interface org.onosproject.store.service.DistributedPrimitive
addStatusChangeListener, applicationId, destroy, name, removeStatusChangeListener, statusChangeListeners
-
-
-
-
Constructor Detail
-
DefaultAtomicIdGenerator
public DefaultAtomicIdGenerator(AsyncAtomicIdGenerator asyncIdGenerator, long operationTimeoutMillis)
-
-
Method Detail
-
nextId
public long nextId()
Description copied from interface:AtomicIdGenerator
Gets the next globally unique numeric identifier.- Specified by:
nextId
in interfaceAtomicIdGenerator
- Returns:
- the next globally unique numeric identifier
-
-