|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.inner.Heartbeat
A heartbeat is a signed certificate from the Inner Ring indicating when a given version of an OceanStore data object was created. This class is actually rather mis-named, since there are several different ``classes'' of ``heartbeats'' in OceanStore, all of which fall under the broad description of ``heartbeat''. This class contains the data which is common to all of them. Some classes which actually serve as signed certificates of this data are
The reason for this rather complex state of affairs is that generating a heartbeat requires the creation of a digital signature over the signed data, and doing this in the inner ring requires a Byzantine agreement to occur. Thus a fresh heartbeat requires as much computation time and network bandwidth as a small write--a non-trivial amount. So whenever possible, the Inner Ring servers try to give out already computed heartbeats rather than create new ones. For example, the messageTimedHeartbeatReqMsg
can be used to ask the Inner Ring for any
heartbeat with a timestamp later than a certain value. The reply
message, TimedHeartbeatRespMsg
Field Summary | |
---|---|
SecureHash |
aguid
|
QSDate |
expiration_date
The official time that this version will expire. |
long |
seq_num
The index of this version of the object. |
QSDate |
timestamp
The official time that this version was written. |
SecureHash |
vguid
|
SecureHash |
vhash
|
Constructor Summary | |
---|---|
Heartbeat(InputBuffer buffer)
|
|
Heartbeat(SecureHash aguid,
SecureHash vhash,
SecureHash vguid,
long seq_num,
QSDate timestamp)
Constructs a Heartbeat which does not expire.
|
|
Heartbeat(SecureHash aguid,
SecureHash vhash,
SecureHash vguid,
long seq_num,
QSDate timestamp,
QSDate expiration_date)
Constructs a Heartbeat . |
Method Summary | |
---|---|
int |
compareTo(Object o)
Compares this Heartbeat to another.
|
boolean |
equals(Object other)
|
static Heartbeat |
extract_hb(SignedQS signed_hb,
SecureHash aguid)
|
int |
hashCode()
|
void |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public SecureHash aguid
public SecureHash vhash
public SecureHash vguid
public long seq_num
public QSDate timestamp
public QSDate expiration_date
Constructor Detail |
public Heartbeat(SecureHash aguid, SecureHash vhash, SecureHash vguid, long seq_num, QSDate timestamp)
Heartbeat
which does not expire.
Technically, the version will expire on the last possible recorded
second, at Sun Aug 17 00:12:55 PDT 292278994.
public Heartbeat(SecureHash aguid, SecureHash vhash, SecureHash vguid, long seq_num, QSDate timestamp, QSDate expiration_date)
Heartbeat
.
public Heartbeat(InputBuffer buffer) throws QSException
Method Detail |
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
buffer
- the output buffer to add the object topublic String toString()
toString
in class Object
public static Heartbeat extract_hb(SignedQS signed_hb, SecureHash aguid)
public int compareTo(Object o)
Heartbeat
to another.
This method compares the fields of the Heartbeat
s in
the following order:
seq_num
timestamp
vguid
expiration_date
compareTo
in interface Comparable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |