Class AtomixWorkQueue<E>

  • All Implemented Interfaces:
    org.onosproject.store.service.DistributedPrimitive, org.onosproject.store.service.WorkQueue<E>

    public class AtomixWorkQueue<E>
    extends java.lang.Object
    implements org.onosproject.store.service.WorkQueue<E>
    Atomix work queue.
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      AtomixWorkQueue​(io.atomix.core.workqueue.AsyncWorkQueue<E> atomixWorkQueue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Void> addMultiple​(java.util.Collection<E> items)  
      java.util.concurrent.CompletableFuture<java.lang.Void> complete​(java.util.Collection<java.lang.String> taskIds)  
      java.util.concurrent.CompletableFuture<java.lang.Void> destroy()  
      java.lang.String name()  
      java.util.concurrent.CompletableFuture<java.lang.Void> registerTaskProcessor​(java.util.function.Consumer<E> taskProcessor, int parallelism, java.util.concurrent.Executor executor)  
      java.util.concurrent.CompletableFuture<org.onosproject.store.service.WorkQueueStats> stats()  
      java.util.concurrent.CompletableFuture<java.lang.Void> stopProcessing()  
      java.util.concurrent.CompletableFuture<java.util.Collection<org.onosproject.store.service.Task<E>>> take​(int maxItems)  
      • 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.WorkQueue

        addOne, complete, primitiveType, take
    • Constructor Detail

      • AtomixWorkQueue

        public AtomixWorkQueue​(io.atomix.core.workqueue.AsyncWorkQueue<E> atomixWorkQueue)
    • Method Detail

      • name

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

        public java.util.concurrent.CompletableFuture<java.lang.Void> addMultiple​(java.util.Collection<E> items)
        Specified by:
        addMultiple in interface org.onosproject.store.service.WorkQueue<E>
      • take

        public java.util.concurrent.CompletableFuture<java.util.Collection<org.onosproject.store.service.Task<E>>> take​(int maxItems)
        Specified by:
        take in interface org.onosproject.store.service.WorkQueue<E>
      • complete

        public java.util.concurrent.CompletableFuture<java.lang.Void> complete​(java.util.Collection<java.lang.String> taskIds)
        Specified by:
        complete in interface org.onosproject.store.service.WorkQueue<E>
      • registerTaskProcessor

        public java.util.concurrent.CompletableFuture<java.lang.Void> registerTaskProcessor​(java.util.function.Consumer<E> taskProcessor,
                                                                                            int parallelism,
                                                                                            java.util.concurrent.Executor executor)
        Specified by:
        registerTaskProcessor in interface org.onosproject.store.service.WorkQueue<E>
      • stopProcessing

        public java.util.concurrent.CompletableFuture<java.lang.Void> stopProcessing()
        Specified by:
        stopProcessing in interface org.onosproject.store.service.WorkQueue<E>
      • stats

        public java.util.concurrent.CompletableFuture<org.onosproject.store.service.WorkQueueStats> stats()
        Specified by:
        stats in interface org.onosproject.store.service.WorkQueue<E>
      • destroy

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