Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.management.configuration
Interface GenericFileStoreMBean

All Superinterfaces:
ConfigurationMBean, DescriptorBean, DynamicMBean, MBeanRegistration, NotificationBroadcaster, SettableBean, WebLogicMBean
All Known Subinterfaces:
DefaultFileStoreMBean, FileStoreMBean, JMSFileStoreMBean

public interface GenericFileStoreMBean
extends ConfigurationMBean

This MBean defines common parameters for file stores. It is the parent of FileStoreMBean and the deprecated JMSFileStoreMBean.


Field Summary
static String SYNCWRITE_CACHEFLUSH
           
static String SYNCWRITE_DIRECTWRITE
           
static String SYNCWRITE_DIRECTWRITEWITHCACHE
           
static String SYNCWRITE_DISABLED
           
 
Fields inherited from interface weblogic.management.configuration.ConfigurationMBean
DEFAULT_EMPTY_BYTE_ARRAY
 
Method Summary
 int getBlockSize()
          The smallest addressable block, in bytes, of a file.
 String getCacheDirectory()
          The location of the cache directory for Direct-Write-With-Cache, ignored for other policies.
 String getDirectory()
          The path name to the file system directory where the file store maintains its data files.
 long getInitialSize()
          The initial file size, in bytes.
 int getIoBufferSize()
          The I/O buffer size, in bytes, automatically rounded down to the nearest power of 2.
 long getMaxFileSize()
          The maximum file size, in bytes.
 int getMaxWindowBufferSize()
          The maximum amount of data, in bytes and rounded down to the nearest power of 2, mapped into the JVM's address space per primary store file.
 int getMinWindowBufferSize()
          The minimum amount of data, in bytes and rounded down to the nearest power of 2, mapped into the JVM's address space per primary store file.
 String getSynchronousWritePolicy()
          The disk write policy that determines how the file store writes data to disk.
 boolean isFileLockingEnabled()
          Determines whether OS file locking is used.
 void setBlockSize(int blockSize)
          Sets the value of the BlockSize attribute.
 void setCacheDirectory(String cacheDirectory)
          Sets the value of the CacheDirectory attribute.
 void setDirectory(String directory)
          Sets the value of the Directory attribute.
 void setFileLockingEnabled(boolean fileLockingEnabled)
          Sets the value of the FileLockingEnabled attribute.
 void setInitialSize(long initialSize)
          Sets the value of the InitialSize attribute.
 void setIoBufferSize(int ioBufferSize)
          Sets the value of the IOBufferSize attribute.
 void setMaxFileSize(long maxFileSize)
          Sets the value of the MaxFileSize attribute.
 void setMaxWindowBufferSize(int maxWindowBufferSize)
          Sets the value of the MaxWindowBufferSize attribute.
 void setMinWindowBufferSize(int minWindowBufferSize)
          Sets the value of the MinWindowBufferSize attribute.
 void setSynchronousWritePolicy(String policy)
          Sets the value of the SynchronousWritePolicy attribute.
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
freezeCurrentValue, getId, getInheritedProperties, getName, getNotes, isDynamicallyCreated, isInherited, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, unSet
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface weblogic.descriptor.DescriptorBean
addPropertyChangeListener, createChildCopyIncludingObsolete, getParentBean, isEditable, removePropertyChangeListener
 

Field Detail

SYNCWRITE_DISABLED

static final String SYNCWRITE_DISABLED
See Also:
Constant Field Values

SYNCWRITE_CACHEFLUSH

static final String SYNCWRITE_CACHEFLUSH
See Also:
Constant Field Values

SYNCWRITE_DIRECTWRITE

static final String SYNCWRITE_DIRECTWRITE
See Also:
Constant Field Values

SYNCWRITE_DIRECTWRITEWITHCACHE

static final String SYNCWRITE_DIRECTWRITEWITHCACHE
See Also:
Constant Field Values
Method Detail

getDirectory

String getDirectory()

The path name to the file system directory where the file store maintains its data files.

Returns:
The directory value

setDirectory

void setDirectory(String directory)
                  throws InvalidAttributeValueException

Sets the value of the Directory attribute.

Parameters:
directory - The new directory value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getDirectory()
Default Value:
null

getSynchronousWritePolicy

String getSynchronousWritePolicy()

The disk write policy that determines how the file store writes data to disk.

This policy also affects the JMS file store's performance, scalability, and reliability. Oracle recommends Direct-Write-With-Cache which tends to have the highest performance. The default value is Direct-Write. The valid policy options are:

Notes:
  • When available, file stores load WebLogic wlfileio native drivers, which can improve performance. These drivers are included with Windows, Solaris, Linux, and AIX WebLogic installations.
  • Certain older versions of Microsoft Windows may incorrectly report storage device synchronous write completion if the Windows default Write Cache Enabled setting is used. This violates the transactional semantics of transactional products (not specific to Oracle), including file stores configured with a Direct-Write (default) or Direct-Write-With-Cache policy, as a system crash or power failure can lead to a loss or a duplication of records/messages. One of the visible symptoms is that this problem may manifest itself in high persistent message/transaction throughput exceeding the physical capabilities of your storage device. You can address the problem by applying a Microsoft supplied patch, disabling the Windows Write Cache Enabled setting, or by using a power-protected storage device. See http://support.microsoft.com/kb/281672 and http://support.microsoft.com/kb/332023.
  • NFS storage note: On some operating systems, native driver memory-mapping is incompatible with NFS when files are locked. Stores with synchronous write policies Direct-Write-With-Cache or Disabled, and WebLogic JMS paging stores enhance performance by using the native wlfileio driver to perform memory-map operating system calls. When a store detects an incompatibility between NFS, file locking, and memory mapping, it automatically downgrades to conventional read/write system calls instead of memory mapping. For best performance, Oracle recommends investigating alternative NFS client drivers, configuring a non-NFS storage location, or in controlled environments and at your own risk, disabling the file locks (See Enable File Locking). For more information, see "Tuning the WebLogic Persistent Store" in Tuning Performance of Oracle WebLogic Server.

Returns:
The synchronousWritePolicy value
Changes take effect after you redeploy the module or restart the server.
Default Value:
GenericFileStoreMBean.SYNCWRITE_DIRECTWRITE
Valid Values:
GenericFileStoreMBean.SYNCWRITE_DISABLED,GenericFileStoreMBean.SYNCWRITE_CACHEFLUSH,GenericFileStoreMBean.SYNCWRITE_DIRECTWRITE,GenericFileStoreMBean.SYNCWRITE_DIRECTWRITEWITHCACHE

setSynchronousWritePolicy

void setSynchronousWritePolicy(String policy)
                               throws InvalidAttributeValueException,
                                      DistributedManagementException

Sets the value of the SynchronousWritePolicy attribute.

Parameters:
policy - The new synchronousWritePolicy value
Throws:
InvalidAttributeValueException
DistributedManagementException
See Also:
GenericFileStoreMBean.getSynchronousWritePolicy()
Changes take effect after you redeploy the module or restart the server.
Default Value:
GenericFileStoreMBean.SYNCWRITE_DIRECTWRITE
Valid Values:
GenericFileStoreMBean.SYNCWRITE_DISABLED,GenericFileStoreMBean.SYNCWRITE_CACHEFLUSH,GenericFileStoreMBean.SYNCWRITE_DIRECTWRITE,GenericFileStoreMBean.SYNCWRITE_DIRECTWRITEWITHCACHE

getCacheDirectory

String getCacheDirectory()

The location of the cache directory for Direct-Write-With-Cache, ignored for other policies.

When Direct-Write-With-Cache is specified as the SynchronousWritePolicy, cache files are created in addition to primary files (see Directory for the location of primary files). If a cache directory location is specified, the cache file path is CacheDirectory/WLStoreCache/StoreNameFileNum.DAT.cache. When specified, Oracle recommends using absolute paths, but if the directory location is a relative path, then CacheDirectory is created relative to the WebLogic Server instance's home directory. If "" or Null is specified, the Cache Directory is located in the current operating system temp directory as determined by the java.io.tmpdir Java System property (JDK's default: /tmp on UNIX, %TEMP% on Windows) and is TempDirectory/WLStoreCache/DomainName/unique-id/StoreNameFileNum.DAT.cache. The value of java.io.tmpdir varies between operating systems and configurations, and can be overridden by passing -Djava.io.tmpdir=My_path on the JVM command line.

Considerations:

  • Security: Some users may want to set specific directory permissions to limit access to the cache directory, especially if there are custom configured user access limitations on the primary directory. For a complete guide to WebLogic security, see "Securing a Production Environment for Oracle WebLogic Server."
  • Additional Disk Space Usage: Cache files consume the same amount of disk space as the primary store files that they mirror. See Directory for the location of primary store files.
  • Performance: For the best performance, a cache directory should be located in local storage instead of NAS/SAN (remote) storage, preferably in the operating system's temp directory. Relative paths should be avoided, as relative paths are located based on the domain installation, which is typically on remote storage. It is safe to delete a cache directory while the store is not running, but this may slow down the next store boot.
  • Preventing Corruption and File Locking: Two same named stores must not be configured to share the same primary or cache directory. There are store file locking checks that are designed to detect such conflicts and prevent corruption by failing the store boot, but it is not recommended to depend on the file locking feature for correctness. See Enable File Locking.
  • Boot Recovery: Cache files are reused to speed up the File Store boot and recovery process, but only if the store's host WebLogic Server instance has been shut down cleanly prior to the current boot. For example, cache files are not re-used and are instead fully recreated: after a kill -9, after an OS or JVM crash, or after an off-line change to the primary files, such as a store admin compaction. When cache files are recreated, a Warning log message 280102 is generated.
  • Fail-Over/Migration Recovery: A file store safely recovers its data without its cache directory. Therefore, a cache directory does not need to be copied or otherwise made accessible after a fail-over or migration, and similarly does not need to be placed in NAS/SAN storage. A Warning log message 280102, which is generated to indicate the need to recreate the cache on the new host system, can be ignored.
  • Cache File Cleanup: To prevent unused cache files from consuming disk space, test and developer environments should periodically delete cache files.

Returns:
The CacheDirectory value

setCacheDirectory

void setCacheDirectory(String cacheDirectory)
                       throws InvalidAttributeValueException

Sets the value of the CacheDirectory attribute.

If no value specified, then the current OS user's tmp dir (java.io.tmpdir); the files will be placed under ////

Parameters:
cacheDirectory - The new cache directory value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getCacheDirectory()
Changes take effect after you redeploy the module or restart the server.
Default Value:
null

getMinWindowBufferSize

int getMinWindowBufferSize()

The minimum amount of data, in bytes and rounded down to the nearest power of 2, mapped into the JVM's address space per primary store file. Applies to synchronous write policies Direct-Write-With-Cache and Disabled, but only when a native wlfileio library is loaded. See Maximum Window Buffer Size.

Returns:
The MinWindowBufferSize value

setMinWindowBufferSize

void setMinWindowBufferSize(int minWindowBufferSize)

Sets the value of the MinWindowBufferSize attribute.

Minimum amount of VM mapped into the JVM's address space per store file.

Parameters:
minWindowBufferSize - The new cache directory value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getMinWindowBufferSize()
Changes take effect after you redeploy the module or restart the server.
Default Value:
-1
Maximum Value:
1073741824
Minimum Value:
-1

getMaxWindowBufferSize

int getMaxWindowBufferSize()

The maximum amount of data, in bytes and rounded down to the nearest power of 2, mapped into the JVM's address space per primary store file. Applies to synchronous write policies Direct-Write-With-Cache and Disabled but only when the native wlfileio library is loaded.

A window buffer does not consume Java heap memory, but does consume off-heap (native) memory. If the store is unable to allocate the requested buffer size, it allocates smaller and smaller buffers until it reaches MinWindowBufferSize, and then fails if cannot honor MinWindowBufferSize.

Oracle recommends setting the max window buffer size to more than double the size of the largest write (multiple concurrently updated records may be combined into a single write), and greater than or equal to the file size, unless there are other constraints. 32-bit JVMs may impose a total limit of between 2 and 4GB for combined Java heap plus off-heap (native) memory usage.

Returns:
The MaxWindowBufferSize value

setMaxWindowBufferSize

void setMaxWindowBufferSize(int maxWindowBufferSize)

Sets the value of the MaxWindowBufferSize attribute.

Maximum amount of VM mapped into the JVM's address space per store file, without other constraints should be as big as possible. Graceful degradation to the MinWindowBufferSize, fail if impossible.

Parameters:
maxWindowBufferSize - The new MaxWindowBufferSize value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getMaxWindowBufferSize()
Changes take effect after you redeploy the module or restart the server.
Default Value:
-1
Maximum Value:
1073741824
Minimum Value:
-1

getIoBufferSize

int getIoBufferSize()

The I/O buffer size, in bytes, automatically rounded down to the nearest power of 2.

  • For the Direct-Write-With-Cache policy when a native wlfileio driver is available, IOBufferSize describes the maximum portion of a cache view that is passed to a system call. This portion does not consume off-heap (native) or Java heap memory.
  • For the Direct-Write and Cache-Flush policies, IOBufferSize is the size of a per store buffer which consumes off-heap (native) memory, where one buffer is allocated during run-time, but multiple buffers may be temporarily created during boot recovery.
  • When a native wlfileio driver is not available, the setting applies to off-heap (native) memory for all policies (including Disabled).
  • For the best runtime performance, Oracle recommends setting IOBufferSize so that it is larger than the largest write (multiple concurrent store requests may be combined into a single write).
  • For the best boot recovery time performance of large stores, Oracle recommends setting IOBufferSize to at least 2 megabytes.
  • See AllocatedIOBufferBytes to find out the actual allocated off-heap (native) memory amount. It is a multiple of IOBufferSize for the Direct-Write and Cache-Flush policies, or zero.
  • See AllocatedIOBufferBytes.

Returns:
The IoBufferSize value

setIoBufferSize

void setIoBufferSize(int ioBufferSize)

Sets the value of the IOBufferSize attribute.

In the old modes defines the size of pooled DirectByteBuffer's, in the new mode describes the maximum portion of a cache view that is passed to a system call (read, write)

Parameters:
ioBufferSize - The new IOBufferSize value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getIoBufferSize()
Changes take effect after you redeploy the module or restart the server.
Default Value:
-1
Maximum Value:
67108864
Minimum Value:
-1

getMaxFileSize

long getMaxFileSize()

The maximum file size, in bytes.

  • The MaxFileSize value affects the number of files needed to accommodate a store of a particular size (number of files = store size/MaxFileSize rounded up).
  • A file store automatically reuses space freed by deleted records and automatically expands individual files up to MaxFileSize if there is not enough space for a new record. If there is no space left in exiting files for a new record, a store creates an additional file.
  • A small number of larger files is normally preferred over a large number of smaller files as each file allocates Window Buffer and file handles.
  • If MaxFileSize is larger than 2^24 * BlockSize, then MaxFileSize is ignored, and the value becomes 2^24 * BlockSize. The default BlockSize is 512, and 2^24 * 512 is 8 GB.
  • See Initial Size.

Returns:
The MaxFileSize value

setMaxFileSize

void setMaxFileSize(long maxFileSize)

Sets the value of the MaxFileSize attribute.

Parameters:
maxFileSize - The new MaxFileSize value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getMaxFileSize()
Changes take effect after you redeploy the module or restart the server.
Default Value:
1342177280
Maximum Value:
2139095040
Minimum Value:
1048576

getBlockSize

int getBlockSize()

The smallest addressable block, in bytes, of a file. When a native wlfileio driver is available and the block size has not been configured by the user, the store selects the minimum OS specific value for unbuffered (direct) I/O, if it is within the range [512, 8192].

A file store's block size does not change once the file store creates its files. Changes to block size only take effect for new file stores or after the current files have been deleted. See "Tuning the Persistent Store" in Tuning Performance of Oracle WebLogic Server.

Returns:
The BlockSize value

setBlockSize

void setBlockSize(int blockSize)

Sets the value of the BlockSize attribute.

The smallest addressable block in a file.

Parameters:
blockSize - The new BlockSize value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getBlockSize()
Changes take effect after you redeploy the module or restart the server.
Default Value:
-1
Maximum Value:
8192
Minimum Value:
-1

getInitialSize

long getInitialSize()

The initial file size, in bytes.

  • Set InitialSize to pre-allocate file space during a file store boot. If InitialSize exceeds MaxFileSize, a store creates multiple files (number of files = InitialSize/MaxFileSize rounded up).
  • A file store automatically reuses the space from deleted records and automatically expands a file if there is not enough space for a new write request.
  • Use InitialSize to limit or prevent file expansions during runtime, as file expansion introduces temporary latencies that may be noticeable under rare circumstances.
  • Changes to initial size only take effect for new file stores, or after any current files have been deleted prior to restart.
  • See Maximum File Size.

Returns:
The InitialSize value

setInitialSize

void setInitialSize(long initialSize)

Sets the value of the InitialSize attribute.

The maximum value allowed is 2^15 * 128G = 4P TODO: legalMax 4503599627370496L breaks schema validation.

Parameters:
initialSize - The new InitialSize value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.getInitialSize()
Changes take effect after you redeploy the module or restart the server.
Default Value:
0
Minimum Value:
0

isFileLockingEnabled

boolean isFileLockingEnabled()

Determines whether OS file locking is used.

When file locking protection is enabled, a store boot fails if another store instance already has opened the store files. Do not disable this setting unless you have procedures in place to prevent multiple store instances from opening the same file. File locking is not required but helps prevent corruption in the event that two same-named file store instances attempt to operate in the same directories. This setting applies to both primary and cache files.

Returns:
FileLockingEnabled value
See Also:
GenericFileStoreMBean.getDirectory(), GenericFileStoreMBean.getCacheDirectory()

setFileLockingEnabled

void setFileLockingEnabled(boolean fileLockingEnabled)

Sets the value of the FileLockingEnabled attribute.

Parameters:
fileLockingEnabled - The new FileLockingEnabled value
Throws:
InvalidAttributeValueException
See Also:
GenericFileStoreMBean.isFileLockingEnabled()
Changes take effect after you redeploy the module or restart the server.
Default Value:
true

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02