Package org.onosproject.store.service
Interface PrimitiveService
-
- All Known Subinterfaces:
CoordinationService
,StorageService
public interface PrimitiveService
Primitive 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(String name)
Returns an instance ofAsyncAtomicCounter
with specified name.default AsyncAtomicIdGenerator
getAsyncAtomicIdGenerator(String name)
Returns an instance ofAsyncAtomicIdGenerator
with specified name.<K,V>
AsyncConsistentMultimap<K,V>getAsyncSetMultimap(String name, Serializer serializer)
Returns a set backed instance ofAsyncConsistentMultimap
with the specified name.<V> AsyncConsistentTreeMap<V>
getAsyncTreeMap(String name, Serializer serializer)
Returns an instance ofAsyncConsistentTreeMap
with the specified name.default AtomicCounter
getAtomicCounter(String name)
Returns an instance ofAtomicCounter
with specified name.default AtomicIdGenerator
getAtomicIdGenerator(String name)
Returns an instance ofAtomicIdGenerator
with specified name.<V> AsyncDocumentTree<V>
getDocumentTree(String name, Serializer serializer)
Returns an instance ofAsyncDocumentTree
with specified name.<T> Topic<T>
getTopic(String name, Serializer serializer)
Returns an instance ofTopic
with specified name.<E> WorkQueue<E>
getWorkQueue(String name, Serializer serializer)
Returns an instance ofWorkQueue
with specified name.LeaderElectorBuilder
leaderElectorBuilder()
Creates a new LeaderElectorBuilder.<E> DistributedSetBuilder<E>
setBuilder()
Creates a new DistributedSetBuilder.<T> TopicBuilder<T>
topicBuilder()
Creates a new TopicBuilder.TransactionContextBuilder
transactionContextBuilder()
Creates a new transaction context builder.<E> WorkQueueBuilder<E>
workQueueBuilder()
Creates a new WorkQueueBuilder.
-
-
-
Method Detail
-
eventuallyConsistentMapBuilder
<K,V> EventuallyConsistentMapBuilder<K,V> eventuallyConsistentMapBuilder()
Creates a new EventuallyConsistentMapBuilder.- 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.- Type Parameters:
K
- key typeV
- value type- Returns:
- builder for a consistent map
-
documentTreeBuilder
<V> DocumentTreeBuilder<V> documentTreeBuilder()
Creates a new ConsistentMapBuilder.- Type Parameters:
V
- value type- Returns:
- builder for a document tree
-
consistentTreeMapBuilder
<V> ConsistentTreeMapBuilder<V> consistentTreeMapBuilder()
Creates a newAsyncConsistentTreeMapBuilder
.- Type Parameters:
V
- value type- Returns:
- builder for a consistent tree map
-
consistentMultimapBuilder
<K,V> ConsistentMultimapBuilder<K,V> consistentMultimapBuilder()
Creates a newAsyncConsistentSetMultimapBuilder
.- Type Parameters:
K
- key typeV
- value type- Returns:
- builder for a set based consistent multimap
-
atomicCounterMapBuilder
<K> AtomicCounterMapBuilder<K> atomicCounterMapBuilder()
Creates a newAtomicCounterMapBuilder
.- Type Parameters:
K
- key type- Returns:
- builder for an atomic counter map
-
setBuilder
<E> DistributedSetBuilder<E> setBuilder()
Creates a new DistributedSetBuilder.- Type Parameters:
E
- set element type- Returns:
- builder for a distributed set
-
atomicCounterBuilder
AtomicCounterBuilder atomicCounterBuilder()
Creates a new AtomicCounterBuilder.- Returns:
- atomic counter builder
-
atomicIdGeneratorBuilder
AtomicIdGeneratorBuilder atomicIdGeneratorBuilder()
Creates a new AtomicIdGeneratorBuilder.- Returns:
- atomic ID generator builder
-
atomicValueBuilder
<V> AtomicValueBuilder<V> atomicValueBuilder()
Creates a new AtomicValueBuilder.- Type Parameters:
V
- atomic value type- Returns:
- atomic value builder
-
leaderElectorBuilder
LeaderElectorBuilder leaderElectorBuilder()
Creates a new LeaderElectorBuilder.- Returns:
- leader elector builder
-
topicBuilder
<T> TopicBuilder<T> topicBuilder()
Creates a new TopicBuilder.- Type Parameters:
T
- topic value type- Returns:
- topic builder
-
workQueueBuilder
<E> WorkQueueBuilder<E> workQueueBuilder()
Creates a new WorkQueueBuilder.- Type Parameters:
E
- work queue element type- Returns:
- work queue builder
-
transactionContextBuilder
TransactionContextBuilder transactionContextBuilder()
Creates a new transaction context builder.- Returns:
- a builder for a transaction context.
-
getAsyncAtomicCounter
default AsyncAtomicCounter getAsyncAtomicCounter(String name)
Returns an instance ofAsyncAtomicCounter
with specified name.- Parameters:
name
- counter name- Returns:
- AsyncAtomicCounter instance
-
getAsyncAtomicIdGenerator
default AsyncAtomicIdGenerator getAsyncAtomicIdGenerator(String name)
Returns an instance ofAsyncAtomicIdGenerator
with specified name.- Parameters:
name
- ID generator name- Returns:
- AsyncAtomicIdGenerator instance
-
getAtomicCounter
default AtomicCounter getAtomicCounter(String name)
Returns an instance ofAtomicCounter
with specified name.- Parameters:
name
- counter name- Returns:
- AtomicCounter instance
-
getAtomicIdGenerator
default AtomicIdGenerator getAtomicIdGenerator(String name)
Returns an instance ofAtomicIdGenerator
with specified name.- Parameters:
name
- ID generator name- Returns:
- AtomicIdGenerator instance
-
getWorkQueue
<E> WorkQueue<E> getWorkQueue(String name, Serializer serializer)
Returns an instance ofWorkQueue
with specified name.- Type Parameters:
E
- work element type- Parameters:
name
- work queue nameserializer
- serializer- Returns:
- WorkQueue instance
-
getDocumentTree
<V> AsyncDocumentTree<V> getDocumentTree(String name, Serializer serializer)
Returns an instance ofAsyncDocumentTree
with specified name.- Type Parameters:
V
- tree node value type- Parameters:
name
- document tree nameserializer
- serializer- Returns:
- AsyncDocumentTree instance
-
getAsyncSetMultimap
<K,V> AsyncConsistentMultimap<K,V> getAsyncSetMultimap(String name, Serializer serializer)
Returns a set backed instance ofAsyncConsistentMultimap
with the specified name.- Type Parameters:
K
- key typeV
- value type- Parameters:
name
- the multimap nameserializer
- serializer- Returns:
- set backed
AsyncConsistentMultimap
instance
-
getAsyncTreeMap
<V> AsyncConsistentTreeMap<V> getAsyncTreeMap(String name, Serializer serializer)
Returns an instance ofAsyncConsistentTreeMap
with the specified name.- Type Parameters:
V
- value type- Parameters:
name
- the treemap nameserializer
- serializer- Returns:
- set backed
AsyncConsistentTreeMap
instance
-
getTopic
<T> Topic<T> getTopic(String name, Serializer serializer)
Returns an instance ofTopic
with specified name.- Type Parameters:
T
- topic message type- Parameters:
name
- topic nameserializer
- serializer- Returns:
- Topic instance
-
-