|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ostore.read.ReadReq
A superclass for events sent from the ReplicaStage to the
ReadStage requesting the latter to read a portion of a
DataObject. TODO: reuse same event for
ClientStage->ReplicaStage requests?
| Field Summary | |
|---|---|
protected SecureHash |
digest
The digest of this ReadReq.
|
static byte |
FAIL
A value for fault_mode instructing the
ReadStage to give up completely. |
protected byte |
fault_mode
Specifies what the ReadStage should do if any required
blocks from the DataObject are missing from the
memory cache. |
static byte |
FETCH_ALL
A value for fault_mode instructing the
ReadStage to fetch missing blocks through the block
manager (memory cache). |
static byte |
PARTIAL
A value for fault_mode instructing the
ReadStage to read as much as possible and include in
its response a Selection describing the portion of the
DataObject which it could not find locally. |
protected Selection |
sel
The portion of the DataObject to read. |
protected VID |
target
The id of the DataObject to read. |
protected SecureHash |
tree_id
The GUID of the dissemination tree corresponding to this DataObject, or null if unknown. |
| Constructor Summary | |
|---|---|
protected |
ReadReq(InputBuffer buffer)
Constructs a ReadReq from its
serialized form. |
protected |
ReadReq(VID target,
SecureHash tree_id,
Selection sel,
byte fault_mode)
Constructs a new ReadReq. |
| Method Summary | |
|---|---|
SecureHash |
get_digest()
Returns the digest of this ReadReq.
|
byte |
get_fault_mode()
Returns the code for the fault mode. |
Selection |
get_selection()
Returns the Selection describing the read. |
QSLong |
get_seq_num()
Returns the sequence number of the request. |
VID |
get_target()
Returns the id of the DataObject to read. |
SecureHash |
get_tree_id()
Returns the GUID of the dissemination tree for the DataObject to read. |
int |
hashCode()
Returns the hash of the digest of this ReadReq.
|
void |
serialize(OutputBuffer buffer)
Add the object to the buffer. |
String |
toString()
Returns a human-readable representation of this ReaqReq. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final byte FAIL
fault_mode instructing the
ReadStage to give up completely.
public static final byte FETCH_ALL
fault_mode instructing the
ReadStage to fetch missing blocks through the block
manager (memory cache).
public static final byte PARTIAL
fault_mode instructing the
ReadStage to read as much as possible and include in
its response a Selection describing the portion of the
DataObject which it could not find locally.
protected VID target
DataObject to read.
protected SecureHash tree_id
DataObject, or null if unknown.
protected Selection sel
DataObject to read.
protected byte fault_mode
ReadStage should do if any required
blocks from the DataObject are missing from the
memory cache.
protected transient SecureHash digest
ReadReq.
Do NOT include this field in to_bytes.
| Constructor Detail |
protected ReadReq(VID target,
SecureHash tree_id,
Selection sel,
byte fault_mode)
ReadReq.
protected ReadReq(InputBuffer buffer)
throws QSException
ReadReq from its
serialized form.
| Method Detail |
public QSLong get_seq_num()
public VID get_target()
DataObject to read.
public SecureHash get_tree_id()
DataObject to read.
public Selection get_selection()
Selection describing the read.
public byte get_fault_mode()
public SecureHash get_digest()
ReadReq.
WARNING: the first invocation of this method may be expensive, because it requires serializing the entire object.
public void serialize(OutputBuffer buffer)
QuickSerializablebuffer.
serialize in interface QuickSerializablebuffer - the output buffer to add the object topublic int hashCode()
ReadReq.
WARNING: the first invocation of this method may be expensive, because it requires serializing the entire object.
hashCode in class Objectpublic String toString()
ReaqReq.
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||