Package org.onosproject.store.service
Class Synchronous<T extends DistributedPrimitive>
- java.lang.Object
-
- org.onosproject.store.service.Synchronous<T>
-
- Type Parameters:
T
- type of DistributedPrimitive
- All Implemented Interfaces:
DistributedPrimitive
- Direct Known Subclasses:
DefaultAtomicCounter
,DefaultAtomicCounterMap
,DefaultAtomicIdGenerator
,DefaultAtomicValue
,DefaultConsistentMap
,DefaultConsistentMultimap
,DefaultConsistentTreeMap
,DefaultDistributedLock
,DefaultDistributedSet
,DefaultDocumentTree
,DefaultLeaderElector
public abstract class Synchronous<T extends DistributedPrimitive> extends java.lang.Object implements DistributedPrimitive
DistributedPrimitive that is a synchronous (blocking) version of another.
-
-
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 Synchronous(T primitive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>
destroy()
Purges state associated with this primitive.java.lang.String
name()
Returns the name of this primitive.DistributedPrimitive.Type
primitiveType()
Returns the type of primitive.-
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.DistributedPrimitive
addStatusChangeListener, applicationId, removeStatusChangeListener, statusChangeListeners
-
-
-
-
Constructor Detail
-
Synchronous
public Synchronous(T primitive)
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:DistributedPrimitive
Returns the name of this primitive.- Specified by:
name
in interfaceDistributedPrimitive
- Returns:
- name
-
primitiveType
public DistributedPrimitive.Type primitiveType()
Description copied from interface:DistributedPrimitive
Returns the type of primitive.- Specified by:
primitiveType
in interfaceDistributedPrimitive
- Returns:
- primitive type
-
destroy
public java.util.concurrent.CompletableFuture<java.lang.Void> destroy()
Description copied from interface:DistributedPrimitive
Purges state associated with this primitive.Implementations can override and provide appropriate clean up logic for purging any state state associated with the primitive. Whether modifications made within the destroy method have local or global visibility is left unspecified.
- Specified by:
destroy
in interfaceDistributedPrimitive
- Returns:
CompletableFuture
that is completed when the operation completes
-
-