Package org.onosproject.store.service
Interface PrimitiveService
-
- All Known Subinterfaces:
CoordinationService,StorageService
public interface PrimitiveServicePrimitive 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 AtomicCounterBuilderatomicCounterBuilder()Creates a new AtomicCounterBuilder.<K> AtomicCounterMapBuilder<K>atomicCounterMapBuilder()Creates a newAtomicCounterMapBuilder.AtomicIdGeneratorBuilderatomicIdGeneratorBuilder()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 AsyncAtomicCountergetAsyncAtomicCounter(String name)Returns an instance ofAsyncAtomicCounterwith specified name.default AsyncAtomicIdGeneratorgetAsyncAtomicIdGenerator(String name)Returns an instance ofAsyncAtomicIdGeneratorwith specified name.<K,V>
AsyncConsistentMultimap<K,V>getAsyncSetMultimap(String name, Serializer serializer)Returns a set backed instance ofAsyncConsistentMultimapwith the specified name.<V> AsyncConsistentTreeMap<V>getAsyncTreeMap(String name, Serializer serializer)Returns an instance ofAsyncConsistentTreeMapwith the specified name.default AtomicCountergetAtomicCounter(String name)Returns an instance ofAtomicCounterwith specified name.default AtomicIdGeneratorgetAtomicIdGenerator(String name)Returns an instance ofAtomicIdGeneratorwith specified name.<V> AsyncDocumentTree<V>getDocumentTree(String name, Serializer serializer)Returns an instance ofAsyncDocumentTreewith specified name.<T> Topic<T>getTopic(String name, Serializer serializer)Returns an instance ofTopicwith specified name.<E> WorkQueue<E>getWorkQueue(String name, Serializer serializer)Returns an instance ofWorkQueuewith specified name.LeaderElectorBuilderleaderElectorBuilder()Creates a new LeaderElectorBuilder.<E> DistributedSetBuilder<E>setBuilder()Creates a new DistributedSetBuilder.<T> TopicBuilder<T>topicBuilder()Creates a new TopicBuilder.TransactionContextBuildertransactionContextBuilder()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 ofAsyncAtomicCounterwith specified name.- Parameters:
name- counter name- Returns:
- AsyncAtomicCounter instance
-
getAsyncAtomicIdGenerator
default AsyncAtomicIdGenerator getAsyncAtomicIdGenerator(String name)
Returns an instance ofAsyncAtomicIdGeneratorwith specified name.- Parameters:
name- ID generator name- Returns:
- AsyncAtomicIdGenerator instance
-
getAtomicCounter
default AtomicCounter getAtomicCounter(String name)
Returns an instance ofAtomicCounterwith specified name.- Parameters:
name- counter name- Returns:
- AtomicCounter instance
-
getAtomicIdGenerator
default AtomicIdGenerator getAtomicIdGenerator(String name)
Returns an instance ofAtomicIdGeneratorwith specified name.- Parameters:
name- ID generator name- Returns:
- AtomicIdGenerator instance
-
getWorkQueue
<E> WorkQueue<E> getWorkQueue(String name, Serializer serializer)
Returns an instance ofWorkQueuewith 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 ofAsyncDocumentTreewith 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 ofAsyncConsistentMultimapwith the specified name.- Type Parameters:
K- key typeV- value type- Parameters:
name- the multimap nameserializer- serializer- Returns:
- set backed
AsyncConsistentMultimapinstance
-
getAsyncTreeMap
<V> AsyncConsistentTreeMap<V> getAsyncTreeMap(String name, Serializer serializer)
Returns an instance ofAsyncConsistentTreeMapwith the specified name.- Type Parameters:
V- value type- Parameters:
name- the treemap nameserializer- serializer- Returns:
- set backed
AsyncConsistentTreeMapinstance
-
getTopic
<T> Topic<T> getTopic(String name, Serializer serializer)
Returns an instance ofTopicwith specified name.- Type Parameters:
T- topic message type- Parameters:
name- topic nameserializer- serializer- Returns:
- Topic instance
-
-