public class CheckpointConfig extends Object implements Cloneable
Environment.checkpoint
.Modifier and Type | Field and Description |
---|---|
static CheckpointConfig |
DEFAULT
Default configuration used if null is passed to
Environment.checkpoint . |
Constructor and Description |
---|
CheckpointConfig()
An instance created using the default constructor is initialized with
the system's default settings.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final CheckpointConfig DEFAULT
Environment.checkpoint
.public CheckpointConfig()
public CheckpointConfig setKBytes(int kBytes)
The default is 0 for this class and the database environment.
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.public int getKBytes()
This method may be called at any time during the life of the application.
public CheckpointConfig setMinutes(int minutes)
The default is 0 for this class and the database environment.
minutes
- If the minutes parameter is non-zero, a checkpoint is
performed if more than min minutes have passed since the last
checkpoint.public int getMinutes()
public CheckpointConfig setForce(boolean force)
The default is false for this class and the BDB JE environment.
force
- If set to true, force a checkpoint, even if there has
been no activity since the last checkpoint.public boolean getForce()
public CheckpointConfig setMinimizeRecoveryTime(boolean minimizeRecoveryTime)
The default is false for this class and the BDB JE environment.
minimizeRecoveryTime
- If set to true, the checkpoint will itself
take longer but will cause a subsequent recovery (Environment.open) to
finish more quickly.public boolean getMinimizeRecoveryTime()
public CheckpointConfig clone()
Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.