|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.cache.CacheableIdentity
Field Summary | |
---|---|
static int |
DISS
indicates that this object is a disseminatable |
static int |
DISS_BUCKET
indicates that this object is a disseminatable bucket |
static int |
GUID
indicates that this object has a GUID |
static int |
VHASH
indicates that this object has a VHASH |
Constructor Summary | |
---|---|
CacheableIdentity()
Create a CacheableIdentity for a specific object. |
|
CacheableIdentity(InputBuffer buffer)
Constructs a CacheableIdentity from its
serialized form. |
|
CacheableIdentity(int[] type,
Object[] names)
Create a CacheableIdentity for a specific object which has multiple types. |
|
CacheableIdentity(int type,
Object name)
Create a CacheableIdentity for a specific object of a given type. |
|
CacheableIdentity(VID vid)
Create a CacheableIdentity for an object named by a VID . |
Method Summary | |
---|---|
void |
addPair(int type,
Object name)
Add another |
CacheableIdentity |
append(CacheableIdentity old)
Append any differences from this to a copy of old |
CacheableIdentity |
copy()
makes a new copy of an existing CacheableIdentity |
boolean |
equals(Object other)
Tests for complete equality with other CacheableIdentity s. |
Object |
get(int type)
return the object associated with type where type is one of the globally defined types above (ie GUID, VHASH...) |
int |
hashCode()
Adds the hash code of all the internal names. |
boolean |
matches(CacheableIdentity other)
Tests for equivalence among CacheableIdentity s. |
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 static final int GUID
public static final int VHASH
public static final int DISS
public static final int DISS_BUCKET
Constructor Detail |
public CacheableIdentity()
public CacheableIdentity(VID vid)
VID
.
vid
- The identifier of the block.public CacheableIdentity(int type, Object name)
name
- when evicted, will use name to identity object. For example,
if the disk is used to store evicted items, the item will
have name as its name.type
- predefined static integer representing a characteristic
of the object. For example, CacheableIdentity.GUID indicates
that this object has a GUID.public CacheableIdentity(int[] type, Object[] names)
names
- when evicted, will use name to identity object. For example,
if the disk is used to store evicted items, the item will
have name as its name.type
- holds all types that this object can be defined by. For
example, object may have a GUID and VHASH, and type[] will
hold both CacheableIdentity.GUID and CacheableIdentity.VHASHpublic CacheableIdentity(InputBuffer buffer) throws QSException
CacheableIdentity
from its
serialized
form.
buffer
- serialized
form of object.Method Detail |
public void serialize(OutputBuffer buffer)
QuickSerializable
buffer
.
serialize
in interface QuickSerializable
buffer
- the output buffer to add the object topublic CacheableIdentity copy()
public CacheableIdentity append(CacheableIdentity old)
old
- id currently used by Cachepublic String toString()
toString
in class Object
public boolean equals(Object other)
CacheableIdentity
s. The two must contain the same names
with the same types, although internal order is unimportant.
equals
in class Object
matches(ostore.cache.CacheableIdentity)
public boolean matches(CacheableIdentity other)
CacheableIdentity
s.
true
iff any name and type is common between
this and other
.public int hashCode()
hashCode
in class Object
public Object get(int type)
public void addPair(int type, Object name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |