Class AtomixWorkQueue<E>
- java.lang.Object
-
- org.onosproject.store.atomix.primitives.impl.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 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 CompletableFuture<Void>addMultiple(Collection<E> items)CompletableFuture<Void>complete(Collection<String> taskIds)CompletableFuture<Void>destroy()Stringname()CompletableFuture<Void>registerTaskProcessor(Consumer<E> taskProcessor, int parallelism, Executor executor)CompletableFuture<org.onosproject.store.service.WorkQueueStats>stats()CompletableFuture<Void>stopProcessing()CompletableFuture<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
-
-
-
-
Constructor Detail
-
AtomixWorkQueue
public AtomixWorkQueue(io.atomix.core.workqueue.AsyncWorkQueue<E> atomixWorkQueue)
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceorg.onosproject.store.service.DistributedPrimitive
-
addMultiple
public CompletableFuture<Void> addMultiple(Collection<E> items)
- Specified by:
addMultiplein interfaceorg.onosproject.store.service.WorkQueue<E>
-
take
public CompletableFuture<Collection<org.onosproject.store.service.Task<E>>> take(int maxItems)
- Specified by:
takein interfaceorg.onosproject.store.service.WorkQueue<E>
-
complete
public CompletableFuture<Void> complete(Collection<String> taskIds)
- Specified by:
completein interfaceorg.onosproject.store.service.WorkQueue<E>
-
registerTaskProcessor
public CompletableFuture<Void> registerTaskProcessor(Consumer<E> taskProcessor, int parallelism, Executor executor)
- Specified by:
registerTaskProcessorin interfaceorg.onosproject.store.service.WorkQueue<E>
-
stopProcessing
public CompletableFuture<Void> stopProcessing()
- Specified by:
stopProcessingin interfaceorg.onosproject.store.service.WorkQueue<E>
-
stats
public CompletableFuture<org.onosproject.store.service.WorkQueueStats> stats()
- Specified by:
statsin interfaceorg.onosproject.store.service.WorkQueue<E>
-
destroy
public CompletableFuture<Void> destroy()
- Specified by:
destroyin interfaceorg.onosproject.store.service.DistributedPrimitive
-
-