org.apache.derby.impl.store.raw.log
Class CheckpointOperation

java.lang.Object
  extended byorg.apache.derby.impl.store.raw.log.CheckpointOperation
All Implemented Interfaces:
java.io.Externalizable, Formatable, Loggable, java.io.Serializable, TypedFormat

public class CheckpointOperation
extends java.lang.Object
implements Loggable

A Log Operation that represents a checkpoint.

See Also:
Loggable, Serialized Form

Field Summary
protected  long redoLWM
           
protected  Formatable transactionTable
           
protected  long undoLWM
           
 
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
CheckpointOperation()
           
CheckpointOperation(long redoLWM, long undoLWM, Formatable ttab)
           
 
Method Summary
 void doMe(Transaction xact, LogInstant instant, LimitObjectInput in)
          Nothing to do unless we are rollforward recovery; Redoing of checkpoints during rollforward recovery allows us to restart the roll-forward recovery from the last checkpoint redone during rollforward recovery, if we happen to crash during the roll-forward recovery process.
 ByteArray getPreparedLog()
          the default for prepared log is always null for all the operations that don't have optionalData.
 Formatable getTransactionTable()
           
 int getTypeFormatId()
          Return my format identifier.
 int group()
          Checkpoint is a raw store operation
 boolean needsRedo(Transaction xact)
          Checkpoint does not need to be redone unless we are doing rollforward recovery.
 void readExternal(java.io.ObjectInput in)
           
 long redoLWM()
          Access attributes of the checkpoint record
 void releaseResource(Transaction xact)
          Checkpoint has not resource to release
 java.lang.String toString()
          DEBUG: Print self.
 long undoLWM()
           
 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

redoLWM

protected long redoLWM

undoLWM

protected long undoLWM

transactionTable

protected Formatable transactionTable
Constructor Detail

CheckpointOperation

public CheckpointOperation(long redoLWM,
                           long undoLWM,
                           Formatable ttab)

CheckpointOperation

public CheckpointOperation()
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)
          throws StandardException
Nothing to do unless we are rollforward recovery; Redoing of checkpoints during rollforward recovery allows us to restart the roll-forward recovery from the last checkpoint redone during rollforward recovery, if we happen to crash during the roll-forward recovery process. Another reason why we need to do this is dropped table stub files removed at checkpoint because the containerids may have been reused after a checkpoint if the system was rebooted.

Specified by:
doMe in interface Loggable
Parameters:
xact - the Transaction
instant - the log instant of this operation
in - optional data
Throws:
StandardException - Standard Cloudscape policy.

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. Checkpoint has no optional data to write out

Specified by:
getPreparedLog in interface Loggable

needsRedo

public boolean needsRedo(Transaction xact)
Checkpoint does not need to be redone unless we are doing rollforward recovery.

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)
Checkpoint has not resource to release

Specified by:
releaseResource in interface Loggable

group

public int group()
Checkpoint is a raw store operation

Specified by:
group in interface Loggable

redoLWM

public long redoLWM()
Access attributes of the checkpoint record


undoLWM

public long undoLWM()

getTransactionTable

public Formatable getTransactionTable()

toString

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


Built on Tue 2006-10-10 19:23:47+0200, from revision exported

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.