Class EventuallyConsistentMapBuilderImpl<K,​V>

  • All Implemented Interfaces:
    org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>

    public class EventuallyConsistentMapBuilderImpl<K,​V>
    extends java.lang.Object
    implements org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
    Eventually consistent map builder.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventuallyConsistentMapBuilderImpl​(org.onosproject.cluster.NodeId localNodeId, org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator, org.onosproject.persistence.PersistenceService persistenceService, java.util.function.Supplier<java.util.List<org.onosproject.cluster.NodeId>> peersSupplier, java.util.function.Supplier<java.util.List<org.onosproject.cluster.NodeId>> bootstrapPeersSupplier)
      Creates a new eventually consistent map builder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.onosproject.store.service.EventuallyConsistentMap<K,​V> build()  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withAntiEntropyPeriod​(long period, java.util.concurrent.TimeUnit unit)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withBackgroundExecutor​(java.util.concurrent.ScheduledExecutorService executor)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withCommunicationExecutor​(java.util.concurrent.ExecutorService executor)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withEventExecutor​(java.util.concurrent.ExecutorService executor)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withFasterConvergence()  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withName​(java.lang.String name)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withPeerUpdateFunction​(java.util.function.BiFunction<K,​V,​java.util.Collection<org.onosproject.cluster.NodeId>> peerUpdateFunction)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withPersistence()  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withSerializer​(org.onlab.util.KryoNamespace serializer)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withSerializer​(org.onlab.util.KryoNamespace.Builder serializerBuilder)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withTimestampProvider​(java.util.function.BiFunction<K,​V,​org.onosproject.store.Timestamp> timestampProvider)  
      org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withTombstonesDisabled()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventuallyConsistentMapBuilderImpl

        public EventuallyConsistentMapBuilderImpl​(org.onosproject.cluster.NodeId localNodeId,
                                                  org.onosproject.store.cluster.messaging.ClusterCommunicationService clusterCommunicator,
                                                  org.onosproject.persistence.PersistenceService persistenceService,
                                                  java.util.function.Supplier<java.util.List<org.onosproject.cluster.NodeId>> peersSupplier,
                                                  java.util.function.Supplier<java.util.List<org.onosproject.cluster.NodeId>> bootstrapPeersSupplier)
        Creates a new eventually consistent map builder.
        Parameters:
        localNodeId - local node id
        clusterCommunicator - cluster communication service
        persistenceService - persistence service
        peersSupplier - supplier for peers
        bootstrapPeersSupplier - supplier for peers for bootstrap
    • Method Detail

      • withName

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withName​(java.lang.String name)
        Specified by:
        withName in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withSerializer

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withSerializer​(org.onlab.util.KryoNamespace.Builder serializerBuilder)
        Specified by:
        withSerializer in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withSerializer

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withSerializer​(org.onlab.util.KryoNamespace serializer)
        Specified by:
        withSerializer in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withTimestampProvider

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withTimestampProvider​(java.util.function.BiFunction<K,​V,​org.onosproject.store.Timestamp> timestampProvider)
        Specified by:
        withTimestampProvider in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withEventExecutor

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withEventExecutor​(java.util.concurrent.ExecutorService executor)
        Specified by:
        withEventExecutor in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withCommunicationExecutor

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withCommunicationExecutor​(java.util.concurrent.ExecutorService executor)
        Specified by:
        withCommunicationExecutor in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withBackgroundExecutor

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withBackgroundExecutor​(java.util.concurrent.ScheduledExecutorService executor)
        Specified by:
        withBackgroundExecutor in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withPeerUpdateFunction

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withPeerUpdateFunction​(java.util.function.BiFunction<K,​V,​java.util.Collection<org.onosproject.cluster.NodeId>> peerUpdateFunction)
        Specified by:
        withPeerUpdateFunction in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withTombstonesDisabled

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withTombstonesDisabled()
        Specified by:
        withTombstonesDisabled in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withAntiEntropyPeriod

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withAntiEntropyPeriod​(long period,
                                                                                                             java.util.concurrent.TimeUnit unit)
        Specified by:
        withAntiEntropyPeriod in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withFasterConvergence

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withFasterConvergence()
        Specified by:
        withFasterConvergence in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • withPersistence

        public org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V> withPersistence()
        Specified by:
        withPersistence in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>
      • build

        public org.onosproject.store.service.EventuallyConsistentMap<K,​V> build()
        Specified by:
        build in interface org.onosproject.store.service.EventuallyConsistentMapBuilder<K,​V>