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() |
ZooReaderWriter |
getZooReaderWriter() |
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 ZooReaderWriter getZooReaderWriter()
public void startProcessing(DistributedWorkQueue.Processor processor, ThreadPoolExecutor executorService) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void addWork(String workId, String data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void addWork(String workId, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public List<String> getWorkQueued() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void waitUntilDone(Set<String> workIDs) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.