|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.util.VID
A wrapper class for a DataObject
version identifier. A
VID
contains a single SecureHash
, which is
either the VHash of a top-block, the VGUID of a top-block, or the GUID
of a log object (LGUID).
Field Summary | |
static byte |
LGUID
The type code for a VID that consists of the GUID of
the log object for a version. |
static byte |
VGUID
The type code for a VID that consists of the VGUID of a
DataObject 's top block (A checkpoint GUID). |
static byte |
VHASH
The type code for a VID that consists of the VHash of a
DataObject 's top block. |
Constructor Summary | |
VID(byte[] data,
int[] offset)
Constructs a VID from its
QuickSerializable form. |
|
VID(byte type,
SecureHash id)
Constructs a new VID . |
Method Summary | |
void |
add_to_digest(SecureHashBuffer buffer)
Adds this object's state to the specified SecureHashBuffer using the various add
methods. |
int |
compareTo(Object o)
Imposes an order on VID s. |
boolean |
equals(Object other)
Tests for equality (type and id). |
SecureHash |
get_id()
Returns the VHash, VGUID, or GUID, as appropriate. |
byte |
get_type()
Returns the type of identifier for this VID . |
int |
hashCode()
Returns the hashcode of the internal identifier. |
void |
to_bytes(byte[] data,
int[] offset)
Store the object in its "on the wire" form in the byte array data , starting at index offset [0] , and
increment offset [0] by the number of bytes written;
if data == null , increment offset [0] by
the number of bytes that would have been written otherwise. |
String |
toString()
Returns a human-readable representation of this VID . |
int |
type_code()
Returns the unique integer associated with this class in the TypeTable . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte VHASH
VID
that consists of the VHash of a
DataObject
's top block.public static final byte VGUID
VID
that consists of the VGUID of a
DataObject
's top block (A checkpoint GUID).public static final byte LGUID
VID
that consists of the GUID of
the log object for a version.Constructor Detail |
public VID(byte type, SecureHash id)
VID
.public VID(byte[] data, int[] offset) throws QSException
VID
from its
QuickSerializable
form.Method Detail |
public byte get_type()
VID
.VHASH
, VGUID
, LGUID
public SecureHash get_id()
public void to_bytes(byte[] data, int[] offset)
QuickSerializable
data
, starting at index offset [0]
, and
increment offset [0]
by the number of bytes written;
if data == null
, increment offset [0]
by
the number of bytes that would have been written otherwise.to_bytes
in interface QuickSerializable
ostore.util.QuickSerializable
data
- The byte array to store into, or null
.offset
- A single element array whose first
element is the index in data to begin writing at on
function entry, and which on function exit has been
incremented by the number of bytes written.public int type_code()
QuickSerializable
TypeTable
.type_code
in interface QuickSerializable
ostore.util.QuickSerializable
public void add_to_digest(SecureHashBuffer buffer)
Digestible
SecureHashBuffer
using the various add
methods.add_to_digest
in interface Digestible
ostore.util.Digestible
SecureHashBuffer.add( byte )
,
SecureHashBuffer.add( byte[] )
,
SecureHashBuffer.add( byte[], int, int )
,
SecureHashBuffer.add( Digestible )
public int compareTo(Object o)
VID
s. The order is equivalent to
the lexicographic order on corresponding
VID.get_type(),VID.get_id()
pairs.compareTo
in interface Comparable
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
other
- possibly a VID
.true
iff other
is a
VID
with the same identifier (including type).public String toString()
VID
.toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |