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 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
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.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)
-
-
-
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 interfacejava.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 interfacejava.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 interfaceTypedFormat
- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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:
getTransactionIdString
in interfaceTransactionInfo
-
getGlobalTransactionIdString
public java.lang.String getGlobalTransactionIdString()
- Specified by:
getGlobalTransactionIdString
in interfaceTransactionInfo
-
getUsernameString
public java.lang.String getUsernameString()
- Specified by:
getUsernameString
in interfaceTransactionInfo
-
getTransactionTypeString
public java.lang.String getTransactionTypeString()
- Specified by:
getTransactionTypeString
in interfaceTransactionInfo
-
getTransactionStatusString
public java.lang.String getTransactionStatusString()
- Specified by:
getTransactionStatusString
in interfaceTransactionInfo
-
getStatementTextString
public java.lang.String getStatementTextString()
- Specified by:
getStatementTextString
in interfaceTransactionInfo
-
getFirstLogInstantString
public java.lang.String getFirstLogInstantString()
- Specified by:
getFirstLogInstantString
in interfaceTransactionInfo
-
getlcc
private void getlcc()
-
clone
protected java.lang.Object clone()
Cloneable- Overrides:
clone
in classjava.lang.Object
-
-