public interface DiskStore
Instances of this interface are created using
DiskStoreFactory.create(java.lang.String)
. So to create a DiskStore
named myDiskStore
do this:
new DiskStoreFactory().create("myDiskStore");
Existing DiskStore instances can be found using GemFireCache.findDiskStore(String)
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys this disk store.
|
void |
flush()
Causes any data that is currently in the asynchronous queue to be written
to disk.
|
boolean |
forceCompaction()
Allows a disk compaction to be forced on this disk store.
|
void |
forceRoll()
Asks the disk store to start writing to a new oplog.
|
boolean |
getAllowForceCompaction()
Returns true if manual compaction of disk files is allowed on this region.
|
boolean |
getAutoCompact()
Returns true if the disk files are to be automatically compacted.
|
int |
getCompactionThreshold()
Returns the threshold at which an oplog will become compactable.
|
File[] |
getDiskDirs()
Returns the directories to which the region's data are written.
|
int[] |
getDiskDirSizes()
Returns the sizes of the disk directories in megabytes
|
UUID |
getDiskStoreUUID()
Returns the universally unique identifier for the Disk Store across the GemFire distributed system.
|
float |
getDiskUsageCriticalPercentage()
Returns the critical threshold for disk usage as a percentage of the total
disk volume.
|
float |
getDiskUsageWarningPercentage()
Returns the warning threshold for disk usage as a percentage of the total
disk volume.
|
long |
getMaxOplogSize()
Get the maximum size in megabytes a single oplog (operation log) file should be
|
String |
getName()
Get the name of the DiskStore
|
int |
getQueueSize()
Returns the maximum number of operations that can be asynchronously
queued to be written to disk.
|
long |
getTimeInterval()
Returns the number of milliseconds that can elapse before
unwritten data is written to disk.
|
int |
getWriteBufferSize()
Returns the size of the write buffer that this disk store will use when
writing data to disk.
|
void |
setDiskUsageCriticalPercentage(float criticalPercent)
Sets the value of the disk usage critical percentage.
|
void |
setDiskUsageWarningPercentage(float warningPercent)
Sets the value of the disk usage warning percentage.
|
String getName()
DiskStoreFactory.create(java.lang.String)
boolean getAutoCompact()
int getCompactionThreshold()
boolean getAllowForceCompaction()
forceCompaction()
.
Note that calls to forceCompaction()
will also be allowed if automatic compaction
is enabled.
long getMaxOplogSize()
long getTimeInterval()
int getWriteBufferSize()
File[] getDiskDirs()
int[] getDiskDirSizes()
UUID getDiskStoreUUID()
UUID
int getQueueSize()
DiskStore
configures synchronous writing, then
queueSize
is ignored.void flush()
DiskAccessException
- If problems are encounter while writing to diskvoid forceRoll()
DiskAccessException
saying that the disk is full will be
thrown.
If compaction is true then the application will wait for the other oplogs
to be compacted and more space to be created.DiskAccessException
boolean forceCompaction()
forceRoll()
will be made
so that the active oplog can be compacted.
This method will block until the compaction completes.
true
if one or more oplogs were compacted;
false
indicates that no oplogs were ready
to be compacted or that a compaction was already in progress.getAllowForceCompaction()
void destroy()
IllegalStateException
- if the disk store is currently
in use by any regions, gateway senders, or a PDX type registry.float getDiskUsageWarningPercentage()
float getDiskUsageCriticalPercentage()
void setDiskUsageWarningPercentage(float warningPercent)
warningPercent
- the warning percentvoid setDiskUsageCriticalPercentage(float criticalPercent)
criticalPercent
- the critical percentCopyright © 1997-2017 Pivotal Software, Inc. All rights reserved.