Class XactId
- java.lang.Object
-
- org.apache.derby.impl.store.raw.xact.XactId
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Formatable,TypedFormat,TransactionId
public class XactId extends java.lang.Object implements 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private longid
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longcompare(TransactionId a, TransactionId b)Return 0 if a == b, +ve number if a > b -ve number if a < bbooleanequals(java.lang.Object other)protected longgetId()intgetMaxStoredSize()TransactionId methodintgetTypeFormatId()Return my format identifier.inthashCode()voidreadExternal(java.io.ObjectInput in)Read this injava.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)Write this out.
-
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this out.- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException- error writing to log stream
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOExceptionRead this in- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException- error reading from log stream
-
getTypeFormatId
public int getTypeFormatId()
Return my format identifier.- Specified by:
getTypeFormatIdin interfaceTypedFormat- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
getMaxStoredSize
public int getMaxStoredSize()
TransactionId method- Specified by:
getMaxStoredSizein interfaceTransactionId
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compare
public static long compare(TransactionId a, TransactionId b)
Return 0 if a == b, +ve number if a > b -ve number if a < b
-
getId
protected long getId()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-