Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.store.raw.xact
Class TransactionTableEntry  view TransactionTableEntry download TransactionTableEntry.java

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

public class TransactionTableEntry
extends java.lang.Object
implements org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.store.access.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.


Field Summary
(package private) static int EXCLUDE
           
private  org.apache.derby.iapi.store.raw.log.LogInstant firstLog
           
private  org.apache.derby.iapi.store.raw.GlobalTransactionId gid
           
private  boolean isClone
           
private  org.apache.derby.iapi.store.raw.log.LogInstant lastLog
           
private  org.apache.derby.iapi.sql.conn.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  org.apache.derby.iapi.store.raw.xact.TransactionId xid
           
 
Constructor Summary
  TransactionTableEntry()
           
(package private) TransactionTableEntry(Xact xact, org.apache.derby.iapi.store.raw.xact.TransactionId tid, int status, int attribute)
           
 
Method Summary
protected  java.lang.Object clone()
          Cloneable
(package private)  org.apache.derby.iapi.store.raw.log.LogInstant getFirstLog()
           
 java.lang.String getFirstLogInstantString()
           
 org.apache.derby.iapi.store.raw.GlobalTransactionId getGid()
           
 java.lang.String getGlobalTransactionIdString()
           
(package private)  org.apache.derby.iapi.store.raw.log.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)  org.apache.derby.iapi.store.raw.xact.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)
          This method restores an object's state by reading in the instance data for the object from the passed in stream.
(package private)  void removeUpdateTransaction()
           
(package private)  void setXact(Xact xact)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
(package private)  void unsetRecoveryStatus()
           
(package private)  void updateTransactionStatus(Xact xact, int status, int attribute)
           
 void writeExternal(java.io.ObjectOutput out)
          This method is responsible for writing the instance data of an object to the passed in stream.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xid

private org.apache.derby.iapi.store.raw.xact.TransactionId xid

gid

private org.apache.derby.iapi.store.raw.GlobalTransactionId gid

firstLog

private org.apache.derby.iapi.store.raw.log.LogInstant firstLog

lastLog

private org.apache.derby.iapi.store.raw.log.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 org.apache.derby.iapi.sql.conn.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,
                      org.apache.derby.iapi.store.raw.xact.TransactionId tid,
                      int status,
                      int attribute)

TransactionTableEntry

public TransactionTableEntry()
Method Detail

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Description copied from interface: java.io.Externalizable
This method is responsible for writing the instance data of an object to the passed in stream. Note that this stream is not a subclass of OutputStream, but rather is a class that implements the ObjectOutput interface. That interface provides a number of methods for writing Java data values to a stream.

Not that the implementation of this method must be coordinated with the implementation of readExternal.

Specified by:
writeExternal in interface java.io.Externalizable

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Description copied from interface: java.io.Externalizable
This method restores an object's state by reading in the instance data for the object from the passed in stream. Note that this stream is not a subclass of InputStream, but rather is a class that implements the ObjectInput interface. That interface provides a mechanism for reading in Java data types from a stream.

Note that this method must be compatible with writeExternal. It must read back the exact same types that were written by that method in the exact order they were written.

If this method needs to read back an object instance, then the class for that object must be found and loaded. If that operation fails, then this method throws a ClassNotFoundException

Specified by:
readExternal in interface java.io.Externalizable

setXact

void setXact(Xact xact)

getTypeFormatId

public int getTypeFormatId()
Return my format identifier.

Specified by:
getTypeFormatId in interface org.apache.derby.iapi.services.io.TypedFormat

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


updateTransactionStatus

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

removeUpdateTransaction

void removeUpdateTransaction()

unsetRecoveryStatus

void unsetRecoveryStatus()

prepareTransaction

void prepareTransaction()

getXid

org.apache.derby.iapi.store.raw.xact.TransactionId getXid()
get instance variables


getGid

public final org.apache.derby.iapi.store.raw.GlobalTransactionId getGid()

getFirstLog

org.apache.derby.iapi.store.raw.log.LogInstant getFirstLog()

getLastLog

org.apache.derby.iapi.store.raw.log.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 org.apache.derby.iapi.store.access.TransactionInfo

getGlobalTransactionIdString

public java.lang.String getGlobalTransactionIdString()
Specified by:
getGlobalTransactionIdString in interface org.apache.derby.iapi.store.access.TransactionInfo

getUsernameString

public java.lang.String getUsernameString()
Specified by:
getUsernameString in interface org.apache.derby.iapi.store.access.TransactionInfo

getTransactionTypeString

public java.lang.String getTransactionTypeString()
Specified by:
getTransactionTypeString in interface org.apache.derby.iapi.store.access.TransactionInfo

getTransactionStatusString

public java.lang.String getTransactionStatusString()
Specified by:
getTransactionStatusString in interface org.apache.derby.iapi.store.access.TransactionInfo

getStatementTextString

public java.lang.String getStatementTextString()
Specified by:
getStatementTextString in interface org.apache.derby.iapi.store.access.TransactionInfo

getFirstLogInstantString

public java.lang.String getFirstLogInstantString()
Specified by:
getFirstLogInstantString in interface org.apache.derby.iapi.store.access.TransactionInfo

getlcc

private void getlcc()

clone

protected java.lang.Object clone()
Cloneable