public final class RedisWorkerPlugin extends Object implements WorkerPlugin, Activeable
| Constructor and Description |
|---|
RedisWorkerPlugin(CodecManager codecManager,
String nodeId,
String workTypes,
String redisHost,
int redisPort,
Option<String> password) |
| Modifier and Type | Method and Description |
|---|---|
List<Node> |
getNodes() |
List<String> |
getWorkTypes() |
<WR,W> WorkItem<WR,W> |
pollWorkItem(String workType,
int timeoutInSeconds)
Polling workitem.
|
<WR> void |
putResult(String workId,
WR result,
Throwable error)
Send result or error if execution failed
|
void |
putStart(String workId) |
void |
start() |
void |
stop() |
public List<String> getWorkTypes()
getWorkTypes in interface WorkerPluginpublic void start()
start in interface Activeablepublic void stop()
stop in interface Activeablepublic <WR,W> WorkItem<WR,W> pollWorkItem(String workType, int timeoutInSeconds)
pollWorkItem in interface WorkerPluginpublic <WR> void putResult(String workId, WR result, Throwable error)
putResult in interface WorkerPluginworkId - WorkIdresult - Result (not null if execution succeeded)error - Error ( not null if execution failed)public void putStart(String workId)
putStart in interface WorkerPluginCopyright © 2014. All Rights Reserved.