com.tivoli.twg.engine
Class TWGDistConfigRecordHashcode

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGDistConfigRecordHashcode
Direct Known Subclasses:
TWGDistConfigRecord

public class TWGDistConfigRecordHashcode
extends java.lang.Object

Record ID and hashcode data.


Field Summary
static int FLAGS_ISAGENTOWNED
          Flags field : is agent-owned record
static int FLAGS_ISDELETED
          Flags field : is deleted
static int FLAGS_ISGROUP
          Flags field : is group record
static int REC_FLAGS_OFF
           
static int REC_HASHCODE_OFF
           
static int REC_HEADERLEN
           
static int REC_LENDATA_OFF
           
static int REC_OBJECTID_OFF
           
static int REC_OFFDATA_OFF
           
static int REC_OFFRECID_OFF
           
static int REC_OVERALLLEN_OFF
          Byte-encoded record format: unsigned long overall_len; // overall record length unsigned long object_id; // object ID unsigned long flags; // record flags unsigned short off_rec_id; // offset to record ID (UTF8) : also header length unsigned short off_data; // offset to data bytes (0 if none) unsigned long len_data; // length of data bytes (0 if none) unsigned char hashcode[16]; // data record hashcode
 
Constructor Summary
TWGDistConfigRecordHashcode(byte[] rec, int recoff)
          Constructor for object : uses byte-encoded record generated with getByteEncoded()
TWGDistConfigRecordHashcode(java.lang.String rec_id, long oid, boolean is_grp)
          Constructor for object
TWGDistConfigRecordHashcode(java.lang.String rec_id, long oid, boolean is_grp, boolean is_agt_owned)
          Constructor for object
TWGDistConfigRecordHashcode(java.lang.String rec_id, long oid, int flgs)
          Constructor for object
 
Method Summary
static byte[] computeHashcode(java.lang.String rec_id, byte[] buf, int off, int len, long obj_id, boolean is_agent_owned)
          Compute hashcode, using given record data buffer
 void computeRecordHashcode(byte[] buf, int off, int len)
          Compute hashcode, using given record data buffer
 byte[] getByteEncoded()
          Get byte-encoded representation of record
 byte[] getDataRecord()
          Read data record associated with hashcode record : only useable in engine JVM.
 byte[] getHashcode()
          Get hashcode value
 long getObjectID()
          Get object ID
 java.lang.String getRecordID()
          Get record ID
 boolean isAgentOwned()
          Is object ID a group ID
 boolean isDeleted()
          Is deleted record
 boolean isGroupID()
          Is object ID a group ID
 void setHashcode(byte[] hash)
          Set hashcode value
 void setObjectID(long oid)
          Set object ID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAGS_ISGROUP

public static final int FLAGS_ISGROUP
Flags field : is group record

See Also:
Constant Field Values

FLAGS_ISAGENTOWNED

public static final int FLAGS_ISAGENTOWNED
Flags field : is agent-owned record

See Also:
Constant Field Values

FLAGS_ISDELETED

public static final int FLAGS_ISDELETED
Flags field : is deleted

See Also:
Constant Field Values

REC_OVERALLLEN_OFF

public static final int REC_OVERALLLEN_OFF
Byte-encoded record format: unsigned long overall_len; // overall record length unsigned long object_id; // object ID unsigned long flags; // record flags unsigned short off_rec_id; // offset to record ID (UTF8) : also header length unsigned short off_data; // offset to data bytes (0 if none) unsigned long len_data; // length of data bytes (0 if none) unsigned char hashcode[16]; // data record hashcode

See Also:
Constant Field Values

REC_OBJECTID_OFF

public static final int REC_OBJECTID_OFF
See Also:
Constant Field Values

REC_FLAGS_OFF

public static final int REC_FLAGS_OFF
See Also:
Constant Field Values

REC_OFFRECID_OFF

public static final int REC_OFFRECID_OFF
See Also:
Constant Field Values

REC_OFFDATA_OFF

public static final int REC_OFFDATA_OFF
See Also:
Constant Field Values

REC_LENDATA_OFF

public static final int REC_LENDATA_OFF
See Also:
Constant Field Values

REC_HASHCODE_OFF

public static final int REC_HASHCODE_OFF
See Also:
Constant Field Values

REC_HEADERLEN

public static final int REC_HEADERLEN
See Also:
Constant Field Values
Constructor Detail

TWGDistConfigRecordHashcode

public TWGDistConfigRecordHashcode(java.lang.String rec_id,
                                   long oid,
                                   boolean is_grp)
Constructor for object

Parameters:
rec_id - - record ID
oid - - object ID
is_grp - - true if group id, false if managed object id

TWGDistConfigRecordHashcode

public TWGDistConfigRecordHashcode(java.lang.String rec_id,
                                   long oid,
                                   boolean is_grp,
                                   boolean is_agt_owned)
Constructor for object

Parameters:
rec_id - - record ID
oid - - object ID
is_grp - - true if group id, false if managed object id
is_agt_owned - - true if agent owned, false if server owned

TWGDistConfigRecordHashcode

public TWGDistConfigRecordHashcode(java.lang.String rec_id,
                                   long oid,
                                   int flgs)
Constructor for object

Parameters:
rec_id - - record ID
oid - - object ID
flgs - - record flags

TWGDistConfigRecordHashcode

public TWGDistConfigRecordHashcode(byte[] rec,
                                   int recoff)
Constructor for object : uses byte-encoded record generated with getByteEncoded()

Parameters:
rec - - record buffer
recoff - - record offset
Method Detail

getRecordID

public java.lang.String getRecordID()
Get record ID


getObjectID

public long getObjectID()
Get object ID


setObjectID

public void setObjectID(long oid)
Set object ID

Parameters:
oid - - object ID

isGroupID

public boolean isGroupID()
Is object ID a group ID


isAgentOwned

public boolean isAgentOwned()
Is object ID a group ID


isDeleted

public boolean isDeleted()
Is deleted record


getHashcode

public byte[] getHashcode()
Get hashcode value


setHashcode

public void setHashcode(byte[] hash)
Set hashcode value

Parameters:
hash - - byte[16] value for hashcode (or null for no hashcode)

computeRecordHashcode

public void computeRecordHashcode(byte[] buf,
                                  int off,
                                  int len)
Compute hashcode, using given record data buffer

Parameters:
buf - - buffer containing record
off - - offset of record start
len - - length of record

computeHashcode

public static byte[] computeHashcode(java.lang.String rec_id,
                                     byte[] buf,
                                     int off,
                                     int len,
                                     long obj_id,
                                     boolean is_agent_owned)
Compute hashcode, using given record data buffer

Parameters:
rec_id - - record ID
buf - - buffer containing record
off - - offset of record start
len - - length of record
obj_id - - object ID
is_agent_owned - - true if agent owned

getDataRecord

public byte[] getDataRecord()
Read data record associated with hashcode record : only useable in engine JVM.


getByteEncoded

public byte[] getByteEncoded()
Get byte-encoded representation of record