Berkeley DB Java Edition
version 4.1.6

com.sleepycat.je
Class PreloadConfig

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

public class PreloadConfig
extends Object
implements Cloneable

Specifies the attributes of an application invoked preload operation.


Constructor Summary
PreloadConfig()
          Default configuration used if null is passed to Database.preload.
 
Method Summary
 PreloadConfig clone()
          Returns a copy of this configuration object.
 boolean getLoadLNs()
          Return the configuration of the preload load LNs option.
 long getMaxBytes()
          Return the number of bytes in the cache to stop the preload at.
 long getMaxMillisecs()
          Return the number of millisecs to stop the preload after.
 PreloadConfig setLoadLNs(boolean loadLNs)
          Configure the preload load LNs option.
 PreloadConfig setMaxBytes(long maxBytes)
          Configure the maximum number of bytes to preload.
 PreloadConfig setMaxMillisecs(long maxMillisecs)
          Configure the maximum number of milliseconds to execute preload.
 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
 

Constructor Detail

PreloadConfig

public PreloadConfig()
Default configuration used if null is passed to Database.preload.

Method Detail

setMaxBytes

public PreloadConfig setMaxBytes(long maxBytes)
Configure the maximum number of bytes to preload.

The default is 0 for this class.

Parameters:
maxBytes - If the maxBytes parameter is non-zero, a preload will stop when the cache contains this number of bytes.
Returns:
this

getMaxBytes

public long getMaxBytes()
Return the number of bytes in the cache to stop the preload at.

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

Returns:
The number of bytes in the cache to stop the preload at.

setMaxMillisecs

public PreloadConfig setMaxMillisecs(long maxMillisecs)
Configure the maximum number of milliseconds to execute preload.

The default is 0 for this class.

Parameters:
maxMillisecs - If the maxMillisecs parameter is non-zero, a preload will stop when this amount of time has passed.
Returns:
this

getMaxMillisecs

public long getMaxMillisecs()
Return the number of millisecs to stop the preload after.

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

Returns:
The number of millisecs to stop the preload after.

setLoadLNs

public PreloadConfig setLoadLNs(boolean loadLNs)
Configure the preload load LNs option.

The default is false for this class.

Parameters:
loadLNs - If set to true, the preload will load Leaf Nodes (LNs) containing the data values.
Returns:
this

getLoadLNs

public boolean getLoadLNs()
Return the configuration of the preload load LNs option.

Returns:
The configuration of the preload load LNs option.

clone

public PreloadConfig 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.