|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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). VID
is also used to refer
to the archival for of a DataObject
, a disseminatable
(DISS) (e.g. fragment or tombstone).
Field Summary | |
---|---|
static byte |
DISS
The type code for a VID that consists of the DISS of
the archival form of a DataObject block. |
static byte |
LGUID
The type code for a VID that consists of the GUID of
the log object for a version. |
static String[] |
STRING
|
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 type,
SecureHash id)
Constructs a new VID . |
|
VID(InputBuffer buffer)
Constructs a VID from its
QuickSerializable form. |
Method Summary | |
---|---|
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 |
serialize(OutputBuffer buffer)
Add the object to the buffer . |
String |
toString()
Returns a human-readable representation of this VID . |
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.
public static final byte DISS
VID
that consists of the DISS of
the archival form of a DataObject
block.
public static final String[] STRING
Constructor Detail |
public VID(byte type, SecureHash id)
VID
.
public VID(InputBuffer buffer) throws QSException
VID
from its
QuickSerializable
form.
Method Detail |
public byte get_type()
VID
.
VHASH
, VGUID
, LGUID
,
DISS
public SecureHash get_id()
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
buffer
- the output buffer to add the object topublic 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |