Top Description Fields Constructors Methods
org.apache.derby.impl.store.raw.xact

public Class TransactionTableEntry

extends Object
implements Formatable, TransactionInfo, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, org.apache.derby.iapi.store.access.TransactionInfo, org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.io.Formatable, .FormatIdUtil, .StoredFormatIds, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, .StatementContext, org.apache.derby.iapi.store.access.TransactionInfo, org.apache.derby.iapi.store.raw.GlobalTransactionId, org.apache.derby.iapi.store.raw.xact.TransactionId, org.apache.derby.iapi.store.raw.log.LogInstant, java.io.ObjectOutput, .ObjectInput, .IOException

Transaction table entry is used to store all relevant 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

Modifier and TypeField and Description
pack-priv static final int
private LogInstant
private GlobalTransactionId
private boolean
private LogInstant
private transient LanguageConnectionContext
private transient Xact
private transient boolean
private transient boolean
pack-priv static final int
private int
private transient boolean
pack-priv static final int
private TransactionId

Constructor Summary

AccessConstructor and Description
pack-priv
TransactionTableEntry(Xact xact, TransactionId tid, int status, int attribute)

public

Method Summary

Modifier and TypeMethod and Description
protected Object
clone()

Overrides java.lang.Object.clone.

Cloneable

pack-priv LogInstant
public String
public final GlobalTransactionId
public String
pack-priv LogInstant
private void
public String
public String
pack-priv int
public String
public String
public int
public String
public final Xact
pack-priv TransactionId
getXid()

get instance variables

pack-priv boolean
pack-priv boolean
pack-priv boolean
public boolean
pack-priv void
public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

pack-priv void
pack-priv void
setXact(Xact xact)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

pack-priv void
pack-priv void
updateTransactionStatus(Xact xact, int status, int attribute)

public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

EXCLUDEback to summary
pack-priv static final int EXCLUDE
firstLogback to summary
private LogInstant firstLog
gidback to summary
private GlobalTransactionId gid
isCloneback to summary
private boolean isClone
lastLogback to summary
private LogInstant lastLog
lccback to summary
private transient LanguageConnectionContext lcc
myxactback to summary
private transient Xact myxact
needExclusionback to summary
private transient boolean needExclusion
recoveryback to summary
private transient boolean recovery
RECOVERYback to summary
pack-priv static final int RECOVERY
transactionStatusback to summary
private int transactionStatus
updateback to summary
private transient boolean update
UPDATEback to summary
pack-priv static final int UPDATE
xidback to summary
private TransactionId xid

Constructor Detail

TransactionTableEntryback to summary
pack-priv TransactionTableEntry(Xact xact, TransactionId tid, int status, int attribute)
TransactionTableEntryback to summary
public TransactionTableEntry()

Method Detail

cloneback to summary
protected Object clone()

Overrides java.lang.Object.clone.

Cloneable

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

getFirstLogback to summary
pack-priv LogInstant getFirstLog()
getFirstLogInstantStringback to summary
public String getFirstLogInstantString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getFirstLogInstantString.

getGidback to summary
public final GlobalTransactionId getGid()
getGlobalTransactionIdStringback to summary
public String getGlobalTransactionIdString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getGlobalTransactionIdString.

getLastLogback to summary
pack-priv LogInstant getLastLog()
getlccback to summary
private void getlcc()
getStatementTextStringback to summary
public String getStatementTextString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getStatementTextString.

getTransactionIdStringback to summary
public String getTransactionIdString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getTransactionIdString.

Methods of TransactionInfo

getTransactionStatusback to summary
pack-priv int getTransactionStatus()
getTransactionStatusStringback to summary
public String getTransactionStatusString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getTransactionStatusString.

getTransactionTypeStringback to summary
public String getTransactionTypeString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getTransactionTypeString.

getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Return my format identifier.

Returns:int

Doc from org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

The identifier. (A UUID stuffed in an array of 16 bytes).

getUsernameStringback to summary
public String getUsernameString()

Implements org.apache.derby.iapi.store.access.TransactionInfo.getUsernameString.

getXactback to summary
public final Xact getXact()
getXidback to summary
pack-priv TransactionId getXid()

get instance variables

isPreparedback to summary
pack-priv boolean isPrepared()
isRecoveryback to summary
pack-priv boolean isRecovery()
isUpdateback to summary
pack-priv boolean isUpdate()
needExclusionback to summary
public boolean needExclusion()
prepareTransactionback to summary
pack-priv void prepareTransaction()
readExternalback to summary
public void readExternal(ObjectInput in) throws ClassNotFoundException, IOException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

the stream to read data from in order to restore the object

Exceptions
ClassNotFoundException:
If the class for an object being restored cannot be found.
IOException:
if I/O errors occur
removeUpdateTransactionback to summary
pack-priv void removeUpdateTransaction()
setXactback to summary
pack-priv void setXact(Xact xact)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

unsetRecoveryStatusback to summary
pack-priv void unsetRecoveryStatus()
updateTransactionStatusback to summary
pack-priv void updateTransactionStatus(Xact xact, int status, int attribute)
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

the stream to write the object to

Exceptions
IOException:
Includes any I/O exceptions that may occur