ConfigurationMBean
, DescriptorBean
, javax.management.DynamicMBean
, javax.management.MBeanRegistration
, javax.management.NotificationBroadcaster
, SettableBean
, WebLogicMBean
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.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
SYNCWRITE_CACHEFLUSH |
|
static java.lang.String |
SYNCWRITE_DIRECTWRITE |
|
static java.lang.String |
SYNCWRITE_DIRECTWRITEWITHCACHE |
|
static java.lang.String |
SYNCWRITE_DISABLED |
DEFAULT_EMPTY_BYTE_ARRAY
Modifier and Type | Method | Description |
---|---|---|
int |
getBlockSize() |
The smallest addressable block, in bytes, of a file.
|
java.lang.String |
getCacheDirectory() |
The location of the cache directory for
Direct-Write-With-Cache , ignored for other policies. |
java.lang.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, of an individual data file.
|
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.
|
java.lang.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(java.lang.String cacheDirectory) |
Sets the value of the
CacheDirectory attribute. |
void |
setDirectory(java.lang.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(java.lang.String policy) |
Sets the value of the
SynchronousWritePolicy
attribute. |
freezeCurrentValue, getId, getInheritedProperties, getName, getNotes, isDynamicallyCreated, isInherited, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, unSet
addPropertyChangeListener, createChildCopyIncludingObsolete, getParentBean, isEditable, removePropertyChangeListener
getAttribute, getAttributes, invoke, setAttribute, setAttributes
postDeregister, postRegister, preDeregister, preRegister
addNotificationListener, getNotificationInfo, removeNotificationListener
getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent
static final java.lang.String SYNCWRITE_DISABLED
static final java.lang.String SYNCWRITE_CACHEFLUSH
static final java.lang.String SYNCWRITE_DIRECTWRITE
static final java.lang.String SYNCWRITE_DIRECTWRITEWITHCACHE
java.lang.String getDirectory()
The path name to the file system directory where the file store maintains its data files.
SynchronousWritePolicy
of Direct-Write-With-Cache
, see
Cache Directory. void setDirectory(java.lang.String directory) throws javax.management.InvalidAttributeValueException
Sets the value of the Directory
attribute.
directory
- The new directory valuejavax.management.InvalidAttributeValueException
getDirectory()
java.lang.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:
Direct-Write
Direct I/O is supported on all platforms.
When available, file stores in direct I/O mode automatically
load the native I/O wlfileio
driver. This option tends
to out-perform Cache-Flush
and tend to be slower than
Direct-Write-With-Cache
. This mode does not require
a native store wlfileio
driver, but
performs faster when they are available.Direct-Write-With-Cache
Store records are written synchronously
to primary files in the directory specified by the Directory
attribute
and asynchronously to a corresponding cache file in the Cache Directory
.
The Cache Directory
provides information about disk space, locking,
security, and performance implications. This mode requires a native store
wlfileiocode
driver. If the native driver cannot be loaded,
then the write mode automatically switches to Direct-Write
.
See Cache Directory.Cache-Flush
Transactions cannot complete until all
of their writes have been flushed down to disk.
This policy is reliable and scales well
as the number of simultaneous users increases.Transactionally safe but
tends to be a lower performer than direct-write policies.Disabled
Transactions are complete as soon as their
writes are cached in memory,
instead of waiting for the writes to successfully reach
the disk. This is the fastest policy because
write requests do not block waiting to be synchronized
to disk, but, unlike other policies, is not transactionally
safe in the event of operating system or hardware failures.
Such failures can lead to duplicate or lost data/messages.
This option does not require native store wlfileio
drivers, but may run faster when they are available. Some
non-WebLogic JMS vendors default to a policy that
is equivalent to Disabled
.Notes:
wlfileio
native drivers,
which can improve performance. These drivers are included with Windows, Solaris,
Linux, and AIX WebLogic installations.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.
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.void setSynchronousWritePolicy(java.lang.String policy) throws javax.management.InvalidAttributeValueException, DistributedManagementException
Sets the value of the SynchronousWritePolicy
attribute.
policy
- The new synchronousWritePolicy valuejavax.management.InvalidAttributeValueException
DistributedManagementException
getSynchronousWritePolicy()
java.lang.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:
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.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.Warning
log message 280102, which is generated to indicate the need to recreate the
cache on the new host system, can be ignored.void setCacheDirectory(java.lang.String cacheDirectory) throws javax.management.InvalidAttributeValueException
Sets the value of the CacheDirectory
attribute.
cacheDirectory
- The new cache directory valuejavax.management.InvalidAttributeValueException
getCacheDirectory()
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.
void setMinWindowBufferSize(int minWindowBufferSize)
Sets the value of the MinWindowBufferSize
attribute.
minWindowBufferSize
- The new cache directory valuejavax.management.InvalidAttributeValueException
getMinWindowBufferSize()
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.
AllocatedWindowBufferBytes
to find out the
actual allocated Window Buffer Size.void setMaxWindowBufferSize(int maxWindowBufferSize)
Sets the value of the MaxWindowBufferSize
attribute.
maxWindowBufferSize
- The new MaxWindowBufferSize valuejavax.management.InvalidAttributeValueException
getMaxWindowBufferSize()
int getIoBufferSize()
The I/O buffer size, in bytes, automatically rounded down to the nearest power of 2.
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.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.wlfileio
driver is not available,
the setting applies to off-heap (native) memory for all policies (including Disabled
).IOBufferSize
so that it is larger than the largest
write (multiple concurrent store requests may be combined into a single write).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.
void setIoBufferSize(int ioBufferSize)
Sets the value of the IOBufferSize
attribute.
ioBufferSize
- The new IOBufferSize valuejavax.management.InvalidAttributeValueException
getIoBufferSize()
long getMaxFileSize()
The maximum file size, in bytes, of an individual data file.
MaxFileSize
value affects the number of files needed to accommodate
a store of a particular size (number of files = store size/MaxFileSize rounded up).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.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.MaxFileSize
is 10 MB when multiple data files are used by the store.
If InitialSize
is less than MaxFileSize
then a single file will be created of InitialSize
bytes.
If InitialSize
is larger than MaxFileSize
then (InitialSize
/ MaxFileSize
) files
will be created of MaxFileSize
bytes and an additional file if necessary to contain any remainder.void setMaxFileSize(long maxFileSize)
Sets the value of the MaxFileSize
attribute.
maxFileSize
- The new MaxFileSize valuejavax.management.InvalidAttributeValueException
getMaxFileSize()
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].
void setBlockSize(int blockSize)
Sets the value of the BlockSize
attribute.
blockSize
- The new BlockSize valuejavax.management.InvalidAttributeValueException
getBlockSize()
long getInitialSize()
The initial file size, in bytes.
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).InitialSize
to limit or prevent file expansions
during runtime, as file expansion introduces temporary latencies that may be noticeable
under rare circumstances. void setInitialSize(long initialSize)
Sets the value of the InitialSize
attribute.
initialSize
- The new InitialSize valuejavax.management.InvalidAttributeValueException
getInitialSize()
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.getDirectory()
,
getCacheDirectory()
void setFileLockingEnabled(boolean fileLockingEnabled)
Sets the value of the FileLockingEnabled
attribute.
fileLockingEnabled
- The new FileLockingEnabled valuejavax.management.InvalidAttributeValueException
isFileLockingEnabled()