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 Detail

      • eventuallyConsistentMapBuilder

        <K,​V> EventuallyConsistentMapBuilder<K,​V> eventuallyConsistentMapBuilder()
        Creates a new EventuallyConsistentMapBuilder.
        Type Parameters:
        K - key type
        V - value type
        Returns:
        builder for an eventually consistent map
      • consistentMapBuilder

        <K,​V> ConsistentMapBuilder<K,​V> consistentMapBuilder()
        Creates a new ConsistentMapBuilder.
        Type Parameters:
        K - key type
        V - 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 new AsyncConsistentTreeMapBuilder.
        Type Parameters:
        V - value type
        Returns:
        builder for a consistent tree map
      • consistentMultimapBuilder

        <K,​V> ConsistentMultimapBuilder<K,​V> consistentMultimapBuilder()
        Creates a new AsyncConsistentSetMultimapBuilder.
        Type Parameters:
        K - key type
        V - value type
        Returns:
        builder for a set based consistent multimap
      • atomicCounterMapBuilder

        <K> AtomicCounterMapBuilder<K> atomicCounterMapBuilder()
        Creates a new AtomicCounterMapBuilder.
        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 of AsyncAtomicCounter with specified name.
        Parameters:
        name - counter name
        Returns:
        AsyncAtomicCounter instance
      • getAsyncAtomicIdGenerator

        default AsyncAtomicIdGenerator getAsyncAtomicIdGenerator​(String name)
        Returns an instance of AsyncAtomicIdGenerator with specified name.
        Parameters:
        name - ID generator name
        Returns:
        AsyncAtomicIdGenerator instance
      • getAtomicCounter

        default AtomicCounter getAtomicCounter​(String name)
        Returns an instance of AtomicCounter with specified name.
        Parameters:
        name - counter name
        Returns:
        AtomicCounter instance
      • getAtomicIdGenerator

        default AtomicIdGenerator getAtomicIdGenerator​(String name)
        Returns an instance of AtomicIdGenerator with specified name.
        Parameters:
        name - ID generator name
        Returns:
        AtomicIdGenerator instance
      • getWorkQueue

        <E> WorkQueue<E> getWorkQueue​(String name,
                                      Serializer serializer)
        Returns an instance of WorkQueue with specified name.
        Type Parameters:
        E - work element type
        Parameters:
        name - work queue name
        serializer - serializer
        Returns:
        WorkQueue instance
      • getDocumentTree

        <V> AsyncDocumentTree<V> getDocumentTree​(String name,
                                                 Serializer serializer)
        Returns an instance of AsyncDocumentTree with specified name.
        Type Parameters:
        V - tree node value type
        Parameters:
        name - document tree name
        serializer - serializer
        Returns:
        AsyncDocumentTree instance
      • getAsyncSetMultimap

        <K,​V> AsyncConsistentMultimap<K,​V> getAsyncSetMultimap​(String name,
                                                                           Serializer serializer)
        Returns a set backed instance of AsyncConsistentMultimap with the specified name.
        Type Parameters:
        K - key type
        V - value type
        Parameters:
        name - the multimap name
        serializer - serializer
        Returns:
        set backed AsyncConsistentMultimap instance
      • getAsyncTreeMap

        <V> AsyncConsistentTreeMap<V> getAsyncTreeMap​(String name,
                                                      Serializer serializer)
        Returns an instance of AsyncConsistentTreeMap with the specified name.
        Type Parameters:
        V - value type
        Parameters:
        name - the treemap name
        serializer - serializer
        Returns:
        set backed AsyncConsistentTreeMap instance
      • getTopic

        <T> Topic<T> getTopic​(String name,
                              Serializer serializer)
        Returns an instance of Topic with specified name.
        Type Parameters:
        T - topic message type
        Parameters:
        name - topic name
        serializer - serializer
        Returns:
        Topic instance