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

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

public class BeginXact
extends java.lang.Object
implements Loggable

This operation indicates the beginning of a transaction.

See Also:
Loggable, Serialized Form

Field Summary
protected  int transactionStatus
           
protected  GlobalTransactionId xactId
           
 
Fields inherited from interface org.apache.derby.iapi.store.raw.Loggable
ABORT, BI_LOG, CHECKSUM, COMMIT, COMPENSATION, FILE_RESOURCE, FIRST, LAST, PREPARE, RAWSTORE, XA_NEEDLOCK
 
Constructor Summary
BeginXact()
           
BeginXact(GlobalTransactionId xid, int s)
           
 
Method Summary
 void doMe(Transaction xact, LogInstant instant, LimitObjectInput in)
          Apply the change indicated by this operation and optional data.
 GlobalTransactionId getGlobalId()
          BeginXact method
 ByteArray getPreparedLog()
          the default for prepared log is always null for all the operations that don't have optionalData.
 int getTypeFormatId()
          Return my format identifier.
 int group()
          BeginXact is both a FIRST and a RAWSTORE log record
 boolean needsRedo(Transaction xact)
          Always redo a BeginXact.
 void readExternal(java.io.ObjectInput in)
           
 void releaseResource(Transaction xact)
          BeginXact has no resource to release
 java.lang.String toString()
          DEBUG: Print self.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transactionStatus

protected int transactionStatus

xactId

protected GlobalTransactionId xactId
Constructor Detail

BeginXact

public BeginXact(GlobalTransactionId xid,
                 int s)

BeginXact

public BeginXact()
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.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

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

doMe

public void doMe(Transaction xact,
                 LogInstant instant,
                 LimitObjectInput in)
Apply the change indicated by this operation and optional data.

Specified by:
doMe in interface Loggable
Parameters:
xact - the Transaction
instant - the log instant of this operation
in - optional data

getPreparedLog

public ByteArray getPreparedLog()
the default for prepared log is always null for all the operations that don't have optionalData. If an operation has optional data, the operation need to prepare the optional data for this method. BeginXact has no optional data to write out

Specified by:
getPreparedLog in interface Loggable
See Also:
ObjectOutput

needsRedo

public boolean needsRedo(Transaction xact)
Always redo a BeginXact.

Specified by:
needsRedo in interface Loggable
Parameters:
xact - The transaction trying to redo this operation
Returns:
true if operation needs redoing, false if not.
See Also:
Loggable.releaseResource(org.apache.derby.iapi.store.raw.Transaction)

releaseResource

public void releaseResource(Transaction xact)
BeginXact has no resource to release

Specified by:
releaseResource in interface Loggable

group

public int group()
BeginXact is both a FIRST and a RAWSTORE log record

Specified by:
group in interface Loggable

toString

public java.lang.String toString()
DEBUG: Print self.

Overrides:
toString in class java.lang.Object

getGlobalId

public GlobalTransactionId getGlobalId()
BeginXact method


Built on Thu 2011-03-10 11:54:14+0000, from revision ???

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