|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.routed.Pipeline
public class Pipeline
A Pipeline is the main conduit through which an Action
is run. An
Action
is executed in response to the Pipeline receiving an event.
The majority of the events are self-initiated from within the Pipeline
itself. The only case thus-far where external entities create events are in
response to asynchronous responses from servers. A Response
instance
is created on completion of an asynchronous request and is fed back into the
Pipeline where an appropriate 'response handler' action is executed.
RoutedStore
. This
is due to the fact that it includes internal state, specific to each
operation request (get, getAll, getVersions, put, and delete) invocation.
Nested Class Summary | |
---|---|
static class |
Pipeline.Event
|
static class |
Pipeline.Operation
|
Constructor Summary | |
---|---|
Pipeline(Pipeline.Operation operation,
long timeout,
java.util.concurrent.TimeUnit unit)
|
Method Summary | |
---|---|
void |
abort()
Pipeline can't proceed further. |
void |
addEvent(Pipeline.Event event)
Add an event to the queue. |
void |
addEventAction(Pipeline.Event event,
Action action)
Assigns the event to be handled by the given action. |
void |
execute()
Process events in the order as they were received. |
Pipeline.Operation |
getOperation()
|
boolean |
isFinished()
|
boolean |
isHintedHandoffEnabled()
|
void |
setEnableHintedHandoff(boolean enableHintedHandoff)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pipeline(Pipeline.Operation operation, long timeout, java.util.concurrent.TimeUnit unit)
operation
- timeout
- Timeoutunit
- Unit of timeoutMethod Detail |
---|
public Pipeline.Operation getOperation()
public void addEventAction(Pipeline.Event event, Action action)
event
- Eventaction
- Action to invoke upon receipt of that eventpublic void abort()
public void addEvent(Pipeline.Event event)
event
- Eventpublic boolean isHintedHandoffEnabled()
public void setEnableHintedHandoff(boolean enableHintedHandoff)
public boolean isFinished()
public void execute()
InsufficientOperationalNodesException
will be
thrown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |