Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.iapi.store.raw.log
Interface Logger  view Logger download Logger.java


public interface Logger


Method Summary
 void flush(LogInstant where)
          Flush all unwritten log record up to the log instance indicated to disk.
 void flushAll()
          Flush all unwritten log to disk
 LogInstant logAndDo(org.apache.derby.iapi.store.raw.xact.RawTransaction xact, org.apache.derby.iapi.store.raw.Loggable operation)
          Log the loggable operation under the context of the transaction and then apply the operation to the RawStore.
 LogInstant logAndUndo(org.apache.derby.iapi.store.raw.xact.RawTransaction xact, org.apache.derby.iapi.store.raw.Compensation operation, LogInstant undoInstant, org.apache.derby.iapi.services.io.LimitObjectInput in)
          Log the compensation operation under the context of the transaction and then apply the undo to the RawStore.
 void reprepare(org.apache.derby.iapi.store.raw.xact.RawTransaction t, org.apache.derby.iapi.store.raw.xact.TransactionId undoId, LogInstant undoStopAt, LogInstant undoStartAt)
          During recovery re-prepare a transaction.
 void undo(org.apache.derby.iapi.store.raw.xact.RawTransaction t, org.apache.derby.iapi.store.raw.xact.TransactionId undoId, LogInstant undoStopAt, LogInstant undoStartAt)
          Undo transaction.
 

Method Detail

logAndDo

public LogInstant logAndDo(org.apache.derby.iapi.store.raw.xact.RawTransaction xact,
                           org.apache.derby.iapi.store.raw.Loggable operation)
                    throws org.apache.derby.iapi.error.StandardException
Log the loggable operation under the context of the transaction and then apply the operation to the RawStore.
Before you call this method, make sure that the Loggable's doMe method will succeed. This method will go ahead and send the log record to disk, and once it does that, then doMe cannot fail or the system will be shut down and recovery may fail. So it is very important to make sure that every resource you need for the loggable's doMe method, such as disk space, has be acquired or accounted for before calling logAndDo.


logAndUndo

public LogInstant logAndUndo(org.apache.derby.iapi.store.raw.xact.RawTransaction xact,
                             org.apache.derby.iapi.store.raw.Compensation operation,
                             LogInstant undoInstant,
                             org.apache.derby.iapi.services.io.LimitObjectInput in)
                      throws org.apache.derby.iapi.error.StandardException
Log the compensation operation under the context of the transaction and then apply the undo to the RawStore.
Before you call this method, make sure that the Compensation's doMe method will succeed. This method will go ahead and send the log record to disk, and once it does that, then doMe cannot fail or the system will be shut down and recovery may fail. So it is very important to make sure that every resource you need for the Compensation's doMe method, such as disk space, has be acquired or accounted for before calling logAndUnDo.


flush

public void flush(LogInstant where)
           throws org.apache.derby.iapi.error.StandardException
Flush all unwritten log record up to the log instance indicated to disk.


flushAll

public void flushAll()
              throws org.apache.derby.iapi.error.StandardException
Flush all unwritten log to disk


reprepare

public void reprepare(org.apache.derby.iapi.store.raw.xact.RawTransaction t,
                      org.apache.derby.iapi.store.raw.xact.TransactionId undoId,
                      LogInstant undoStopAt,
                      LogInstant undoStartAt)
               throws org.apache.derby.iapi.error.StandardException
During recovery re-prepare a transaction.

After redo() and undo(), this routine is called on all outstanding in-doubt (prepared) transactions. This routine re-acquires all logical write locks for operations in the xact, and then modifies the transaction table entry to make the transaction look as if it had just been prepared following startup after recovery.


undo

public void undo(org.apache.derby.iapi.store.raw.xact.RawTransaction t,
                 org.apache.derby.iapi.store.raw.xact.TransactionId undoId,
                 LogInstant undoStopAt,
                 LogInstant undoStartAt)
          throws org.apache.derby.iapi.error.StandardException
Undo transaction.