|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.routed.PipelineData<K,V>
K
- Type for the key used in the requestV
- Type for the value returned by the callpublic abstract class PipelineData<K,V>
PipelineData includes a common set of data that is used to represent the
state within the Pipeline
as it moves from action to action. There's
a one-to-one correspondence between a Pipeline
and
PipelineData
, though the latter is not included as an instance
variable. Action implementations usually include the PipelineData
as
an instance variable upon creation.
It's basically a POJO that includes some relevant state for the pipeline
execution:
There are some subclasses of PipelineData
that are used to handle the
different types of operations:
BasicPipelineData
- used by most operations; includes a list of
Node
instances relevant to the key in the operation among other
values
GetAllPipelineData
- used by the "get all" operation
specifically, due to the fact that it includes Map data structures which
don't fit in well in the generic structure
PutPipelineData
- used only by the "put" operation as it includes
data specific to that operation
Pipeline
,
PipelineData
,
BasicPipelineData
,
GetAllPipelineData
,
PutPipelineData
Field Summary | |
---|---|
protected java.util.List<Node> |
failedNodes
|
protected java.util.List<java.lang.Exception> |
failures
|
protected VoldemortException |
fatalError
|
protected java.util.List<Node> |
replicationSet
|
protected PipelineRoutedStats |
stats
|
protected java.lang.String |
storeName
|
Constructor Summary | |
---|---|
PipelineData()
|
Method Summary | |
---|---|
void |
addFailedNode(Node node)
|
java.util.List<Node> |
getFailedNodes()
|
java.util.List<java.lang.Exception> |
getFailures()
Returns a list of zero or more errors that occurred while attempting to contact the remote Voldemort node. |
VoldemortException |
getFatalError()
Returns a "fatal" error that occurred while attempting to contact the remote Voldemort nodes. |
java.util.List<Node> |
getReplicationSet()
|
java.util.List<Response<K,V>> |
getResponses()
Returns is a list of responses that are received by requests to remote Voldemort nodes, either synchronous or asynchronous. |
java.lang.String |
getStoreName()
|
void |
recordFailure(java.lang.Exception e)
Adds an error to the list errors that occurred while attempting to contact the remote Voldemort node. |
void |
reportException(java.lang.Exception e)
|
void |
setFatalError(VoldemortException fatalError)
|
void |
setReplicationSet(java.util.List<Node> replicationSet)
|
void |
setStats(PipelineRoutedStats stats)
|
void |
setStoreName(java.lang.String storeName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.util.List<java.lang.Exception> failures
protected VoldemortException fatalError
protected volatile java.lang.String storeName
protected final java.util.List<Node> failedNodes
protected java.util.List<Node> replicationSet
protected PipelineRoutedStats stats
Constructor Detail |
---|
public PipelineData()
Method Detail |
---|
public void setStats(PipelineRoutedStats stats)
public java.util.List<Node> getReplicationSet()
public void setReplicationSet(java.util.List<Node> replicationSet)
public java.util.List<Response<K,V>> getResponses()
Response
instancespublic VoldemortException getFatalError()
Pipeline.Event.COMPLETED
event will be pushed onto the Pipeline event
stack.
VoldemortException
, or null if no fatal error occurred
during processingpublic void setFatalError(VoldemortException fatalError)
public java.util.List<java.lang.Exception> getFailures()
public void recordFailure(java.lang.Exception e)
e
- Exceptionpublic void addFailedNode(Node node)
public java.util.List<Node> getFailedNodes()
public java.lang.String getStoreName()
public void setStoreName(java.lang.String storeName)
public void reportException(java.lang.Exception e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |