|
Berkeley DB Java Edition version 5.0.34 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.PreloadConfig
public class PreloadConfig
Specifies the attributes of an application invoked preload operation.
Nested Class Summary | |
---|---|
static class |
PreloadConfig.Phases
Preload progress listeners report this phase value, along with a count of the number if times that the preload has fetched from disk. |
Constructor Summary | |
---|---|
PreloadConfig()
Default configuration used if null is passed to Database.preload . |
Method Summary | |
---|---|
PreloadConfig |
clone()
Returns a copy of this configuration object. |
long |
getInternalMemoryLimit()
Returns the maximum amount of non JE Cache Memory that preload can use at one time. |
boolean |
getLoadLNs()
Return the configuration of the preload load LNs option. |
long |
getLSNBatchSize()
Preload is implemented to optimize I/O cost by fetching the records of a Database by disk order, so that disk access is are sequential rather than random. |
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. |
ProgressListener<PreloadConfig.Phases> |
getProgressListener()
Return the ProgressListener for this PreloadConfig. |
PreloadConfig |
setInternalMemoryLimit(long internalMemoryLimit)
Set the maximum amount of non JE Cache Memory that preload can use at one time. |
PreloadConfig |
setLoadLNs(boolean loadLNs)
Configure the preload load LNs option. |
PreloadConfig |
setLSNBatchSize(long lsnBatchSize)
Set the maximum number of LSNs to gather and sort at any one time. |
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. |
PreloadConfig |
setProgressListener(ProgressListener<PreloadConfig.Phases> progressListener)
Configure the preload operation to make periodic calls to a ProgressListener to provide feedback on preload progress. |
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 |
---|
public PreloadConfig()
Database.preload
.
Method Detail |
---|
public PreloadConfig setMaxBytes(long maxBytes)
The default is 0 for this class.
maxBytes
- If the maxBytes parameter is non-zero, a preload will
stop when the cache contains this number of bytes.
public long getMaxBytes()
This method may be called at any time during the life of the application.
public PreloadConfig setMaxMillisecs(long maxMillisecs)
The default is 0 for this class.
maxMillisecs
- If the maxMillisecs parameter is non-zero, a preload
will stop when this amount of time has passed.
public long getMaxMillisecs()
This method may be called at any time during the life of the application.
public PreloadConfig setLoadLNs(boolean loadLNs)
The default is false for this class.
loadLNs
- If set to true, the preload will load Leaf Nodes (LNs)
containing the data values.
public boolean getLoadLNs()
public PreloadConfig setProgressListener(ProgressListener<PreloadConfig.Phases> progressListener)
ProgressListener
to provide feedback on preload progress.
The ProgressListener.progress() method is called each time the preload
mush fetch a btree node or data record from disk.
When using progress listeners, review the information at ProgressListener.progress(T, long, long)
to avoid any unintended disruption to
replication stream syncup.
progressListener
- The ProgressListener to callback during
preload.public ProgressListener<PreloadConfig.Phases> getProgressListener()
public PreloadConfig setLSNBatchSize(long lsnBatchSize)
lsnBatchSize
- the maximum number of LSNs to accumulate and sort
per batch.
public long getLSNBatchSize()
public PreloadConfig setInternalMemoryLimit(long internalMemoryLimit)
internalMemoryLimit
- the maximum number of non JE Cache bytes to
use.
public long getInternalMemoryLimit()
public PreloadConfig clone()
clone
in class Object
public String toString()
toString
in class Object
|
Berkeley DB Java Edition version 5.0.34 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |