org.apache.ignite.configuration

## Class DataStorageConfiguration

- java.lang.Object
- - org.apache.ignite.configuration.DataStorageConfiguration

All Implemented Interfaces:
  Serializable

    public class DataStorageConfiguration
    extends Object
    implements Serializable

A durable memory configuration for an Apache Ignite node. The durable memory is a manageable off-heap based memory architecture that divides all expandable data regions into pages of fixed size (see `getPageSize()`). An individual page can store one or many cache key-value entries that allows reusing the memory in the most efficient way and avoid memory fragmentation issues.

By default, the durable memory allocates a single expandable data region with default settings. All the caches that will be configured in an application will be mapped to this data region by default, thus, all the cache data will reside in that data region. Parameters of default data region can be changed by setting `setDefaultDataRegionConfiguration(DataRegionConfiguration)`. Other data regions (except default) can be configured with `setDataRegionConfigurations(DataRegionConfiguration...)`.

Data region can be used in memory-only mode, or in persistent mode, when memory is used as a caching layer for disk. Persistence for data region can be turned on with `DataRegionConfiguration.setPersistenceEnabled(boolean)` flag. To learn more about data regions refer to `DataRegionConfiguration` documentation.

Sample configuration below shows how to make 5 GB data regions the default one for Apache Ignite:

         <property name="dataStorageConfiguration">
             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
                 <property name="systemCacheInitialSize" value="#{100 * 1024 * 1024}"/>

                 <property name="defaultDataRegionConfiguration">
                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                         <property name="name" value="default_data_region"/>
                         <property name="initialSize" value="#{5 * 1024 * 1024 * 1024}"/>
                     </bean>
                 </property>
             </bean>
         </property>

See Also:
  Serialized Form

### Field Summary

Fields
`static int` `DFLT_CHECKPOINT_FREQ`
`static int` `DFLT_CHECKPOINT_THREADS` Default number of checkpoint threads.
`static CheckpointWriteOrder` `DFLT_CHECKPOINT_WRITE_ORDER` Default checkpoint write order.
`static String` `DFLT_DATA_REG_DEFAULT_NAME` This name is assigned to default Dataregion if no user-defined default MemPlc is specified
`static long` `DFLT_DATA_REGION_INITIAL_SIZE` Default data region start size (256 MB).
`static long` `DFLT_DATA_REGION_MAX_SIZE` Default data region's size is 20% of physical memory available on current machine.
`static int` `DFLT_LOCK_WAIT_TIME` Lock default wait time, 10 sec.
`static boolean` `DFLT_METRICS_ENABLED`
`static int` `DFLT_PAGE_SIZE` Default memory page size.
`static int` `DFLT_RATE_TIME_INTERVAL_MILLIS` Default length of interval over which rate-based metric is calculated.
`static int` `DFLT_SUB_INTERVALS` Default amount of sub intervals to calculate rate-based metric.
`static int` `DFLT_TLB_SIZE` Default thread local buffer size.
`static boolean` `DFLT_WAL_ALWAYS_WRITE_FULL_PAGES` Default wal always write full pages.
`static String` `DFLT_WAL_ARCHIVE_PATH` Default wal archive directory.
`static int` `DFLT_WAL_BUFF_SIZE` Default thread local buffer size.
`static boolean` `DFLT_WAL_COMPACTION_ENABLED` Default wal compaction enabled.
`static int` `DFLT_WAL_FLUSH_FREQ` Default Wal flush frequency.
`static int` `DFLT_WAL_FSYNC_DELAY` Default wal fsync delay.
`static int` `DFLT_WAL_HISTORY_SIZE` Default number of checkpoints to be kept in WAL after checkpoint is finished
`static WALMode` `DFLT_WAL_MODE` Default wal mode.
`static String` `DFLT_WAL_PATH` Default wal directory.
`static int` `DFLT_WAL_RECORD_ITERATOR_BUFFER_SIZE` Default wal record iterator buffer size.
`static int` `DFLT_WAL_SEGMENT_SIZE` Default WAL file segment size, 64MBytes
`static int` `DFLT_WAL_SEGMENTS`
`static boolean` `DFLT_WRITE_THROTTLING_ENABLED` Default write throttling enabled.

