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 long
id
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static long
compare(TransactionId a, TransactionId b)
Return 0 if a == b, +ve number if a > b -ve number if a < bboolean
equals(java.lang.Object other)
protected long
getId()
int
getMaxStoredSize()
TransactionId methodint
getTypeFormatId()
Return my format identifier.int
hashCode()
void
readExternal(java.io.ObjectInput in)
Read this injava.lang.String
toString()
void
writeExternal(java.io.ObjectOutput out)
Write this out.
-
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
Write this out.- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
- error writing to log stream
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
Read this in- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.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
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
toString
in classjava.lang.Object
-
-