Class AtomixDistributedTopic<T>

  • Type Parameters:
    T - topic message type.
    All Implemented Interfaces:
    org.onosproject.store.service.DistributedPrimitive, org.onosproject.store.service.Topic<T>

    public class AtomixDistributedTopic<T>
    extends java.lang.Object
    implements org.onosproject.store.service.Topic<T>
    Default implementation of Topic.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.onosproject.store.service.DistributedPrimitive

        org.onosproject.store.service.DistributedPrimitive.Status, org.onosproject.store.service.DistributedPrimitive.Type
    • Field Summary

      • Fields inherited from interface org.onosproject.store.service.DistributedPrimitive

        DEFAULT_OPERATION_TIMEOUT_MILLIS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Void> destroy()  
      java.lang.String name()  
      org.onosproject.store.service.DistributedPrimitive.Type primitiveType()  
      java.util.concurrent.CompletableFuture<java.lang.Void> publish​(T message)  
      java.util.concurrent.CompletableFuture<java.lang.Void> subscribe​(java.util.function.Consumer<T> callback, java.util.concurrent.Executor executor)  
      java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe​(java.util.function.Consumer<T> callback)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.store.service.DistributedPrimitive

        addStatusChangeListener, applicationId, removeStatusChangeListener, statusChangeListeners
      • Methods inherited from interface org.onosproject.store.service.Topic

        subscribe
    • Method Detail

      • name

        public java.lang.String name()
        Specified by:
        name in interface org.onosproject.store.service.DistributedPrimitive
      • primitiveType

        public org.onosproject.store.service.DistributedPrimitive.Type primitiveType()
        Specified by:
        primitiveType in interface org.onosproject.store.service.DistributedPrimitive
      • publish

        public java.util.concurrent.CompletableFuture<java.lang.Void> publish​(T message)
        Specified by:
        publish in interface org.onosproject.store.service.Topic<T>
      • subscribe

        public java.util.concurrent.CompletableFuture<java.lang.Void> subscribe​(java.util.function.Consumer<T> callback,
                                                                                java.util.concurrent.Executor executor)
        Specified by:
        subscribe in interface org.onosproject.store.service.Topic<T>
      • unsubscribe

        public java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe​(java.util.function.Consumer<T> callback)
        Specified by:
        unsubscribe in interface org.onosproject.store.service.Topic<T>
      • destroy

        public java.util.concurrent.CompletableFuture<java.lang.Void> destroy()
        Specified by:
        destroy in interface org.onosproject.store.service.DistributedPrimitive