Class CheckpointConfig

java.lang.Object
com.sleepycat.db.CheckpointConfig

public class CheckpointConfig extends Object
Specifies the attributes of an application invoked checkpoint operation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CheckpointConfig
    Default configuration used if null is passed to Environment.checkpoint.
  • Constructor Summary

    Constructors
    Constructor
    Description
    An instance created using the default constructor is initialized with the system's default settings.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return the configuration of the checkpoint force option.
    int
    Return the checkpoint log data threshold, in kilobytes.
    int
    Return the checkpoint time threshold, in minutes.
    void
    setForce(boolean force)
    Configure the checkpoint force option.
    void
    setKBytes(int kbytes)
    Configure the checkpoint log data threshold, in kilobytes.
    void
    setMinutes(int minutes)
    Configure the checkpoint time threshold, in minutes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • CheckpointConfig

      public CheckpointConfig()
      An instance created using the default constructor is initialized with the system's default settings.
  • Method Details

    • setKBytes

      public void setKBytes(int kbytes)
      Configure the checkpoint log data threshold, in kilobytes.

      The default is 0 for this class and the database environment.

      Parameters:
      kbytes - If the kbytes parameter is non-zero, a checkpoint will be performed if more than kbytes of log data have been written since the last checkpoint.
    • getKBytes

      public int getKBytes()
      Return the checkpoint log data threshold, in kilobytes.

      This method may be called at any time during the life of the application.

      Returns:
      The checkpoint log data threshold, in kilobytes.
    • setMinutes

      public void setMinutes(int minutes)
      Configure the checkpoint time threshold, in minutes.

      The default is 0 for this class and the database environment.

      Parameters:
      minutes - If the minutes parameter is non-zero, a checkpoint is performed if more than min minutes have passed since the last checkpoint.
    • getMinutes

      public int getMinutes()
      Return the checkpoint time threshold, in minutes.

      Returns:
      The checkpoint time threshold, in minutes.
    • setForce

      public void setForce(boolean force)
      Configure the checkpoint force option.

      The default is false for this class and the BDB JE environment.

      Parameters:
      force - If set to true, force a checkpoint, even if there has been no activity since the last checkpoint.
    • getForce

      public boolean getForce()
      Return the configuration of the checkpoint force option.

      Returns:
      The configuration of the checkpoint force option.