Class TransactionTableEntry
- java.lang.Object
-
- 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 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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intEXCLUDEprivate LogInstantfirstLogprivate GlobalTransactionIdgidprivate booleanisCloneprivate LogInstantlastLogprivate LanguageConnectionContextlccprivate Xactmyxactprivate booleanneedExclusionprivate booleanrecovery(package private) static intRECOVERYprivate inttransactionStatusprivate booleanupdate(package private) static intUPDATEprivate TransactionIdxid
-
Constructor Summary
Constructors Constructor Description TransactionTableEntry()TransactionTableEntry(Xact xact, TransactionId tid, int status, int attribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Objectclone()Cloneable(package private) LogInstantgetFirstLog()java.lang.StringgetFirstLogInstantString()GlobalTransactionIdgetGid()java.lang.StringgetGlobalTransactionIdString()(package private) LogInstantgetLastLog()private voidgetlcc()java.lang.StringgetStatementTextString()java.lang.StringgetTransactionIdString()Methods of TransactionInfo(package private) intgetTransactionStatus()java.lang.StringgetTransactionStatusString()java.lang.StringgetTransactionTypeString()intgetTypeFormatId()Return my format identifier.java.lang.StringgetUsernameString()XactgetXact()(package private) TransactionIdgetXid()get instance variables(package private) booleanisPrepared()(package private) booleanisRecovery()(package private) booleanisUpdate()booleanneedExclusion()(package private) voidprepareTransaction()voidreadExternal(java.io.ObjectInput in)(package private) voidremoveUpdateTransaction()(package private) voidsetXact(Xact xact)java.lang.StringtoString()(package private) voidunsetRecoveryStatus()(package private) voidupdateTransactionStatus(Xact xact, int status, int attribute)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
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:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.lang.ClassNotFoundException, java.io.IOException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.lang.ClassNotFoundExceptionjava.io.IOException
-
setXact
void setXact(Xact xact)
-
getTypeFormatId
public int getTypeFormatId()
Return my format identifier.- Specified by:
getTypeFormatIdin interfaceTypedFormat- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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:
getTransactionIdStringin interfaceTransactionInfo
-
getGlobalTransactionIdString
public java.lang.String getGlobalTransactionIdString()
- Specified by:
getGlobalTransactionIdStringin interfaceTransactionInfo
-
getUsernameString
public java.lang.String getUsernameString()
- Specified by:
getUsernameStringin interfaceTransactionInfo
-
getTransactionTypeString
public java.lang.String getTransactionTypeString()
- Specified by:
getTransactionTypeStringin interfaceTransactionInfo
-
getTransactionStatusString
public java.lang.String getTransactionStatusString()
- Specified by:
getTransactionStatusStringin interfaceTransactionInfo
-
getStatementTextString
public java.lang.String getStatementTextString()
- Specified by:
getStatementTextStringin interfaceTransactionInfo
-
getFirstLogInstantString
public java.lang.String getFirstLogInstantString()
- Specified by:
getFirstLogInstantStringin interfaceTransactionInfo
-
getlcc
private void getlcc()
-
clone
protected java.lang.Object clone()
Cloneable- Overrides:
clonein classjava.lang.Object
-
-