-
Language:
English
-
Language:
English
12.2.3. File Cache Store Configuration (Library Mode)
In JBoss Data Grid's Library mode, configure a File Cache Store within the loaders element as follows:
<loaders> ... <fileStore location="${java.io.tmpdir}" streamBufferSize="${SIZE}" fsyncMode="${DEFAULT/PER_WRITE/PERIODIC}" fsyncInterval="${TIME}" /> ... </loaders>
The
fileStore
element is used to configure the File Cache Store with the following parameters:
- The
location
parameter provides a location on the disk where the file store can write internal files. The default value for this parameter is theInfinispan-Filestore
directory in the working directory. - The
streamBufferSize
parameter sets the size of the buffered stream used to write the state to the disk. Larger buffer sizes result in faster performance but occupy more temporary memory. The default value for this parameter is8192
bytes. - The
fsyncMode
parameter sets how the file changes synchronize with the underlying file system. Valid values for this parameter areDEFAULT
(synchronize when the operating system buffer is full or when the bucket is read),PER_WRITE
(synchronize after each write request) andPERIODIC
(synchronizes after a defined interval or just before a bucket is read). - The
fsyncInterval
parameter specifies the time period after which the file changes in the cache are flushed. This parameter is used only when the periodic fsync mode is in use. The default value for this parameter is1
second.