public final class RedisDB extends Object
| Constructor and Description |
|---|
RedisDB(io.vertigo.commons.codec.CodecManager codecManager,
io.vertigo.commons.impl.connectors.redis.RedisConnector redisConnector)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<R> WorkResult<R> |
pollResult(int waitTimeSeconds) |
<R,W> WorkItem<R,W> |
pollWorkItem(String workType)
Polls a workitem from the todo list.
|
<R> void |
putResult(String workId,
R result,
Throwable error)
Puts the result for a workitem identified by an id.
|
void |
putStart(String workId) |
<R,W> void |
putWorkItem(WorkItem<R,W> workItem)
Puts a workitem in the todo list.
|
void |
reset() |
public RedisDB(io.vertigo.commons.codec.CodecManager codecManager,
io.vertigo.commons.impl.connectors.redis.RedisConnector redisConnector)
codecManager - the codecManagerredisConnector - the redis connectorpublic void reset()
public void putStart(String workId)
public <R,W> void putWorkItem(WorkItem<R,W> workItem)
workItem - the workItempublic <R,W> WorkItem<R,W> pollWorkItem(String workType)
workType - the type of workItempublic <R> void putResult(String workId, R result, Throwable error)
workId - the id of the workitemresult - the resulterror - if an error occurredpublic <R> WorkResult<R> pollResult(int waitTimeSeconds)
Copyright © 2017. All Rights Reserved.