Class AtomixWorkQueue<E>

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

    public class AtomixWorkQueue<E>
    extends Object
    implements org.onosproject.store.service.WorkQueue<E>
    Atomix work queue.
    • Constructor Detail

      • AtomixWorkQueue

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

      • name

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

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

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

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

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

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

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