Class XactId
java.lang.Object
org.apache.derby.impl.store.raw.xact.XactId
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
,TransactionId
Use this class for a short hand representation of the transaction. This
value is only guarentee to be unique within one continuous operation of the
raw store, in other words, every reboot may reuse the same value.
Whereas GlobalXactId is unique for all times across all raw store, a XactId
is only unique within a particular rawstore and may be reused.
XactId keeps track of the outstanding transactionId and is responsible
for dispensing new transactionIds
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
private long id
-
-
Constructor Details
-
XactId
public XactId(long id) -
XactId
public XactId()
-
-
Method Details
-
writeExternal
Write this out.- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
- error writing to log stream
-
readExternal
Read this in- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
- error reading from log stream
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
getMaxStoredSize
public int getMaxStoredSize()TransactionId method- Specified by:
getMaxStoredSize
in interfaceTransactionId
-
equals
-
hashCode
public int hashCode() -
compare
Return 0 if a == b, +ve number if a > b -ve number if a < b -
getId
protected long getId() -
toString
-