org.apache.derby.impl.store.raw.xact
Class XactId

java.lang.Object
  extended byorg.apache.derby.impl.store.raw.xact.XactId
All Implemented Interfaces:
java.io.Externalizable, Formatable, java.io.Serializable, TransactionId, TypedFormat

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
private  long id
           
 
Constructor Summary
XactId()
           
XactId(long id)
           
 
Method Summary
static long compare(TransactionId a, TransactionId b)
          Return 0 if a == b, +ve number if a > b -ve number if a < b
 boolean equals(java.lang.Object other)
           
protected  long getId()
           
 int getMaxStoredSize()
          TransactionId method
 int getTypeFormatId()
          Return my format identifier.
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
          Read this in
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
          Write this out.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private long id
Constructor Detail

XactId

public XactId(long id)

XactId

public XactId()
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this out.

Specified by:
writeExternal in interface java.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 interface java.io.Externalizable
Throws:
java.io.IOException - error reading from log stream

getTypeFormatId

public int getTypeFormatId()
Return my format identifier.

Specified by:
getTypeFormatId in interface TypedFormat
Returns:
The identifier. (A UUID stuffed in an array of 16 bytes).

getMaxStoredSize

public int getMaxStoredSize()
TransactionId method

Specified by:
getMaxStoredSize in interface TransactionId

equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()

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()


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.