com.sleepycat.je.recovery
Class RecoveryManager
java.lang.Object
com.sleepycat.je.recovery.RecoveryManager
- public class RecoveryManager
- extends Object
Method Summary |
RecoveryInfo |
recover(boolean readOnly)
Look for an existing log and use it to create an in memory structure for
accessing existing databases. |
static boolean |
undo(Level traceLevel,
DatabaseImpl db,
TreeLocation location,
LN lnFromLog,
Key mainKey,
Key dupKey,
long logLsn,
long abortLsn,
boolean abortKnownDeleted,
RecoveryInfo info,
boolean splitsAllowed)
Undo the changes to this node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecoveryManager
public RecoveryManager(EnvironmentImpl env)
throws DatabaseException
- Make a recovery manager
recover
public RecoveryInfo recover(boolean readOnly)
throws DatabaseException
- Look for an existing log and use it to create an in memory structure for
accessing existing databases. The file manager and logging system are
only available after recovery.
- Returns:
- RecoveryInfo statistics about the recovery process.
- Throws:
DatabaseException
undo
public static boolean undo(Level traceLevel,
DatabaseImpl db,
TreeLocation location,
LN lnFromLog,
Key mainKey,
Key dupKey,
long logLsn,
long abortLsn,
boolean abortKnownDeleted,
RecoveryInfo info,
boolean splitsAllowed)
throws DatabaseException
- Undo the changes to this node. Here are the rules that govern the action
taken.
found LN in | abortLsn is | logLsn == | action taken
tree | null | LSN in tree | by undo
-------------+-------------+----------------------------------------
Y | N | Y | replace w/abort LSN
------------ +-------------+-----------------+-----------------------
Y | Y | Y | remove from tree
------------ +-------------+-----------------+-----------------------
Y | N/A | N | no action
------------ +-------------+-----------------+-----------------------
N | N/A | N/A | no action (*)
(*) If this key is not present in the tree, this record doesn't
reflect the IN state of the tree and this log entry is not applicable.
- Parameters:
location
- holds state about the search in the tree. Passed
in from the recovery manager to reduce objection creation overhead.lnFromLog
- - the new node to put in the tree.mainKey
- is the key that navigates us through the main treelogLsn
- is the LSN from the just-read log entryabortLsn
- gives us the location of the original version of the
nodeinfo
- is a recovery stats object.
- Throws:
DatabaseException
Copyright 2004 Sleepycat, Inc. All Rights Reserved.