public class AtomixWorkQueue extends io.atomix.resource.AbstractResource<AtomixWorkQueue> implements org.onosproject.store.service.WorkQueue<byte[]>
WorkQueue primitive.| Modifier and Type | Field and Description |
|---|---|
static String |
TASK_AVAILABLE |
| Modifier | Constructor and Description |
|---|---|
protected |
AtomixWorkQueue(io.atomix.copycat.client.CopycatClient client,
Properties options) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
addMultiple(Collection<byte[]> items) |
CompletableFuture<Void> |
complete(Collection<String> taskIds) |
CompletableFuture<Void> |
destroy() |
String |
name() |
CompletableFuture<AtomixWorkQueue> |
open() |
CompletableFuture<Void> |
registerTaskProcessor(Consumer<byte[]> callback,
int parallelism,
Executor executor) |
CompletableFuture<org.onosproject.store.service.WorkQueueStats> |
stats() |
CompletableFuture<Void> |
stopProcessing() |
CompletableFuture<Collection<org.onosproject.store.service.Task<byte[]>>> |
take(int maxTasks) |
close, config, context, delete, equals, hashCode, isClosed, isOpen, onEvent, onRecovery, onStateChange, options, recover, serializer, state, toString, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final String TASK_AVAILABLE
protected AtomixWorkQueue(io.atomix.copycat.client.CopycatClient client,
Properties options)
public String name()
name in interface org.onosproject.store.service.DistributedPrimitivepublic CompletableFuture<Void> destroy()
destroy in interface org.onosproject.store.service.DistributedPrimitivepublic CompletableFuture<AtomixWorkQueue> open()
open in interface io.atomix.catalyst.util.Managed<AtomixWorkQueue>open in interface io.atomix.resource.Resource<AtomixWorkQueue>open in class io.atomix.resource.AbstractResource<AtomixWorkQueue>public CompletableFuture<Void> addMultiple(Collection<byte[]> items)
addMultiple in interface org.onosproject.store.service.WorkQueue<byte[]>public CompletableFuture<Collection<org.onosproject.store.service.Task<byte[]>>> take(int maxTasks)
take in interface org.onosproject.store.service.WorkQueue<byte[]>public CompletableFuture<Void> complete(Collection<String> taskIds)
complete in interface org.onosproject.store.service.WorkQueue<byte[]>public CompletableFuture<Void> registerTaskProcessor(Consumer<byte[]> callback, int parallelism, Executor executor)
registerTaskProcessor in interface org.onosproject.store.service.WorkQueue<byte[]>public CompletableFuture<Void> stopProcessing()
stopProcessing in interface org.onosproject.store.service.WorkQueue<byte[]>public CompletableFuture<org.onosproject.store.service.WorkQueueStats> stats()
stats in interface org.onosproject.store.service.WorkQueue<byte[]>