Package org.onosproject.store.service
Interface StorageService
-
- All Superinterfaces:
PrimitiveService
public interface StorageService extends PrimitiveService
Storage service.This service provides builders for various distributed primitives.
It is expected that services and applications will leverage the primitives indirectly provided by this service for their distributed state management and coordination.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AtomicCounterBuilder
atomicCounterBuilder()
Creates a new AtomicCounterBuilder.<K> AtomicCounterMapBuilder<K>
atomicCounterMapBuilder()
Creates a newAtomicCounterMapBuilder
.AtomicIdGeneratorBuilder
atomicIdGeneratorBuilder()
Creates a new AtomicIdGeneratorBuilder.<V> AtomicValueBuilder<V>
atomicValueBuilder()
Creates a new AtomicValueBuilder.<K,V>
ConsistentMapBuilder<K,V>consistentMapBuilder()
Creates a new ConsistentMapBuilder.<K,V>
ConsistentMultimapBuilder<K,V>consistentMultimapBuilder()
Creates a newAsyncConsistentSetMultimapBuilder
.<V> ConsistentTreeMapBuilder<V>
consistentTreeMapBuilder()
Creates a newAsyncConsistentTreeMapBuilder
.<V> DocumentTreeBuilder<V>
documentTreeBuilder()
Creates a new ConsistentMapBuilder.<K,V>
EventuallyConsistentMapBuilder<K,V>eventuallyConsistentMapBuilder()
Creates a new EventuallyConsistentMapBuilder.default AsyncAtomicCounter
getAsyncAtomicCounter(java.lang.String name)
Returns an instance ofAsyncAtomicCounter
with specified name.default AsyncAtomicIdGenerator
getAsyncAtomicIdGenerator(java.lang.String name)
Returns an instance ofAsyncAtomicIdGenerator
with specified name.<K,V>
AsyncConsistentMultimap<K,V>getAsyncSetMultimap(java.lang.String name, Serializer serializer)
Returns a set backed instance ofAsyncConsistentMultimap
with the specified name.<V> AsyncConsistentTreeMap<V>
getAsyncTreeMap(java.lang.String name, Serializer serializer)
Returns an instance ofAsyncConsistentTreeMap
with the specified name.default AtomicCounter
getAtomicCounter(java.lang.String name)
Returns an instance ofAtomicCounter
with specified name.default AtomicIdGenerator
getAtomicIdGenerator(java.lang.String name)
Returns an instance ofAtomicIdGenerator
with specified name.<V> AsyncDocumentTree<V>
getDocumentTree(java.lang.String name, Serializer serializer)
Returns an instance ofAsyncDocumentTree
with specified name.<T> Topic<T>
getTopic(java.lang.String name, Serializer serializer)
Returns an instance ofTopic
with specified name.<E> WorkQueue<E>
getWorkQueue(java.lang.String name, Serializer serializer)
Returns an instance ofWorkQueue
with specified name.LeaderElectorBuilder
leaderElectorBuilder()
Creates a new LeaderElectorBuilder.DistributedLockBuilder
lockBuilder()
Creates a new DistributedLockBuilder.<E> DistributedSetBuilder<E>
setBuilder()
Creates a new DistributedSetBuilder.<T> TopicBuilder<T>
topicBuilder()
Creates a new TopicBuilder.TransactionContextBuilder
transactionContextBuilder()
Creates a new transaction context builder.-
Methods inherited from interface org.onosproject.store.service.PrimitiveService
workQueueBuilder
-
-
-
-
Method Detail
-
eventuallyConsistentMapBuilder
<K,V> EventuallyConsistentMapBuilder<K,V> eventuallyConsistentMapBuilder()
Creates a new EventuallyConsistentMapBuilder.- Specified by:
eventuallyConsistentMapBuilder
in interfacePrimitiveService
- Type Parameters:
K
- key typeV
- value type- Returns:
- builder for an eventually consistent map
-
consistentMapBuilder
<K,V> ConsistentMapBuilder<K,V> consistentMapBuilder()
Creates a new ConsistentMapBuilder.- Specified by:
consistentMapBuilder
in interfacePrimitiveService
- Type Parameters:
K
- key typeV
- value type- Returns:
- builder for a consistent map
-
documentTreeBuilder
<V> DocumentTreeBuilder<V> documentTreeBuilder()
Creates a new ConsistentMapBuilder.- Specified by:
documentTreeBuilder
in interfacePrimitiveService
- Type Parameters:
V
- value type- Returns:
- builder for a consistent map
-
consistentTreeMapBuilder
<V> ConsistentTreeMapBuilder<V> consistentTreeMapBuilder()
Creates a newAsyncConsistentTreeMapBuilder
.- Specified by:
consistentTreeMapBuilder
in interfacePrimitiveService
- Type Parameters:
V
- value type- Returns:
- builder for a async consistent tree map
-
consistentMultimapBuilder
<K,V> ConsistentMultimapBuilder<K,V> consistentMultimapBuilder()
Creates a newAsyncConsistentSetMultimapBuilder
.- Specified by:
consistentMultimapBuilder
in interfacePrimitiveService
- Type Parameters:
K
- key typeV
- value type- Returns:
- builder for a set based async consistent multimap
-
atomicCounterMapBuilder
<K> AtomicCounterMapBuilder<K> atomicCounterMapBuilder()
Creates a newAtomicCounterMapBuilder
.- Specified by:
atomicCounterMapBuilder
in interfacePrimitiveService
- Type Parameters:
K
- key type- Returns:
- builder for an atomic counter map
-
setBuilder
<E> DistributedSetBuilder<E> setBuilder()
Creates a new DistributedSetBuilder.- Specified by:
setBuilder
in interfacePrimitiveService
- Type Parameters:
E
- set element type- Returns:
- builder for an distributed set
-
atomicCounterBuilder
AtomicCounterBuilder atomicCounterBuilder()
Creates a new AtomicCounterBuilder.- Specified by:
atomicCounterBuilder
in interfacePrimitiveService
- Returns:
- atomic counter builder
-
atomicIdGeneratorBuilder
AtomicIdGeneratorBuilder atomicIdGeneratorBuilder()
Creates a new AtomicIdGeneratorBuilder.- Specified by:
atomicIdGeneratorBuilder
in interfacePrimitiveService
- Returns:
- atomic ID generator builder
-
atomicValueBuilder
<V> AtomicValueBuilder<V> atomicValueBuilder()
Creates a new AtomicValueBuilder.- Specified by:
atomicValueBuilder
in interfacePrimitiveService
- Type Parameters:
V
- atomic value type- Returns:
- atomic value builder
-
lockBuilder
DistributedLockBuilder lockBuilder()
Creates a new DistributedLockBuilder.- Returns:
- lock builder
-
leaderElectorBuilder
LeaderElectorBuilder leaderElectorBuilder()
Creates a new LeaderElectorBuilder.- Specified by:
leaderElectorBuilder
in interfacePrimitiveService
- Returns:
- leader elector builder
-
topicBuilder
<T> TopicBuilder<T> topicBuilder()
Creates a new TopicBuilder.- Specified by:
topicBuilder
in interfacePrimitiveService
- Type Parameters:
T
- topic value type- Returns:
- topic builder
-
transactionContextBuilder
TransactionContextBuilder transactionContextBuilder()
Creates a new transaction context builder.- Specified by:
transactionContextBuilder
in interfacePrimitiveService
- Returns:
- a builder for a transaction context.
-
getAsyncAtomicCounter
default AsyncAtomicCounter getAsyncAtomicCounter(java.lang.String name)
Returns an instance ofAsyncAtomicCounter
with specified name.- Specified by:
getAsyncAtomicCounter
in interfacePrimitiveService
- Parameters:
name
- counter name- Returns:
- AsyncAtomicCounter instance
-
getAsyncAtomicIdGenerator
default AsyncAtomicIdGenerator getAsyncAtomicIdGenerator(java.lang.String name)
Returns an instance ofAsyncAtomicIdGenerator
with specified name.- Specified by:
getAsyncAtomicIdGenerator
in interfacePrimitiveService
- Parameters:
name
- ID generator name- Returns:
- AsyncAtomicIdGenerator instance
-
getAtomicCounter
default AtomicCounter getAtomicCounter(java.lang.String name)
Returns an instance ofAtomicCounter
with specified name.- Specified by:
getAtomicCounter
in interfacePrimitiveService
- Parameters:
name
- counter name- Returns:
- AtomicCounter instance
-
getAtomicIdGenerator
default AtomicIdGenerator getAtomicIdGenerator(java.lang.String name)
Returns an instance ofAtomicIdGenerator
with specified name.- Specified by:
getAtomicIdGenerator
in interfacePrimitiveService
- Parameters:
name
- ID generator name- Returns:
- AtomicIdGenerator instance
-
getWorkQueue
<E> WorkQueue<E> getWorkQueue(java.lang.String name, Serializer serializer)
Returns an instance ofWorkQueue
with specified name.- Specified by:
getWorkQueue
in interfacePrimitiveService
- Type Parameters:
E
- work element type- Parameters:
name
- work queue nameserializer
- serializer- Returns:
- WorkQueue instance
-
getDocumentTree
<V> AsyncDocumentTree<V> getDocumentTree(java.lang.String name, Serializer serializer)
Returns an instance ofAsyncDocumentTree
with specified name.- Specified by:
getDocumentTree
in interfacePrimitiveService
- Type Parameters:
V
- tree node value type- Parameters:
name
- document tree nameserializer
- serializer- Returns:
- AsyncDocumentTree instance
-
getAsyncSetMultimap
<K,V> AsyncConsistentMultimap<K,V> getAsyncSetMultimap(java.lang.String name, Serializer serializer)
Returns a set backed instance ofAsyncConsistentMultimap
with the specified name.- Specified by:
getAsyncSetMultimap
in interfacePrimitiveService
- Type Parameters:
K
- key typeV
- value type- Parameters:
name
- the multimap nameserializer
- serializer- Returns:
- set backed
AsyncConsistentMultimap
instance
-
getAsyncTreeMap
<V> AsyncConsistentTreeMap<V> getAsyncTreeMap(java.lang.String name, Serializer serializer)
Returns an instance ofAsyncConsistentTreeMap
with the specified name.- Specified by:
getAsyncTreeMap
in interfacePrimitiveService
- Type Parameters:
V
- value type- Parameters:
name
- the treemap nameserializer
- serializer- Returns:
- set backed
AsyncConsistentTreeMap
instance
-
getTopic
<T> Topic<T> getTopic(java.lang.String name, Serializer serializer)
Returns an instance ofTopic
with specified name.- Specified by:
getTopic
in interfacePrimitiveService
- Type Parameters:
T
- topic message type- Parameters:
name
- topic nameserializer
- serializer- Returns:
- Topic instance
-
-