|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.replica.ReplicaResp
A superclass of all responses sent from the ReplicaStage
back to the ClientStage
or remote ReplicaStage
.
Field Summary | |
---|---|
protected SecureHash |
digest
The digest of this ReplicaResp .
|
protected int |
error_code
One of the error codes above (or NO_ERROR ). |
boolean |
local
true iff this ReplicaResp was constructed
locally (not from its QuickSerializable form). |
static int |
NO_ERROR
An error code that indicates no error occurred. |
static int |
NOT_OPEN
An error code that indicates a close request failed because the replica was not open. |
static int |
OBJECT_NOT_FOUND
An error code that indicates a request failed because Tapestry could not find a replica of the data object. |
static int |
READ_ERROR
An error code that indicates a request failed because some portion of the requested data could not be read. |
protected SecureHash |
req_digest
A digest of the corresponding ReplicaReq . |
protected SecureHash |
target
The AGUID of the Replica from the original request. |
static int |
VERSION_PREDICATE_NOT_SATISFIED
An error code that indicates a request failed because no version satisfying the version predicate could be found. |
Constructor Summary | |
---|---|
protected |
ReplicaResp(InputBuffer buffer)
Constructs a ReplicaResp from its
serialize d form. |
protected |
ReplicaResp(ReplicaReq req,
int error_code)
Constructs a ReplicaResp for the specified
ReplicaReq . |
protected |
ReplicaResp(SecureHash req_digest,
SecureHash target,
int error_code)
Constructs a new ReplicaResp . |
Method Summary | |
---|---|
SecureHash |
get_digest()
Returns the digest of this ReplicaResp .
|
int |
get_error_code()
Returns the error code. |
SecureHash |
get_req_digest()
Returns the digest of the corresponding ReplicaReq . |
SecureHash |
get_target()
Returns the AGUID from the original request. |
int |
hashCode()
Returns the hash of the digest of this ReplicaResp .
|
boolean |
is_local()
Returns true if this ReplicaResp was
sent from a local stage, false if it came off the
network. |
void |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
boolean |
successful()
Returns true iff error_code() == NO_ERROR . |
String |
toString()
Returns a human-readable representation of this ReplicaResp . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NO_ERROR
public static final int OBJECT_NOT_FOUND
public static final int VERSION_PREDICATE_NOT_SATISFIED
public static final int READ_ERROR
public static final int NOT_OPEN
protected SecureHash req_digest
ReplicaReq
.
protected SecureHash target
Replica
from the original request.
protected int error_code
NO_ERROR
).
public final boolean local
true
iff this ReplicaResp
was constructed
locally (not from its QuickSerializable
form).
protected transient SecureHash digest
ReplicaResp
.
Do NOT include this field in to_bytes
.
Constructor Detail |
protected ReplicaResp(SecureHash req_digest, SecureHash target, int error_code)
ReplicaResp
.
protected ReplicaResp(ReplicaReq req, int error_code)
ReplicaResp
for the specified
ReplicaReq
.
protected ReplicaResp(InputBuffer buffer) throws QSException
ReplicaResp
from its
serialize
d form.
Method Detail |
public boolean successful()
true
iff error_code() == NO_ERROR
.
public int get_error_code()
public SecureHash get_req_digest()
ReplicaReq
.
get_digest()
public SecureHash get_target()
public boolean is_local()
true
if this ReplicaResp
was
sent from a local stage, false
if it came off the
network.
public SecureHash get_digest()
ReplicaResp
.
WARNING: the first invocation of this method may be expensive, because it requires serializing the entire object.
get_req_digest()
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
buffer
- the output buffer to add the object topublic int hashCode()
ReplicaResp
.
WARNING: the first invocation of this method may be expensive, because it requires serializing the entire object.
hashCode
in class Object
public String toString()
ReplicaResp
.
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |