|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.utilint.DaemonThread
com.sleepycat.je.recovery.Checkpointer
public class Checkpointer
The Checkpointer looks through the tree for internal nodes that must be flushed to the log. Checkpoint flushes must be done in ascending order from the bottom of the tree up.
Nested Class Summary | |
---|---|
static class |
Checkpointer.CheckpointReference
|
static class |
Checkpointer.FlushStats
A struct to hold log flushing stats for checkpoint and database sync. |
Field Summary |
---|
Fields inherited from class com.sleepycat.je.utilint.DaemonThread |
---|
name, nWakeupRequests, stifleExceptionChatter, workQueue, workQueueLatch |
Constructor Summary | |
---|---|
Checkpointer(EnvironmentImpl envImpl,
long waitTime,
java.lang.String name)
|
Method Summary | |
---|---|
void |
clearEnv()
|
void |
doCheckpoint(CheckpointConfig config,
boolean flushAll,
java.lang.String invokingSource)
The real work to do a checkpoint. |
long |
getFirstActiveLsn()
|
int |
getHighestFlushLevel()
|
static long |
getWakeupPeriod(DbConfigManager configManager)
Figure out the wakeup period. |
void |
initIntervals(long lastCheckpointEnd,
long lastCheckpointMillis)
Initializes the checkpoint intervals when no checkpoint is performed while opening the environment. |
void |
loadStats(StatsConfig config,
EnvironmentStats stat)
Load stats. |
protected int |
nDeadlockRetries()
Return the number of retries when a deadlock exception occurs. |
protected void |
onWakeup()
Called whenever the DaemonThread wakes up from a sleep. |
void |
setCheckpointId(long lastCheckpointId)
Set checkpoint id -- can only be done after recovery. |
void |
setFirstActiveLsn(long lastFirstActiveLsn)
Initialize the FirstActiveLsn during recovery. |
static void |
syncDatabase(EnvironmentImpl envImpl,
DatabaseImpl dbImpl,
boolean flushLog)
Flush a given database to disk. |
void |
wakeupAfterWrite()
Wakes up the checkpointer if a checkpoint log interval is configured and the number of bytes written since the last checkpoint exeeds the size of the interval. |
Methods inherited from class com.sleepycat.je.utilint.DaemonThread |
---|
addToQueue, addToQueueAlreadyLatched, getNWakeupRequests, getQueueSize, getThread, isPaused, isRunning, isShutdownRequested, requestShutdown, run, runOrPause, shutdown, toString, wakeup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Checkpointer(EnvironmentImpl envImpl, long waitTime, java.lang.String name) throws DatabaseException
DatabaseException
Method Detail |
---|
public void initIntervals(long lastCheckpointEnd, long lastCheckpointMillis)
public int getHighestFlushLevel()
public static long getWakeupPeriod(DbConfigManager configManager) throws java.lang.IllegalArgumentException, DatabaseException
java.lang.IllegalArgumentException
DatabaseException
public void setCheckpointId(long lastCheckpointId)
public void loadStats(StatsConfig config, EnvironmentStats stat) throws DatabaseException
DatabaseException
public long getFirstActiveLsn()
public void setFirstActiveLsn(long lastFirstActiveLsn)
public void clearEnv()
protected int nDeadlockRetries() throws DatabaseException
nDeadlockRetries
in class DaemonThread
DatabaseException
protected void onWakeup() throws DatabaseException
onWakeup
in class DaemonThread
DatabaseException
public void wakeupAfterWrite()
public void doCheckpoint(CheckpointConfig config, boolean flushAll, java.lang.String invokingSource) throws DatabaseException
flushAll
- if true, this checkpoint must flush all the way to
the top of the dbtree, instead of stopping at the highest level
last modified.invokingSource
- a debug aid, to indicate who invoked this
checkpoint. (i.e. recovery, the checkpointer daemon, the cleaner,
programatically)
DatabaseException
public static void syncDatabase(EnvironmentImpl envImpl, DatabaseImpl dbImpl, boolean flushLog) throws DatabaseException
DatabaseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |