Berkeley DB Java Edition
version 4.1.6

com.sleepycat.je
Class CheckpointConfig

java.lang.Object
  extended by com.sleepycat.je.CheckpointConfig
All Implemented Interfaces:
Cloneable

public class CheckpointConfig
extends Object
implements Cloneable

Specifies the attributes of a checkpoint operation invoked from Environment.checkpoint.


Field Summary
static CheckpointConfig DEFAULT
          Default configuration used if null is passed to Environment.checkpoint.
 
Constructor Summary
CheckpointConfig()
          An instance created using the default constructor is initialized with the system's default settings.
 
Method Summary
 CheckpointConfig clone()
          Returns a copy of this configuration object.
 boolean getForce()
          Returns the configuration of the checkpoint force option.
 int getKBytes()
          Returns the checkpoint log data threshold, in kilobytes.
 boolean getMinimizeRecoveryTime()
          Returns the configuration of the minimize recovery time option.
 int getMinutes()
          Returns the checkpoint time threshold, in minutes.
 CheckpointConfig setForce(boolean force)
          Configures the checkpoint force option.
 CheckpointConfig setKBytes(int kbytes)
          Configures the checkpoint log data threshold, in kilobytes.
 CheckpointConfig setMinimizeRecoveryTime(boolean minimizeRecoveryTime)
          Configures the minimize recovery time option.
 CheckpointConfig setMinutes(int minutes)
          Configures the checkpoint time threshold, in minutes.
 String toString()
          Returns the values for each configuration attribute.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final CheckpointConfig DEFAULT
Default configuration used if null is passed to Environment.checkpoint.

Constructor Detail

CheckpointConfig

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

Method Detail

setKBytes

public CheckpointConfig setKBytes(int kbytes)
Configures 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.
Returns:
this

getKBytes

public int getKBytes()
Returns 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 CheckpointConfig setMinutes(int minutes)
Configures 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.
Returns:
this

getMinutes

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

Returns:
The checkpoint time threshold, in minutes.

setForce

public CheckpointConfig setForce(boolean force)
Configures 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.
Returns:
this

getForce

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

Returns:
The configuration of the checkpoint force option.

setMinimizeRecoveryTime

public CheckpointConfig setMinimizeRecoveryTime(boolean minimizeRecoveryTime)
Configures the minimize recovery time option.

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

Parameters:
minimizeRecoveryTime - If set to true, the checkpoint will itself take longer but will cause a subsequent recovery (Environment.open) to finish more quickly.
Returns:
this

getMinimizeRecoveryTime

public boolean getMinimizeRecoveryTime()
Returns the configuration of the minimize recovery time option.

Returns:
The configuration of the minimize recovery time option.

clone

public CheckpointConfig clone()
Returns a copy of this configuration object.

Overrides:
clone in class Object

toString

public String toString()
Returns the values for each configuration attribute.

Overrides:
toString in class Object
Returns:
the values for each configuration attribute.

Berkeley DB Java Edition
version 4.1.6

Copyright (c) 2004-2010 Oracle. All rights reserved.