public interface DiskStoreFactory
DiskStore. To get an instance of this factory call
GemFireCache.createDiskStoreFactory(). If all you want to do is find an existing disk store see
GemFireCache.findDiskStore(java.lang.String).
To use this factory configure it with the set methods and then call create(java.lang.String)
to produce a disk store instance.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_ALLOW_FORCE_COMPACTION
The default value of the allow force compaction attribute.
|
static boolean |
DEFAULT_AUTO_COMPACT
The default setting for auto compaction.
|
static int |
DEFAULT_COMPACTION_THRESHOLD
The default compaction threshold.
|
static int |
DEFAULT_DISK_DIR_SIZE
The default disk directory size in megabytes.
|
static int[] |
DEFAULT_DISK_DIR_SIZES
The default disk directory sizes.
|
static File[] |
DEFAULT_DISK_DIRS
The default disk directories.
|
static String |
DEFAULT_DISK_STORE_NAME
The name of the default disk store is "DEFAULT".
|
static float |
DEFAULT_DISK_USAGE_CRITICAL_PERCENTAGE
The default disk usage critical percentage.
|
static float |
DEFAULT_DISK_USAGE_WARNING_PERCENTAGE
The default disk usage warning percentage.
|
static long |
DEFAULT_MAX_OPLOG_SIZE
The default maximum oplog file size in megabytes.
|
static int |
DEFAULT_QUEUE_SIZE
The default maximum number of operations that can be asynchronously queued.
|
static long |
DEFAULT_TIME_INTERVAL
The default time interval in milliseconds.
|
static int |
DEFAULT_WRITE_BUFFER_SIZE
The default write buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
DiskStore |
create(String name)
Create a new disk store or find an existing one.
|
DiskStoreFactory |
setAllowForceCompaction(boolean allowForceCompaction)
Set to
true to allow DiskStore.forceCompaction() to be called on regions
using this disk store. |
DiskStoreFactory |
setAutoCompact(boolean isAutoCompact)
Set to
true to cause the disk files to be automatically compacted. |
DiskStoreFactory |
setCompactionThreshold(int compactionThreshold)
Sets the threshold at which an oplog will become compactable.
|
DiskStoreFactory |
setDiskDirs(File[] diskDirs)
Sets the directories to which this disk store's data is written.
|
DiskStoreFactory |
setDiskDirsAndSizes(File[] diskDirs,
int[] diskDirSizes)
Sets the directories to which this disk store's data is written and also set the sizes in
megabytes of each directory.
|
DiskStoreFactory |
setDiskUsageCriticalPercentage(float criticalPercent)
Sets the critical threshold for disk usage as a percentage of the total disk volume.
|
DiskStoreFactory |
setDiskUsageWarningPercentage(float warningPercent)
Sets the warning threshold for disk usage as a percentage of the total disk volume.
|
DiskStoreFactory |
setMaxOplogSize(long maxOplogSize)
Sets the maximum size in megabytes a single oplog (operation log) is allowed to be.
|
DiskStoreFactory |
setQueueSize(int queueSize)
Sets the maximum number of operations that can be asynchronously queued.
|
DiskStoreFactory |
setTimeInterval(long timeInterval)
Sets the number of milliseconds that can elapse before data written asynchronously is flushed
to disk.
|
DiskStoreFactory |
setWriteBufferSize(int writeBufferSize)
Sets the write buffer size in bytes.
|
static final String DEFAULT_DISK_STORE_NAME
static final boolean DEFAULT_AUTO_COMPACT
Current value: true.
static final int DEFAULT_COMPACTION_THRESHOLD
Current value: 50.
static final boolean DEFAULT_ALLOW_FORCE_COMPACTION
Current value: false.
static final long DEFAULT_MAX_OPLOG_SIZE
Current value: 1024 which is one gigabyte.
static final long DEFAULT_TIME_INTERVAL
Current value: 1000.
static final int DEFAULT_WRITE_BUFFER_SIZE
Current value: 32768.
static final int DEFAULT_QUEUE_SIZE
Current value: 0.
static final File[] DEFAULT_DISK_DIRS
Current value: current directory.
static final int DEFAULT_DISK_DIR_SIZE
Current value: 2,147,483,647 which is two petabytes.
static final int[] DEFAULT_DISK_DIR_SIZES
Current value: DEFAULT_DISK_DIR_SIZE which is two petabytes each.
static final float DEFAULT_DISK_USAGE_WARNING_PERCENTAGE
Current value: 90.
static final float DEFAULT_DISK_USAGE_CRITICAL_PERCENTAGE
Current value: 99.
DiskStoreFactory setAutoCompact(boolean isAutoCompact)
true to cause the disk files to be automatically compacted. Set to
false if no compaction is needed or manual compaction will be used.isAutoCompact - if true then use auto compactionthisDiskStoreFactory setCompactionThreshold(int compactionThreshold)
compactionThreshold - percentage of remaining live data in the oplog at which an oplog is
compactablethisDiskStoreFactory setAllowForceCompaction(boolean allowForceCompaction)
true to allow DiskStore.forceCompaction() to be called on regions
using this disk store.allowForceCompaction - if true then allow force compaction.thisDiskStoreFactory setMaxOplogSize(long maxOplogSize)
maxOplogSize - maximum size in megabytes for one single oplog file.thisDiskStoreFactory setTimeInterval(long timeInterval)
For how to configure a region to be asynchronous see:
AttributesFactory.setDiskSynchronous(boolean).
timeInterval - number of milliseconds that can elapse before async data is flushed to
disk.thisDiskStoreFactory setWriteBufferSize(int writeBufferSize)
writeBufferSize - write buffer size in bytes.thisDiskStoreFactory setQueueSize(int queueSize)
For how to configure a region to be asynchronous see:
AttributesFactory.setDiskSynchronous(boolean).
queueSize - number of operations that can be asynchronously queued. If 0, the queue will
be unlimited.thisDiskStoreFactory setDiskDirs(File[] diskDirs)
DEFAULT_DISK_DIR_SIZE.diskDirs - directories to put the oplog files.thisDiskStoreFactory setDiskDirsAndSizes(File[] diskDirs, int[] diskDirSizes)
diskDirs - directories to put the oplog files.diskDirSizes - sizes of disk directories in megabytesthisIllegalArgumentException - if length of the size array does not match to the length of
the dir arrayDiskStoreFactory setDiskUsageWarningPercentage(float warningPercent)
warningPercent - warning percent of disk usagethisDiskStoreFactory setDiskUsageCriticalPercentage(float criticalPercent)
criticalPercent - critical percent of disk usagethisDiskStore create(String name)
name - the name of the DiskStoreIllegalStateException - if a disk store with the given name already exists and its
configuration is not consistent with this factory.