Class HornetqJournalEnvironmentBean
java.lang.Object
com.arjuna.ats.internal.arjuna.objectstore.hornetq.HornetqJournalEnvironmentBean
- All Implemented Interfaces:
HornetqJournalEnvironmentBeanMBean
public class HornetqJournalEnvironmentBean
extends Object
implements HornetqJournalEnvironmentBeanMBean
A JavaBean containing assorted configuration properties for the Journal based transaction logging system.
Parameters on this file serve a similar role to their counterparts in the artemis journal.
- Author:
- Jonathan Halliday (jonathan.halliday@redhat.com), 2010-03
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the target number of timer based buffer flushes per second.int
Returns the buffer size in bytes.int
Gets the minimal number of files before we can consider compacting.int
Gets the percentage minimum capacity usage at which to start compacting.Returns the suffix to be used then naming each log file.Returns the prefix to be used when naming each log file.int
Returns the desired size in bytes of each log file.int
getMaxIO()
Gets the maximum write requests queue depth.int
Returns the minimum number of log files to use.int
How many journal files can be reused.Returns the log directory path Default: {user.dir}/HornetqJournalStoreboolean
Returns the IO type of Journal.boolean
Returns the debug log mode for Journal throughput statistics.boolean
Returns the sync setting for transaction log delete operations.boolean
Returns the sync setting for transaction log write operations.void
setAsyncIO
(boolean asyncIO) Sets the type of Journal.void
setBufferFlushesPerSecond
(int bufferFlushesPerSecond) Sets the target number of timer based buffer flushes per second.void
setBufferSize
(int bufferSize) Sets the buffer size in bytes.void
setCompactMinFiles
(int compactMinFiles) Sets the minimal number of files before we can consider compacting.void
setCompactPercentage
(int compactPercentage) Sets the percentage minimum capacity usage at which to start compacting.void
setFileExtension
(String fileExtension) Sets the suffix to be used when naming each log file.void
setFilePrefix
(String filePrefix) Sets the prefix to be used when naming each log file.void
setFileSize
(int fileSize) Sets the desired size in bytes for each log file.void
setLogRates
(boolean logRates) Sets the debug log mode for Journal throughput statistics.void
setMaxIO
(int maxIO) Sets the maximum write requests queue depth.void
setMinFiles
(int minFiles) Sets the minimum number of log files to use.void
setPoolSize
(int poolSize) Sets the number of files that can be reused.void
setStoreDir
(String storeDir) Sets the log directory path.void
setSyncDeletes
(boolean syncDeletes) Sets if log delete operations should be synchronous or not.void
setSyncWrites
(boolean syncWrites) Sets if log write operations should be synchronous or not.
-
Constructor Details
-
HornetqJournalEnvironmentBean
public HornetqJournalEnvironmentBean()
-
-
Method Details
-
getFileSize
public int getFileSize()Returns the desired size in bytes of each log file. Minimum 1024. Default: 2MB (2097152 bytes)- Specified by:
getFileSize
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- The individual log file size, in bytes.
-
setFileSize
public void setFileSize(int fileSize) Sets the desired size in bytes for each log file.- Parameters:
fileSize
- the individual log file size, in bytes.
-
getMinFiles
public int getMinFiles()Returns the minimum number of log files to use. Minimum 2. Default: 4- Specified by:
getMinFiles
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the minimum number of individual log files.
-
setMinFiles
public void setMinFiles(int minFiles) Sets the minimum number of log files to use.- Parameters:
minFiles
- the minimum number of individual log files.
-
getPoolSize
public int getPoolSize()How many journal files can be reused. Default: -1- Specified by:
getPoolSize
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the number of files that can be reused.
-
setPoolSize
public void setPoolSize(int poolSize) Sets the number of files that can be reused.- Parameters:
poolSize
- the number of files that can be reused.
-
getCompactMinFiles
public int getCompactMinFiles()Gets the minimal number of files before we can consider compacting. Default: 10- Specified by:
getCompactMinFiles
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the threshold file count.
-
setCompactMinFiles
public void setCompactMinFiles(int compactMinFiles) Sets the minimal number of files before we can consider compacting.- Parameters:
compactMinFiles
- the threshold file count.
-
getCompactPercentage
public int getCompactPercentage()Gets the percentage minimum capacity usage at which to start compacting. Default: 30- Specified by:
getCompactPercentage
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the threshold percentage.
-
setCompactPercentage
public void setCompactPercentage(int compactPercentage) Sets the percentage minimum capacity usage at which to start compacting.- Parameters:
compactPercentage
- the threshold percentage.
-
getFilePrefix
Returns the prefix to be used when naming each log file. Default: "jbossts"- Specified by:
getFilePrefix
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the prefix used to construct individual log file names.
-
setFilePrefix
Sets the prefix to be used when naming each log file.- Parameters:
filePrefix
- the prefix used to construct individual log file names.
-
getFileExtension
Returns the suffix to be used then naming each log file. Default: "txlog"- Specified by:
getFileExtension
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the suffix used to construct individual log file names.
-
setFileExtension
Sets the suffix to be used when naming each log file.- Parameters:
fileExtension
- the suffix used to construct individual log file names.
-
getMaxIO
public int getMaxIO()Gets the maximum write requests queue depth. For NIO this property has no effect and will be hard coded to 1. For AIO, the default is 2 but the recommended value is 500. Default: 2- Specified by:
getMaxIO
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the max number of outstanding requests.
-
setMaxIO
public void setMaxIO(int maxIO) Sets the maximum write requests queue depth.- Parameters:
maxIO
- the max number of outstanding requests.
-
getStoreDir
Returns the log directory path Default: {user.dir}/HornetqJournalStore- Specified by:
getStoreDir
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the log directory name
-
setStoreDir
Sets the log directory path.- Parameters:
storeDir
- the path to the log directory.
-
isSyncWrites
public boolean isSyncWrites()Returns the sync setting for transaction log write operations. To preserve ACID properties this value must be set to true, in which case log write operations block until data is forced to the physical storage device. Turn sync off only if you don't care about data integrity. Default: true.- Specified by:
isSyncWrites
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- true if log writes should be synchronous, false otherwise.
-
setSyncWrites
public void setSyncWrites(boolean syncWrites) Sets if log write operations should be synchronous or not.- Parameters:
syncWrites
- true for synchronous operation, false otherwise.
-
isSyncDeletes
public boolean isSyncDeletes()Returns the sync setting for transaction log delete operations. For optimal crash recovery this value should be set to true. Asynchronous deletes may give rise to unnecessary crash recovery complications. Default: true.- Specified by:
isSyncDeletes
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- true if log deletes should be synchronous, false otherwise.
-
setSyncDeletes
public void setSyncDeletes(boolean syncDeletes) Sets if log delete operations should be synchronous or not.- Parameters:
syncDeletes
- true for synchronous operation, false otherwise.
-
getBufferFlushesPerSecond
public int getBufferFlushesPerSecond()Returns the target number of timer based buffer flushes per second. Caution: this property is functionally equivalent to the artemis journal-buffer-timeout property but uses different units. Default 500.- Specified by:
getBufferFlushesPerSecond
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the number of buffer flushes per second.
-
setBufferFlushesPerSecond
public void setBufferFlushesPerSecond(int bufferFlushesPerSecond) Sets the target number of timer based buffer flushes per second.- Parameters:
bufferFlushesPerSecond
- the target number.
-
getBufferSize
public int getBufferSize()Returns the buffer size in bytes. Default: 490 KB.- Specified by:
getBufferSize
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- the size of the buffer.
-
setBufferSize
public void setBufferSize(int bufferSize) Sets the buffer size in bytes.- Parameters:
bufferSize
- the size of the buffer.
-
isLogRates
public boolean isLogRates()Returns the debug log mode for Journal throughput statistics. Default: false.- Specified by:
isLogRates
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- true is rate logging is enabled, false otherwise.
-
setLogRates
public void setLogRates(boolean logRates) Sets the debug log mode for Journal throughput statistics.- Parameters:
logRates
- true to enable logging of statistics, false to disable.
-
isAsyncIO
public boolean isAsyncIO()Returns the IO type of Journal. Default: true- Specified by:
isAsyncIO
in interfaceHornetqJournalEnvironmentBeanMBean
- Returns:
- true if AsyncIO is enabled, false otherwise which means NIO
-
setAsyncIO
public void setAsyncIO(boolean asyncIO) Sets the type of Journal. Note that Journal silently falls back to NIO if AIO native libraries are not available.- Parameters:
asyncIO
- true to enable AsyncIO, false to disable
-