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

java.lang.Object
  extended by org.apache.derby.impl.store.raw.xact.TransactionTableEntry
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, Formatable, TypedFormat, TransactionInfo

public class TransactionTableEntry
extends java.lang.Object
implements Formatable, TransactionInfo, java.lang.Cloneable

Transaction table entry is used to store all relavent information of a transaction into the transaction table for the use of checkpoint, recovery, Transaction management during Quiesce state, and for dumping transaction table. Only works with the following classes: TransactionTable, XactFactory, Xact
During run time, whenever any transaction is started, it is put into the transaction table. Whenever any transaction is closed, it is removed from the transaction table.

See Also:
Serialized Form

Field Summary
(package private) static int EXCLUDE
           
private  LogInstant firstLog
           
private  GlobalTransactionId gid
           
private  boolean isClone
           
private  LogInstant lastLog
           
private  LanguageConnectionContext lcc
           
private  Xact myxact
           
private  boolean needExclusion
           
private  boolean recovery
           
(package private) static int RECOVERY
           
private  int transactionStatus
           
private  boolean update
           
(package private) static int UPDATE
           
private  TransactionId xid
           
 
Constructor Summary
TransactionTableEntry()
           
TransactionTableEntry(Xact xact, TransactionId tid, int status, int attribute)
           
 
Method Summary
protected  java.lang.Object clone()
          Cloneable
(package private)  LogInstant getFirstLog()
           
 java.lang.String getFirstLogInstantString()
           
 GlobalTransactionId getGid()
           
 java.lang.String getGlobalTransactionIdString()
           
(package private)  LogInstant getLastLog()
           
private  void getlcc()
           
 java.lang.String getStatementTextString()
           
 java.lang.String getTransactionIdString()
          Methods of TransactionInfo
(package private)  int getTransactionStatus()
           
 java.lang.String getTransactionStatusString()
           
 java.lang.String getTransactionTypeString()
           
 int getTypeFormatId()
          Return my format identifier.
 java.lang.String getUsernameString()
           
 Xact getXact()
           
(package private)  TransactionId getXid()
          get instance variables
(package private)  boolean isPrepared()
           
(package private)  boolean isRecovery()
           
(package private)  boolean isUpdate()
           
 boolean needExclusion()
           
(package private)  void prepareTransaction()
           
 void readExternal(java.io.ObjectInput in)
           
(package private)  void removeUpdateTransaction()
           
(package private)  void setXact(Xact xact)
           
 java.lang.String toString()
           
(package private)  void unsetRecoveryStatus()
           
(package private)  void updateTransactionStatus(Xact xact, int status, int attribute)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xid

private TransactionId xid

gid

private GlobalTransactionId gid

firstLog

private LogInstant firstLog

lastLog

private LogInstant lastLog

transactionStatus

private int transactionStatus

myxact

private transient Xact myxact

update

private transient boolean update

recovery

private transient boolean recovery

needExclusion

private transient boolean needExclusion

isClone

private boolean isClone

lcc

private transient LanguageConnectionContext lcc

UPDATE

static final int UPDATE
See Also:
Constant Field Values

RECOVERY

static final int RECOVERY
See Also:
Constant Field Values

EXCLUDE

static final int EXCLUDE
See Also:
Constant Field Values
Constructor Detail

TransactionTableEntry

TransactionTableEntry(Xact xact,
                      TransactionId tid,
                      int status,
                      int attribute)

TransactionTableEntry

public TransactionTableEntry()
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.lang.ClassNotFoundException
java.io.IOException

setXact

void setXact(Xact xact)

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

updateTransactionStatus

void updateTransactionStatus(Xact xact,
                             int status,
                             int attribute)

removeUpdateTransaction

void removeUpdateTransaction()

unsetRecoveryStatus

void unsetRecoveryStatus()

prepareTransaction

void prepareTransaction()

getXid

TransactionId getXid()
get instance variables


getGid

public final GlobalTransactionId getGid()

getFirstLog

LogInstant getFirstLog()

getLastLog

LogInstant getLastLog()

getXact

public final Xact getXact()

getTransactionStatus

int getTransactionStatus()

isUpdate

boolean isUpdate()

isRecovery

boolean isRecovery()

isPrepared

boolean isPrepared()

needExclusion

public boolean needExclusion()

getTransactionIdString

public java.lang.String getTransactionIdString()
Methods of TransactionInfo

Specified by:
getTransactionIdString in interface TransactionInfo

getGlobalTransactionIdString

public java.lang.String getGlobalTransactionIdString()
Specified by:
getGlobalTransactionIdString in interface TransactionInfo

getUsernameString

public java.lang.String getUsernameString()
Specified by:
getUsernameString in interface TransactionInfo

getTransactionTypeString

public java.lang.String getTransactionTypeString()
Specified by:
getTransactionTypeString in interface TransactionInfo

getTransactionStatusString

public java.lang.String getTransactionStatusString()
Specified by:
getTransactionStatusString in interface TransactionInfo

getStatementTextString

public java.lang.String getStatementTextString()
Specified by:
getStatementTextString in interface TransactionInfo

getFirstLogInstantString

public java.lang.String getFirstLogInstantString()
Specified by:
getFirstLogInstantString in interface TransactionInfo

getlcc

private void getlcc()

clone

protected java.lang.Object clone()
Cloneable

Overrides:
clone in class java.lang.Object

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.