Modifier and Type | Class and Description |
---|---|
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 and Description |
---|
PreloadConfig()
Default configuration used if null is passed to
Database.preload . |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setInternalMemoryLimitVoid(long internalMemoryLimit) |
PreloadConfig |
setLoadLNs(boolean loadLNs)
Configure the preload load LNs option.
|
void |
setLoadLNsVoid(boolean loadLNs) |
PreloadConfig |
setLSNBatchSize(long lsnBatchSize)
Set the maximum number of LSNs to gather and sort at any one time.
|
void |
setLSNBatchSizeVoid(long lsnBatchSize) |
PreloadConfig |
setMaxBytes(long maxBytes)
Configure the maximum number of bytes to preload.
|
void |
setMaxBytesVoid(long maxBytes) |
PreloadConfig |
setMaxMillisecs(long maxMillisecs)
Configure the maximum number of milliseconds to execute preload.
|
void |
setMaxMillisecsVoid(long maxMillisecs) |
PreloadConfig |
setProgressListener(ProgressListener<PreloadConfig.Phases> progressListener)
Configure the preload operation to make periodic calls to a
ProgressListener to provide feedback on preload progress. |
void |
setProgressListenerVoid(ProgressListener<PreloadConfig.Phases> progressListener) |
String |
toString()
Returns the values for each configuration attribute.
|
public PreloadConfig()
Database.preload
.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 void setMaxBytesVoid(long maxBytes)
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 void setMaxMillisecsVoid(long maxMillisecs)
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 void setLoadLNsVoid(boolean loadLNs)
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 void setProgressListenerVoid(ProgressListener<PreloadConfig.Phases> progressListener)
public ProgressListener<PreloadConfig.Phases> getProgressListener()
public PreloadConfig setLSNBatchSize(long lsnBatchSize)
lsnBatchSize
- the maximum number of LSNs to accumulate and sort
per batch.public void setLSNBatchSizeVoid(long lsnBatchSize)
public long getLSNBatchSize()
public PreloadConfig setInternalMemoryLimit(long internalMemoryLimit)
internalMemoryLimit
- the maximum number of non JE Cache bytes to
use.public void setInternalMemoryLimitVoid(long internalMemoryLimit)
public long getInternalMemoryLimit()
public PreloadConfig clone()
Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.