public class DistributedWorkQueue extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DistributedWorkQueue.Processor |
| Constructor and Description |
|---|
DistributedWorkQueue(String path,
AccumuloConfiguration config) |
DistributedWorkQueue(String path,
AccumuloConfiguration config,
long timerInitialDelay,
long timerPeriod) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWork(String workId,
byte[] data) |
void |
addWork(String workId,
String data)
Adds work to the queue, automatically converting the String to bytes using UTF-8
|
List<String> |
getWorkQueued() |
void |
startProcessing(DistributedWorkQueue.Processor processor,
ThreadPoolExecutor executorService) |
void |
waitUntilDone(Set<String> workIDs) |
public DistributedWorkQueue(String path, AccumuloConfiguration config)
public DistributedWorkQueue(String path, AccumuloConfiguration config, long timerInitialDelay, long timerPeriod)
public void startProcessing(DistributedWorkQueue.Processor processor, ThreadPoolExecutor executorService) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void addWork(String workId, String data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void addWork(String workId, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic List<String> getWorkQueued() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void waitUntilDone(Set<String> workIDs) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.