### Constructor Summary

Constructors
Constructor and Description
`DataStorageConfiguration()`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getCheckpointFrequency()` Gets checkpoint frequency.
`int` `getCheckpointThreads()` Gets a number of threads to use for the checkpoint purposes.
`CheckpointWriteOrder` `getCheckpointWriteOrder()` This property defines order of writing pages to disk storage during checkpoint.
`int` `getConcurrencyLevel()` Returns the number of concurrent segments in Ignite internal page mapping tables.
`DataRegionConfiguration[]` `getDataRegionConfigurations()` Gets an array of all data regions configured.
`DataRegionConfiguration` `getDefaultDataRegionConfiguration()`
`FileIOFactory` `getFileIOFactory()` Factory to provide implementation of FileIO interface which is used for data storage files read/write operations
`long` `getLockWaitTime()` Timeout in milliseconds to wait when acquiring persistence store lock file before failing the local node.
`long` `getMetricsRateTimeInterval()` Gets the length of the time interval for rate-based metrics.
`int` `getMetricsSubIntervalCount()` Gets the number of sub-intervals to split the `getMetricsRateTimeInterval()` into to track the update history.
`int` `getPageSize()` The page memory consists of one or more expandable data regions defined by `DataRegionConfiguration`.
`String` `getStoragePath()` Returns a path the root directory where the Persistent Store will persist data and indexes.
`long` `getSystemRegionInitialSize()` Initial size of a data region reserved for system cache.
`long` `getSystemRegionMaxSize()` Maximum data region size reserved for system cache.
`String` `getWalArchivePath()` Gets a path to the WAL archive directory.
`long` `getWalAutoArchiveAfterInactivity()`
`int` `getWalBufferSize()` Property defines size of WAL buffer.
`long` `getWalFlushFrequency()` This property define how often WAL will be fsync-ed in `BACKGROUND` mode.
`long` `getWalFsyncDelayNanos()` Property that allows to trade latency for throughput in `WALMode.FSYNC` mode.
`int` `getWalHistorySize()` Gets a total number of checkpoints to keep in the WAL history.
`WALMode` `getWalMode()` Property that defines behavior of wal fsync.
`String` `getWalPath()` Gets a path to the directory where WAL is stored.
`int` `getWalRecordIteratorBufferSize()` Property define how many bytes iterator read from disk (for one reading), during go ahead wal.
`int` `getWalSegments()` Gets a number of WAL segments to work with.
`int` `getWalSegmentSize()` Gets size of a WAL segment in bytes.
`int` `getWalThreadLocalBufferSize()` Property for size of thread local buffer.
`boolean` `isAlwaysWriteFullPages()` Gets flag that enforces writing full page to WAL on every change (instead of delta record).
`boolean` `isMetricsEnabled()` Gets flag indicating whether persistence metrics collection is enabled.
`boolean` `isWalCompactionEnabled()`
`boolean` `isWriteThrottlingEnabled()` Gets flag indicating whether write throttling is enabled.
`DataStorageConfiguration` `setAlwaysWriteFullPages(boolean alwaysWriteFullPages)` Sets flag that enforces writing full page to WAL on every change (instead of delta record).
`DataStorageConfiguration` `setCheckpointFrequency(long checkpointFreq)` Sets the checkpoint frequency which is a minimal interval when the dirty pages will be written to the Persistent Store.
`DataStorageConfiguration` `setCheckpointThreads(int checkpointThreads)` Sets a number of threads to use for the checkpoint purposes.
`DataStorageConfiguration` `setCheckpointWriteOrder(CheckpointWriteOrder checkpointWriteOrder)` This property defines order of writing pages to disk storage during checkpoint.
`DataStorageConfiguration` `setConcurrencyLevel(int concLvl)` Sets the number of concurrent segments in Ignite internal page mapping tables.
`DataStorageConfiguration` `setDataRegionConfigurations(DataRegionConfiguration... dataRegionConfigurations)` Sets data regions configurations.
`DataStorageConfiguration` `setDefaultDataRegionConfiguration(DataRegionConfiguration dfltDataRegConf)` Overrides configuration of default data region which is created automatically.
`DataStorageConfiguration` `setFileIOFactory(FileIOFactory fileIOFactory)` Sets factory to provide implementation of FileIO interface which is used for data storage files read/write operations
`DataStorageConfiguration` `setLockWaitTime(long lockWaitTime)` Timeout in milliseconds to wait when acquiring persistence store lock file before failing the local node.
`DataStorageConfiguration` `setMetricsEnabled(boolean metricsEnabled)` Sets flag indicating whether persistence metrics collection is enabled.
`DataStorageConfiguration` `setMetricsRateTimeInterval(long metricsRateTimeInterval)` Sets the length of the time interval for rate-based metrics.
`DataStorageConfiguration` `setMetricsSubIntervalCount(int metricsSubIntervalCnt)` Sets the number of sub-intervals to split the `getMetricsRateTimeInterval()` into to track the update history.
`DataStorageConfiguration` `setPageSize(int pageSize)` Changes the page size.
`DataStorageConfiguration` `setStoragePath(String persistenceStorePath)` Sets a path to the root directory where the Persistent Store will persist data and indexes.
`DataStorageConfiguration` `setSystemRegionInitialSize(long sysRegionInitSize)` Sets initial size of a data region reserved for system cache.
`DataStorageConfiguration` `setSystemRegionMaxSize(long sysCacheMaxSize)` Sets maximum data region size reserved for system cache.
`DataStorageConfiguration` `setWalArchivePath(String walArchivePath)` Sets a path for the WAL archive directory.
`DataStorageConfiguration` `setWalAutoArchiveAfterInactivity(long walAutoArchiveAfterInactivity)` Note: setting this value with `WALMode.FSYNC` may generate file size overhead for WAL segments in case grid is used rarely.
`DataStorageConfiguration` `setWalBufferSize(int walBuffSize)`
`DataStorageConfiguration` `setWalCompactionEnabled(boolean walCompactionEnabled)` Sets flag indicating whether WAL compaction is enabled.
`DataStorageConfiguration` `setWalFlushFrequency(long walFlushFreq)` This property define how often WAL will be fsync-ed in `BACKGROUND` mode.
`DataStorageConfiguration` `setWalFsyncDelayNanos(long walFsyncDelayNanos)` Sets property that allows to trade latency for throughput in `WALMode.FSYNC` mode.
`DataStorageConfiguration` `setWalHistorySize(int walHistSize)` Sets a total number of checkpoints to keep in the WAL history.
`DataStorageConfiguration` `setWalMode(WALMode walMode)` Sets property that defines behavior of wal fsync.
`DataStorageConfiguration` `setWalPath(String walStorePath)` Sets a path to the directory where WAL is stored.
`DataStorageConfiguration` `setWalRecordIteratorBufferSize(int walRecordIterBuffSize)` Sets property defining how many bytes iterator read from disk (for one reading), during go ahead wal.
`DataStorageConfiguration` `setWalSegments(int walSegments)` Sets a number of WAL segments to work with.
`DataStorageConfiguration` `setWalSegmentSize(int walSegmentSize)` Sets size of a WAL segment.
`DataStorageConfiguration` `setWalThreadLocalBufferSize(int walTlbSize)` Sets size of thread local buffer.
`DataStorageConfiguration` `setWriteThrottlingEnabled(boolean writeThrottlingEnabled)` Sets flag indicating whether write throttling is enabled.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DFLT_DATA_REGION_INITIAL_SIZE

    public static final long DFLT_DATA_REGION_INITIAL_SIZE

Default data region start size (256 MB).

See Also:
  Constant Field Values

#### DFLT_DATA_REGION_MAX_SIZE

    public static final long DFLT_DATA_REGION_MAX_SIZE

Default data region's size is 20% of physical memory available on current machine.

#### DFLT_PAGE_SIZE

    public static final int DFLT_PAGE_SIZE

Default memory page size.

See Also:
  Constant Field Values

#### DFLT_DATA_REG_DEFAULT_NAME

    public static final String DFLT_DATA_REG_DEFAULT_NAME

This name is assigned to default Dataregion if no user-defined default MemPlc is specified

See Also:
  Constant Field Values

#### DFLT_CHECKPOINT_FREQ

    public static final int DFLT_CHECKPOINT_FREQ

See Also:
  Constant Field Values

#### DFLT_LOCK_WAIT_TIME

    public static final int DFLT_LOCK_WAIT_TIME

Lock default wait time, 10 sec.

See Also:
  Constant Field Values

#### DFLT_METRICS_ENABLED

    public static final boolean DFLT_METRICS_ENABLED

See Also:
  Constant Field Values

#### DFLT_SUB_INTERVALS

    public static final int DFLT_SUB_INTERVALS

Default amount of sub intervals to calculate rate-based metric.

See Also:
  Constant Field Values

#### DFLT_RATE_TIME_INTERVAL_MILLIS

    public static final int DFLT_RATE_TIME_INTERVAL_MILLIS

Default length of interval over which rate-based metric is calculated.

See Also:
  Constant Field Values

#### DFLT_CHECKPOINT_THREADS

    public static final int DFLT_CHECKPOINT_THREADS

Default number of checkpoint threads.

See Also:
  Constant Field Values

#### DFLT_CHECKPOINT_WRITE_ORDER

    public static final CheckpointWriteOrder DFLT_CHECKPOINT_WRITE_ORDER

Default checkpoint write order.

#### DFLT_WAL_HISTORY_SIZE

    public static final int DFLT_WAL_HISTORY_SIZE

Default number of checkpoints to be kept in WAL after checkpoint is finished

See Also:
  Constant Field Values

#### DFLT_WAL_SEGMENTS

    public static final int DFLT_WAL_SEGMENTS

See Also:
  Constant Field Values

#### DFLT_WAL_SEGMENT_SIZE

    public static final int DFLT_WAL_SEGMENT_SIZE

Default WAL file segment size, 64MBytes

See Also:
  Constant Field Values

#### DFLT_WAL_MODE

    public static final WALMode DFLT_WAL_MODE

Default wal mode.

#### DFLT_TLB_SIZE

    public static final int DFLT_TLB_SIZE

Default thread local buffer size.

See Also:
  Constant Field Values

#### DFLT_WAL_BUFF_SIZE

    public static final int DFLT_WAL_BUFF_SIZE

Default thread local buffer size.

See Also:
  Constant Field Values

#### DFLT_WAL_FLUSH_FREQ

    public static final int DFLT_WAL_FLUSH_FREQ

Default Wal flush frequency.

See Also:
  Constant Field Values

#### DFLT_WAL_FSYNC_DELAY

    public static final int DFLT_WAL_FSYNC_DELAY

Default wal fsync delay.

See Also:
  Constant Field Values

#### DFLT_WAL_RECORD_ITERATOR_BUFFER_SIZE

    public static final int DFLT_WAL_RECORD_ITERATOR_BUFFER_SIZE

Default wal record iterator buffer size.

See Also:
  Constant Field Values

#### DFLT_WAL_ALWAYS_WRITE_FULL_PAGES

    public static final boolean DFLT_WAL_ALWAYS_WRITE_FULL_PAGES

Default wal always write full pages.

See Also:
  Constant Field Values

#### DFLT_WAL_PATH

    public static final String DFLT_WAL_PATH

Default wal directory.

See Also:
  Constant Field Values

#### DFLT_WAL_ARCHIVE_PATH

    public static final String DFLT_WAL_ARCHIVE_PATH

Default wal archive directory.

See Also:
  Constant Field Values

#### DFLT_WRITE_THROTTLING_ENABLED

    public static final boolean DFLT_WRITE_THROTTLING_ENABLED

Default write throttling enabled.

See Also:
  Constant Field Values

#### DFLT_WAL_COMPACTION_ENABLED

    public static final boolean DFLT_WAL_COMPACTION_ENABLED

Default wal compaction enabled.

See Also:
  Constant Field Values

### Constructor Detail

#### DataStorageConfiguration

    public DataStorageConfiguration()

### Method Detail

#### getSystemRegionInitialSize

    public long getSystemRegionInitialSize()

Initial size of a data region reserved for system cache.

Returns:
  Size in bytes.

#### setSystemRegionInitialSize

    public DataStorageConfiguration setSystemRegionInitialSize(long sysRegionInitSize)

Sets initial size of a data region reserved for system cache. Default value is `DFLT_SYS_CACHE_INIT_SIZE`

Parameters:
  `sysRegionInitSize` - Size in bytes.
Returns:
  `this` for chaining.

#### getSystemRegionMaxSize

    public long getSystemRegionMaxSize()

Maximum data region size reserved for system cache.

Returns:
  Size in bytes.

#### setSystemRegionMaxSize

    public DataStorageConfiguration setSystemRegionMaxSize(long sysCacheMaxSize)

Sets maximum data region size reserved for system cache. The total size should not be less than 10 MB due to internal data structures overhead.

Parameters:
  `sysCacheMaxSize` - Maximum size in bytes for system cache data region.
Returns:
  `this` for chaining.

#### getPageSize

    public int getPageSize()

The page memory consists of one or more expandable data regions defined by `DataRegionConfiguration`. Every data region is split on pages of fixed size that store actual cache entries.

Returns:
  Page size in bytes.

#### setPageSize

    public DataStorageConfiguration setPageSize(int pageSize)

Changes the page size.

Parameters:
  `pageSize` - Page size in bytes. If value is not set (or zero), `DFLT_PAGE_SIZE` will be used.

#### getDataRegionConfigurations

    public DataRegionConfiguration[] getDataRegionConfigurations()

Gets an array of all data regions configured. Apache Ignite will instantiate a dedicated data region per region. An Apache Ignite cache can be mapped to a specific region with `CacheConfiguration.setDataRegionName(String)` method.

Returns:
  Array of configured data regions.

#### setDataRegionConfigurations

    public DataStorageConfiguration setDataRegionConfigurations(DataRegionConfiguration... dataRegionConfigurations)

Sets data regions configurations.

Parameters:
  `dataRegionConfigurations` - Data regions configurations.

#### getConcurrencyLevel

    public int getConcurrencyLevel()

Returns the number of concurrent segments in Ignite internal page mapping tables. By default equals to the number of available CPUs.

Returns:
  Mapping table concurrency level.

#### setConcurrencyLevel

    public DataStorageConfiguration setConcurrencyLevel(int concLvl)

Sets the number of concurrent segments in Ignite internal page mapping tables.

Parameters:
  `concLvl` - Mapping table concurrency level.

#### getDefaultDataRegionConfiguration

    public DataRegionConfiguration getDefaultDataRegionConfiguration()

Returns:
  Configuration of default data region. All cache groups will reside in this data region by default. For assigning a custom data region to cache group, use `CacheConfiguration.setDataRegionName(String)`.

#### setDefaultDataRegionConfiguration

    public DataStorageConfiguration setDefaultDataRegionConfiguration(DataRegionConfiguration dfltDataRegConf)

Overrides configuration of default data region which is created automatically.

Parameters:
  `dfltDataRegConf` - Default data region configuration.

#### getStoragePath

    public String getStoragePath()

Returns a path the root directory where the Persistent Store will persist data and indexes.

#### setStoragePath

    public DataStorageConfiguration setStoragePath(String persistenceStorePath)

Sets a path to the root directory where the Persistent Store will persist data and indexes. By default the Persistent Store's files are located under Ignite work directory.

Parameters:
  `persistenceStorePath` - Persistence store path.

#### getCheckpointFrequency

    public long getCheckpointFrequency()

Gets checkpoint frequency.

Returns:
  checkpoint frequency in milliseconds.

#### setCheckpointFrequency

    public DataStorageConfiguration setCheckpointFrequency(long checkpointFreq)

Sets the checkpoint frequency which is a minimal interval when the dirty pages will be written to the Persistent Store. If the rate is high, checkpoint will be triggered more frequently.

Parameters:
  `checkpointFreq` - checkpoint frequency in milliseconds.
Returns:
  `this` for chaining.

#### getCheckpointThreads

    public int getCheckpointThreads()

Gets a number of threads to use for the checkpoint purposes.

Returns:
  Number of checkpoint threads.

#### setCheckpointThreads

    public DataStorageConfiguration setCheckpointThreads(int checkpointThreads)

Sets a number of threads to use for the checkpoint purposes.

Parameters:
  `checkpointThreads` - Number of checkpoint threads. Four threads are used by default.
Returns:
  `this` for chaining.

#### getLockWaitTime

    public long getLockWaitTime()

Timeout in milliseconds to wait when acquiring persistence store lock file before failing the local node.

Returns:
  Lock wait time in milliseconds.

#### setLockWaitTime

    public DataStorageConfiguration setLockWaitTime(long lockWaitTime)

Timeout in milliseconds to wait when acquiring persistence store lock file before failing the local node.

Parameters:
  `lockWaitTime` - Lock wait time in milliseconds.
Returns:
  `this` for chaining.

#### getWalHistorySize

    public int getWalHistorySize()

Gets a total number of checkpoints to keep in the WAL history.

Returns:
  Number of checkpoints to keep in WAL after a checkpoint is finished.

#### setWalHistorySize

    public DataStorageConfiguration setWalHistorySize(int walHistSize)

Sets a total number of checkpoints to keep in the WAL history.

Parameters:
  `walHistSize` - Number of checkpoints to keep after a checkpoint is finished.
Returns:
  `this` for chaining.

#### getWalSegments

    public int getWalSegments()

Gets a number of WAL segments to work with.

Returns:
  Number of work WAL segments.

#### setWalSegments

    public DataStorageConfiguration setWalSegments(int walSegments)

Sets a number of WAL segments to work with. For performance reasons, the whole WAL is split into files of fixed length called segments.

Parameters:
  `walSegments` - Number of WAL segments.
Returns:
  `this` for chaining.

#### getWalSegmentSize

    public int getWalSegmentSize()

Gets size of a WAL segment in bytes.

Returns:
  WAL segment size.

#### setWalSegmentSize

    public DataStorageConfiguration setWalSegmentSize(int walSegmentSize)

Sets size of a WAL segment.

Parameters:
  `walSegmentSize` - WAL segment size. 64 MB is used by default. Maximum value is 2Gb
Returns:
  `this` for chaining.

#### getWalPath

    public String getWalPath()

Gets a path to the directory where WAL is stored.

Returns:
  WAL persistence path, absolute or relative to Ignite work directory.

#### setWalPath

    public DataStorageConfiguration setWalPath(String walStorePath)

Sets a path to the directory where WAL is stored. If this path is relative, it will be resolved relatively to Ignite work directory.

Parameters:
  `walStorePath` - WAL persistence path, absolute or relative to Ignite work directory.
Returns:
  `this` for chaining.

#### getWalArchivePath

    public String getWalArchivePath()

Gets a path to the WAL archive directory.

Returns:
  WAL archive directory.

#### setWalArchivePath

    public DataStorageConfiguration setWalArchivePath(String walArchivePath)

Sets a path for the WAL archive directory. Every WAL segment will be fully copied to this directory before it can be reused for WAL purposes.

Parameters:
  `walArchivePath` - WAL archive directory.
Returns:
  `this` for chaining.

#### isMetricsEnabled

    public boolean isMetricsEnabled()

Gets flag indicating whether persistence metrics collection is enabled. Default value is `DFLT_METRICS_ENABLED`.

Returns:
  Metrics enabled flag.

#### setMetricsEnabled

    public DataStorageConfiguration setMetricsEnabled(boolean metricsEnabled)

Sets flag indicating whether persistence metrics collection is enabled.

Parameters:
  `metricsEnabled` - Metrics enabled flag.

#### isWriteThrottlingEnabled

    public boolean isWriteThrottlingEnabled()

Gets flag indicating whether write throttling is enabled.

#### setWriteThrottlingEnabled

    public DataStorageConfiguration setWriteThrottlingEnabled(boolean writeThrottlingEnabled)

Sets flag indicating whether write throttling is enabled.

Parameters:
  `writeThrottlingEnabled` - Write throttling enabled flag.

#### getMetricsRateTimeInterval

    public long getMetricsRateTimeInterval()

Gets the length of the time interval for rate-based metrics. This interval defines a window over which hits will be tracked. Default value is `DFLT_RATE_TIME_INTERVAL_MILLIS`.

Returns:
  Time interval in milliseconds.

#### setMetricsRateTimeInterval

    public DataStorageConfiguration setMetricsRateTimeInterval(long metricsRateTimeInterval)

Sets the length of the time interval for rate-based metrics. This interval defines a window over which hits will be tracked.

Parameters:
  `metricsRateTimeInterval` - Time interval in milliseconds.

#### getMetricsSubIntervalCount

    public int getMetricsSubIntervalCount()

Gets the number of sub-intervals to split the `getMetricsRateTimeInterval()` into to track the update history. Default value is `DFLT_SUB_INTERVALS`.

Returns:
  The number of sub-intervals for history tracking.

#### setMetricsSubIntervalCount

    public DataStorageConfiguration setMetricsSubIntervalCount(int metricsSubIntervalCnt)

Sets the number of sub-intervals to split the `getMetricsRateTimeInterval()` into to track the update history.

Parameters:
  `metricsSubIntervalCnt` - The number of sub-intervals for history tracking.

#### getWalMode

    public WALMode getWalMode()

Property that defines behavior of wal fsync. Different type provides different guarantees for consistency. See `WALMode` for details.

Returns:
  WAL mode.

#### setWalMode

    public DataStorageConfiguration setWalMode(WALMode walMode)

Sets property that defines behavior of wal fsync. Different type provides different guarantees for consistency. See `WALMode` for details.

Parameters:
  `walMode` - Wal mode.

#### getWalThreadLocalBufferSize

    public int getWalThreadLocalBufferSize()

Property for size of thread local buffer. Each thread which write to wal have thread local buffer for serialize recode before write in wal.

Returns:
  Thread local buffer size (in bytes).

#### setWalThreadLocalBufferSize

    public DataStorageConfiguration setWalThreadLocalBufferSize(int walTlbSize)

Sets size of thread local buffer. Each thread which write to wal have thread local buffer for serialize recode before write in wal.

Parameters:
  `walTlbSize` - Thread local buffer size (in bytes).

#### getWalBufferSize

    public int getWalBufferSize()

Property defines size of WAL buffer. Each WAL record will be serialized to this buffer before write in WAL file.

Returns:
  WAL buffer size.

#### setWalBufferSize

    public DataStorageConfiguration setWalBufferSize(int walBuffSize)

Parameters:
  `walBuffSize` - WAL buffer size.

#### getWalFlushFrequency

    public long getWalFlushFrequency()

This property define how often WAL will be fsync-ed in `BACKGROUND` mode. Ignored for all other WAL modes.

Returns:
  WAL flush frequency, in milliseconds.

#### setWalFlushFrequency

    public DataStorageConfiguration setWalFlushFrequency(long walFlushFreq)

This property define how often WAL will be fsync-ed in `BACKGROUND` mode. Ignored for all other WAL modes.

Parameters:
  `walFlushFreq` - WAL flush frequency, in milliseconds.

#### getWalFsyncDelayNanos

    public long getWalFsyncDelayNanos()

Property that allows to trade latency for throughput in `WALMode.FSYNC` mode. It limits minimum time interval between WAL fsyncs. First thread that initiates WAL fsync will wait for this number of nanoseconds, another threads will just wait fsync of first thread (similar to CyclicBarrier). Total throughput should increase under load as total WAL fsync rate will be limited.

#### setWalFsyncDelayNanos

    public DataStorageConfiguration setWalFsyncDelayNanos(long walFsyncDelayNanos)

Sets property that allows to trade latency for throughput in `WALMode.FSYNC` mode. It limits minimum time interval between WAL fsyncs. First thread that initiates WAL fsync will wait for this number of nanoseconds, another threads will just wait fsync of first thread (similar to CyclicBarrier). Total throughput should increase under load as total WAL fsync rate will be limited.

Parameters:
  `walFsyncDelayNanos` - Wal fsync delay, in nanoseconds.

#### getWalRecordIteratorBufferSize

    public int getWalRecordIteratorBufferSize()

Property define how many bytes iterator read from disk (for one reading), during go ahead wal.

Returns:
  Record iterator buffer size.

#### setWalRecordIteratorBufferSize

    public DataStorageConfiguration setWalRecordIteratorBufferSize(int walRecordIterBuffSize)

Sets property defining how many bytes iterator read from disk (for one reading), during go ahead wal.

Parameters:
  `walRecordIterBuffSize` - Wal record iterator buffer size.

#### isAlwaysWriteFullPages

    public boolean isAlwaysWriteFullPages()

Gets flag that enforces writing full page to WAL on every change (instead of delta record). Can be used for debugging purposes: every version of page will be present in WAL. Note that WAL will take several times more space in this mode.

#### setAlwaysWriteFullPages

    public DataStorageConfiguration setAlwaysWriteFullPages(boolean alwaysWriteFullPages)

Sets flag that enforces writing full page to WAL on every change (instead of delta record). Can be used for debugging purposes: every version of page will be present in WAL. Note that WAL will take several times more space in this mode.

Parameters:
  `alwaysWriteFullPages` - Always write full pages flag.

#### getFileIOFactory

    public FileIOFactory getFileIOFactory()

Factory to provide implementation of FileIO interface which is used for data storage files read/write operations

Returns:
  File I/O factory

#### setFileIOFactory

    public DataStorageConfiguration setFileIOFactory(FileIOFactory fileIOFactory)

Sets factory to provide implementation of FileIO interface which is used for data storage files read/write operations

Parameters:
  `fileIOFactory` - File I/O factory

#### setWalAutoArchiveAfterInactivity

    public DataStorageConfiguration setWalAutoArchiveAfterInactivity(long walAutoArchiveAfterInactivity)

Note: setting this value with `WALMode.FSYNC` may generate file size overhead for WAL segments in case grid is used rarely.

Parameters:
  `walAutoArchiveAfterInactivity` - time in millis to run auto archiving segment (even if incomplete) after last record logging.
  Positive value enables incomplete segment archiving after timeout (inactivity).
  Zero or negative value disables auto archiving.
Returns:
  current configuration instance for chaining

#### getWalAutoArchiveAfterInactivity

    public long getWalAutoArchiveAfterInactivity()

Returns:
  time in millis to run auto archiving WAL segment (even if incomplete) after last record log

#### getCheckpointWriteOrder

    public CheckpointWriteOrder getCheckpointWriteOrder()

This property defines order of writing pages to disk storage during checkpoint.

Returns:
  Checkpoint write order.

#### setCheckpointWriteOrder

    public DataStorageConfiguration setCheckpointWriteOrder(CheckpointWriteOrder checkpointWriteOrder)

This property defines order of writing pages to disk storage during checkpoint.

Parameters:
  `checkpointWriteOrder` - Checkpoint write order.

#### isWalCompactionEnabled

    public boolean isWalCompactionEnabled()

Returns:
  Flag indicating whether WAL compaction is enabled.

#### setWalCompactionEnabled

    public DataStorageConfiguration setWalCompactionEnabled(boolean walCompactionEnabled)

Sets flag indicating whether WAL compaction is enabled.

Parameters:
  `walCompactionEnabled` - Wal compaction enabled flag.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018