/** Invoke a checkpoint programatically. Note that only one checkpoint may run at a time. */
  public boolean invokeCheckpoint(CheckpointConfig config, boolean flushAll, String invokingSource)
      throws DatabaseException {

    if (checkpointer != null) {
      checkpointer.doCheckpoint(config, flushAll, invokingSource);
      return true;
    } else {
      return false;
    }
  }
Ejemplo n.º 2
0
  /** Called whenever the DaemonThread wakes up from a sleep. */
  protected void onWakeup() throws DatabaseException {

    if (envImpl.isClosed()) {
      return;
    }

    doCheckpoint(
        CheckpointConfig.DEFAULT,
        true, // allowDeltas
        false, // flushAll
        false, // deleteAllCleanedFiles
        "daemon");
  }