Package org.apache.activemq.store.kahadb
Class MessageDatabase
- java.lang.Object
-
- org.apache.activemq.util.ServiceSupport
-
- org.apache.activemq.store.kahadb.MessageDatabase
-
- All Implemented Interfaces:
BrokerServiceAware
,Service
- Direct Known Subclasses:
KahaDBStore
public abstract class MessageDatabase extends ServiceSupport implements BrokerServiceAware
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
MessageDatabase.LastAckMarshaller
protected class
MessageDatabase.MessageKeysMarshaller
protected class
MessageDatabase.MessageStoreStatisticsMarshaller
protected class
MessageDatabase.Metadata
static class
MessageDatabase.PurgeRecoveredXATransactionStrategy
protected class
MessageDatabase.StoredDestinationMarshaller
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MessageDatabase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
allowIOResumption()
protected void
checkpointCleanup(boolean cleanup)
protected void
clearStoreStats(KahaDestination kahaDestination)
Clear the counter for the destination, if one exists.void
close()
protected abstract void
configureMetadata()
protected Journal
createJournal()
protected void
decrementAndSubSizeToStoreStat(String kahaDestKey, String subKey, long size)
protected void
decrementAndSubSizeToStoreStat(KahaDestination kahaDestination, String subKey, long size)
protected void
decrementAndSubSizeToStoreStat(Transaction tx, String kahaDestKey, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, long size)
protected void
decrementAndSubSizeToStoreStat(Transaction tx, KahaDestination kahaDestination, long size)
void
doStart()
void
doStop(ServiceStopper stopper)
long
getCheckpointInterval()
long
getCleanupInterval()
boolean
getCleanupOnStop()
int
getCompactAcksAfterNoGC()
File
getDirectory()
File
getDirectoryArchive()
protected org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination
getExistingStoredDestination(KahaDestination destination, Transaction tx)
int
getFailoverProducersAuditDepth()
int
getIndexCacheSize()
File
getIndexDirectory()
float
getIndexLFUEvictionFactor()
int
getIndexWriteBatchSize()
Location[]
getInProgressTxLocationRange()
Journal
getJournal()
long
getJournalDiskSyncInterval()
String
getJournalDiskSyncStrategy()
Journal.JournalDiskSyncStrategy
getJournalDiskSyncStrategyEnum()
HashSet<Integer>
getJournalFilesBeingReplicated()
int
getJournalMaxFileLength()
int
getJournalMaxWriteBatchSize()
org.apache.activemq.store.kahadb.MessageDatabase.LastAck
getLastAck(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey)
Location
getLastUpdatePosition()
int
getMaxFailoverProducersToTrack()
protected MessageDatabase.Metadata
getMetadata()
PageFile
getPageFile()
PersistenceAdapterStatistics
getPersistenceAdapterStatistics()
String
getPreallocationScope()
String
getPreallocationStrategy()
String
getPreparedTransaction(TransactionId transactionId)
String
getPurgeRecoveredXATransactionStrategy()
MessageDatabase.PurgeRecoveredXATransactionStrategy
getPurgeRecoveredXATransactionStrategyEnum()
protected SequenceSet
getSequenceSet(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey)
protected org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination
getStoredDestination(KahaDestination destination, Transaction tx)
protected long
getStoredMessageCount(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey)
protected long
getStoredMessageSize(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey)
protected Map<String,AtomicLong>
getStoredMessageSize(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, List<String> subscriptionKeys)
Recovers durable subscription pending message size with only 1 pass over the order index on recovery instead of iterating over the index once per subscriptionprotected MessageStoreStatistics
getStoredMessageStoreStatistics(KahaDestination destination, Transaction tx)
protected MessageStoreStatistics
getStoreStats(String kahaDestKey)
Locate the storeMessageSize counter for this KahaDestinationprotected MessageStoreSubscriptionStatistics
getSubStats(String kahaDestKey)
String
getTransactions()
void
incrementalRecover()
protected void
incrementAndAddSizeToStoreStat(String kahaDestKey, String subKey, long size)
protected void
incrementAndAddSizeToStoreStat(KahaDestination kahaDestination, String subKey, long size)
protected void
incrementAndAddSizeToStoreStat(Transaction tx, String kahaDestKey, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, long size)
protected void
incrementAndAddSizeToStoreStat(Transaction tx, KahaDestination kahaDestination, long size)
Update MessageStoreStatisticsboolean
isArchiveCorruptedIndex()
boolean
isArchiveDataLogs()
boolean
isCheckForCorruptJournalFiles()
boolean
isChecksumJournalFiles()
boolean
isCompactAcksIgnoresStoreGrowth()
Returns whether Ack compaction will ignore that the store is still growing and run more often.boolean
isDeleteAllMessages()
boolean
isEnableAckCompaction()
Returns whether Ack compaction is enabledboolean
isEnableIndexDiskSyncs()
boolean
isEnableIndexPageCaching()
boolean
isEnableIndexRecoveryFile()
boolean
isEnableJournalDiskSyncs()
Deprecated.usegetJournalDiskSyncStrategyEnum()
orgetJournalDiskSyncStrategy()
insteadboolean
isEnableSubscriptionStatistics()
boolean
isFailIfDatabaseIsLocked()
boolean
isIgnoreMissingJournalfiles()
boolean
isUseIndexLFRUEviction()
protected String
key(KahaDestination destination)
void
load()
JournalCommand<?>
load(Location location)
Loads a previously stored JournalMessageprotected boolean
matchType(Destination destination, KahaDestination.DestinationType type)
Determine whether this Destination matches the DestinationTypevoid
open()
protected void
process(KahaAddMessageCommand command, Location location, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware runWithIndexLock)
protected void
process(KahaCommitCommand command, Location location, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware before)
protected void
process(KahaPrepareCommand command, Location location)
protected void
process(KahaRemoveDestinationCommand command, Location location)
protected void
process(KahaRemoveMessageCommand command, Location location)
protected void
process(KahaRewrittenDataFileCommand command, Location location)
protected void
process(KahaRollbackCommand command, Location location)
protected void
process(KahaSubscriptionCommand command, Location location)
protected void
process(KahaUpdateMessageCommand command, Location location)
protected void
processLocation(Location location)
protected void
recoverIndex(Transaction tx)
void
setArchiveCorruptedIndex(boolean archiveCorruptedIndex)
void
setArchiveDataLogs(boolean archiveDataLogs)
void
setBrokerService(BrokerService brokerService)
void
setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)
void
setCheckpointInterval(long checkpointInterval)
void
setChecksumJournalFiles(boolean checksumJournalFiles)
void
setCleanupInterval(long cleanupInterval)
void
setCleanupOnStop(boolean cleanupOnStop)
void
setCompactAcksAfterNoGC(int compactAcksAfterNoGC)
Sets the number of GC cycles where no journal logs were removed before an attempt to move forward all the acks in the last log that contains them and is otherwise unreferenced.void
setCompactAcksIgnoresStoreGrowth(boolean compactAcksIgnoresStoreGrowth)
Configure if Ack compaction will occur regardless of continued growth of the journal logs meaning that the store has not run out of space yet.void
setDeleteAllMessages(boolean deleteAllMessages)
void
setDirectory(File directory)
void
setDirectoryArchive(File directoryArchive)
void
setEnableAckCompaction(boolean enableAckCompaction)
Configure if the Ack compaction task should be enabled to runvoid
setEnableIndexDiskSyncs(boolean enableIndexDiskSyncs)
void
setEnableIndexPageCaching(boolean enableIndexPageCaching)
void
setEnableIndexRecoveryFile(boolean enableIndexRecoveryFile)
void
setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
void
setEnableJournalDiskSyncs(boolean syncWrites)
Deprecated.usesetEnableJournalDiskSyncs(boolean)
insteadvoid
setEnableSubscriptionStatistics(boolean enableSubscriptionStatistics)
Enable caching statistics for each subscription to allow non-blocking retrieval of metrics.void
setFailIfDatabaseIsLocked(boolean failIfDatabaseIsLocked)
void
setFailoverProducersAuditDepth(int failoverProducersAuditDepth)
void
setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
void
setIndexCacheSize(int indexCacheSize)
void
setIndexDirectory(File indexDirectory)
void
setIndexLFUEvictionFactor(float indexLFUEvictionFactor)
void
setIndexWriteBatchSize(int setIndexWriteBatchSize)
void
setJournalDiskSyncInterval(long journalDiskSyncInterval)
void
setJournalDiskSyncStrategy(String journalDiskSyncStrategy)
void
setJournalMaxFileLength(int journalMaxFileLength)
void
setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
void
setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack)
void
setPreallocationScope(String preallocationScope)
void
setPreallocationStrategy(String preallocationStrategy)
void
setPurgeRecoveredXATransactionStrategy(String purgeRecoveredXATransactionStrategy)
void
setUseIndexLFRUEviction(boolean useIndexLFRUEviction)
Location
store(JournalCommand<?> data)
Location
store(JournalCommand<?> data, boolean sync, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware before, Runnable after)
Location
store(JournalCommand<?> data, boolean sync, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware before, Runnable after, Runnable onJournalStoreComplete)
All updated are are funneled through this method.Location
store(JournalCommand<?> data, Runnable onJournalStoreComplete)
ByteSequence
toByteSequence(JournalCommand<?> data)
void
unload()
-
Methods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
-
-
-
-
Field Detail
-
brokerService
protected BrokerService brokerService
-
PROPERTY_LOG_SLOW_ACCESS_TIME
public static final String PROPERTY_LOG_SLOW_ACCESS_TIME
- See Also:
- Constant Field Values
-
LOG_SLOW_ACCESS_TIME
public static final int LOG_SLOW_ACCESS_TIME
-
DEFAULT_DIRECTORY
public static final File DEFAULT_DIRECTORY
-
UNMATCHED
protected static final org.apache.activemq.protobuf.Buffer UNMATCHED
-
pageFile
protected PageFile pageFile
-
journal
protected Journal journal
-
metadata
protected MessageDatabase.Metadata metadata
-
persistenceAdapterStatistics
protected final PersistenceAdapterStatistics persistenceAdapterStatistics
-
metadataMarshaller
protected org.apache.activemq.store.kahadb.MessageDatabase.MetadataMarshaller metadataMarshaller
-
failIfDatabaseIsLocked
protected boolean failIfDatabaseIsLocked
-
deleteAllMessages
protected boolean deleteAllMessages
-
directory
protected File directory
-
indexDirectory
protected File indexDirectory
-
scheduler
protected ScheduledExecutorService scheduler
-
journalDiskSyncStrategy
protected Journal.JournalDiskSyncStrategy journalDiskSyncStrategy
-
archiveDataLogs
protected boolean archiveDataLogs
-
directoryArchive
protected File directoryArchive
-
journalSize
protected AtomicLong journalSize
-
opened
protected AtomicBoolean opened
-
purgeRecoveredXATransactionStrategy
protected MessageDatabase.PurgeRecoveredXATransactionStrategy purgeRecoveredXATransactionStrategy
-
forceRecoverIndex
protected boolean forceRecoverIndex
-
lastAsyncJournalUpdate
protected final AtomicReference<Location> lastAsyncJournalUpdate
-
indexLock
protected final ReentrantReadWriteLock indexLock
-
storedDestinations
protected final HashMap<String,org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination> storedDestinations
-
storeCache
protected final ConcurrentMap<String,MessageStore> storeCache
This is a map to cache MessageStores for a specific KahaDestination key
-
preparedTransactions
protected final LinkedHashMap<TransactionId,List<org.apache.activemq.store.kahadb.MessageDatabase.Operation>> preparedTransactions
-
-
Method Detail
-
doStart
public void doStart() throws Exception
- Specified by:
doStart
in classServiceSupport
- Throws:
Exception
-
doStop
public void doStop(ServiceStopper stopper) throws Exception
- Specified by:
doStop
in classServiceSupport
- Throws:
Exception
-
allowIOResumption
public void allowIOResumption()
-
open
public void open() throws IOException
- Throws:
IOException
-
load
public void load() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
unload
public void unload() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getInProgressTxLocationRange
public Location[] getInProgressTxLocationRange()
-
getTransactions
public String getTransactions()
-
getPreparedTransaction
public String getPreparedTransaction(TransactionId transactionId)
-
recoverIndex
protected void recoverIndex(Transaction tx) throws IOException
- Throws:
IOException
-
incrementalRecover
public void incrementalRecover() throws IOException
- Throws:
IOException
-
getLastUpdatePosition
public Location getLastUpdatePosition() throws IOException
- Throws:
IOException
-
checkpointCleanup
protected void checkpointCleanup(boolean cleanup) throws IOException
- Throws:
IOException
-
toByteSequence
public ByteSequence toByteSequence(JournalCommand<?> data) throws IOException
- Throws:
IOException
-
store
public Location store(JournalCommand<?> data) throws IOException
- Throws:
IOException
-
store
public Location store(JournalCommand<?> data, Runnable onJournalStoreComplete) throws IOException
- Throws:
IOException
-
store
public Location store(JournalCommand<?> data, boolean sync, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware before, Runnable after) throws IOException
- Throws:
IOException
-
store
public Location store(JournalCommand<?> data, boolean sync, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware before, Runnable after, Runnable onJournalStoreComplete) throws IOException
All updated are are funneled through this method. The updates are converted to a JournalMessage which is logged to the journal and then the data from the JournalMessage is used to update the index just like it would be done during a recovery process.- Throws:
IOException
-
load
public JournalCommand<?> load(Location location) throws IOException
Loads a previously stored JournalMessage- Parameters:
location
-- Returns:
- Throws:
IOException
-
process
protected void process(KahaAddMessageCommand command, Location location, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware runWithIndexLock) throws IOException
- Throws:
IOException
-
process
protected void process(KahaUpdateMessageCommand command, Location location) throws IOException
- Throws:
IOException
-
process
protected void process(KahaRemoveMessageCommand command, Location location) throws IOException
- Throws:
IOException
-
process
protected void process(KahaRemoveDestinationCommand command, Location location) throws IOException
- Throws:
IOException
-
process
protected void process(KahaSubscriptionCommand command, Location location) throws IOException
- Throws:
IOException
-
processLocation
protected void processLocation(Location location)
-
process
protected void process(KahaCommitCommand command, Location location, org.apache.activemq.store.kahadb.MessageDatabase.IndexAware before) throws IOException
- Throws:
IOException
-
process
protected void process(KahaPrepareCommand command, Location location)
-
process
protected void process(KahaRollbackCommand command, Location location) throws IOException
- Throws:
IOException
-
process
protected void process(KahaRewrittenDataFileCommand command, Location location) throws IOException
- Throws:
IOException
-
getStoredDestination
protected org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException
- Throws:
IOException
-
getStoredMessageStoreStatistics
protected MessageStoreStatistics getStoredMessageStoreStatistics(KahaDestination destination, Transaction tx) throws IOException
- Throws:
IOException
-
getExistingStoredDestination
protected org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination getExistingStoredDestination(KahaDestination destination, Transaction tx) throws IOException
- Throws:
IOException
-
clearStoreStats
protected void clearStoreStats(KahaDestination kahaDestination)
Clear the counter for the destination, if one exists.- Parameters:
kahaDestination
-
-
incrementAndAddSizeToStoreStat
protected void incrementAndAddSizeToStoreStat(Transaction tx, KahaDestination kahaDestination, long size) throws IOException
Update MessageStoreStatistics- Parameters:
kahaDestination
-size
-- Throws:
IOException
-
incrementAndAddSizeToStoreStat
protected void incrementAndAddSizeToStoreStat(Transaction tx, String kahaDestKey, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, long size) throws IOException
- Throws:
IOException
-
decrementAndSubSizeToStoreStat
protected void decrementAndSubSizeToStoreStat(Transaction tx, KahaDestination kahaDestination, long size) throws IOException
- Throws:
IOException
-
decrementAndSubSizeToStoreStat
protected void decrementAndSubSizeToStoreStat(Transaction tx, String kahaDestKey, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, long size) throws IOException
- Throws:
IOException
-
incrementAndAddSizeToStoreStat
protected void incrementAndAddSizeToStoreStat(KahaDestination kahaDestination, String subKey, long size)
-
incrementAndAddSizeToStoreStat
protected void incrementAndAddSizeToStoreStat(String kahaDestKey, String subKey, long size)
-
decrementAndSubSizeToStoreStat
protected void decrementAndSubSizeToStoreStat(String kahaDestKey, String subKey, long size)
-
decrementAndSubSizeToStoreStat
protected void decrementAndSubSizeToStoreStat(KahaDestination kahaDestination, String subKey, long size)
-
getStoreStats
protected MessageStoreStatistics getStoreStats(String kahaDestKey)
Locate the storeMessageSize counter for this KahaDestination
-
getSubStats
protected MessageStoreSubscriptionStatistics getSubStats(String kahaDestKey)
-
matchType
protected boolean matchType(Destination destination, KahaDestination.DestinationType type)
Determine whether this Destination matches the DestinationType- Parameters:
destination
-type
-- Returns:
-
getLastAck
public org.apache.activemq.store.kahadb.MessageDatabase.LastAck getLastAck(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey) throws IOException
- Throws:
IOException
-
getSequenceSet
protected SequenceSet getSequenceSet(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey) throws IOException
- Throws:
IOException
-
getStoredMessageCount
protected long getStoredMessageCount(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey) throws IOException
- Throws:
IOException
-
getStoredMessageSize
protected Map<String,AtomicLong> getStoredMessageSize(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, List<String> subscriptionKeys) throws IOException
Recovers durable subscription pending message size with only 1 pass over the order index on recovery instead of iterating over the index once per subscription- Parameters:
tx
-sd
-subscriptionKeys
-- Returns:
- Throws:
IOException
-
getStoredMessageSize
protected long getStoredMessageSize(Transaction tx, org.apache.activemq.store.kahadb.MessageDatabase.StoredDestination sd, String subscriptionKey) throws IOException
- Throws:
IOException
-
key
protected String key(KahaDestination destination)
-
createJournal
protected Journal createJournal() throws IOException
- Throws:
IOException
-
configureMetadata
protected abstract void configureMetadata()
-
getJournalMaxWriteBatchSize
public int getJournalMaxWriteBatchSize()
-
setJournalMaxWriteBatchSize
public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
-
getDirectory
public File getDirectory()
-
setDirectory
public void setDirectory(File directory)
-
isDeleteAllMessages
public boolean isDeleteAllMessages()
-
setDeleteAllMessages
public void setDeleteAllMessages(boolean deleteAllMessages)
-
setIndexWriteBatchSize
public void setIndexWriteBatchSize(int setIndexWriteBatchSize)
-
getIndexWriteBatchSize
public int getIndexWriteBatchSize()
-
setEnableIndexWriteAsync
public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
-
isEnableJournalDiskSyncs
@Deprecated public boolean isEnableJournalDiskSyncs()
Deprecated.usegetJournalDiskSyncStrategyEnum()
orgetJournalDiskSyncStrategy()
instead- Returns:
-
setEnableJournalDiskSyncs
@Deprecated public void setEnableJournalDiskSyncs(boolean syncWrites)
Deprecated.usesetEnableJournalDiskSyncs(boolean)
instead- Parameters:
syncWrites
-
-
getJournalDiskSyncStrategyEnum
public Journal.JournalDiskSyncStrategy getJournalDiskSyncStrategyEnum()
-
getJournalDiskSyncStrategy
public String getJournalDiskSyncStrategy()
-
setJournalDiskSyncStrategy
public void setJournalDiskSyncStrategy(String journalDiskSyncStrategy)
-
getJournalDiskSyncInterval
public long getJournalDiskSyncInterval()
-
setJournalDiskSyncInterval
public void setJournalDiskSyncInterval(long journalDiskSyncInterval)
-
getCheckpointInterval
public long getCheckpointInterval()
-
setCheckpointInterval
public void setCheckpointInterval(long checkpointInterval)
-
getCleanupInterval
public long getCleanupInterval()
-
setCleanupInterval
public void setCleanupInterval(long cleanupInterval)
-
getCleanupOnStop
public boolean getCleanupOnStop()
-
setCleanupOnStop
public void setCleanupOnStop(boolean cleanupOnStop)
-
setJournalMaxFileLength
public void setJournalMaxFileLength(int journalMaxFileLength)
-
getJournalMaxFileLength
public int getJournalMaxFileLength()
-
setMaxFailoverProducersToTrack
public void setMaxFailoverProducersToTrack(int maxFailoverProducersToTrack)
-
getMaxFailoverProducersToTrack
public int getMaxFailoverProducersToTrack()
-
setFailoverProducersAuditDepth
public void setFailoverProducersAuditDepth(int failoverProducersAuditDepth)
-
getFailoverProducersAuditDepth
public int getFailoverProducersAuditDepth()
-
getPageFile
public PageFile getPageFile() throws IOException
- Throws:
IOException
-
getJournal
public Journal getJournal() throws IOException
- Throws:
IOException
-
getMetadata
protected MessageDatabase.Metadata getMetadata()
-
isFailIfDatabaseIsLocked
public boolean isFailIfDatabaseIsLocked()
-
setFailIfDatabaseIsLocked
public void setFailIfDatabaseIsLocked(boolean failIfDatabaseIsLocked)
-
isIgnoreMissingJournalfiles
public boolean isIgnoreMissingJournalfiles()
-
setIgnoreMissingJournalfiles
public void setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
-
getIndexCacheSize
public int getIndexCacheSize()
-
setIndexCacheSize
public void setIndexCacheSize(int indexCacheSize)
-
isCheckForCorruptJournalFiles
public boolean isCheckForCorruptJournalFiles()
-
setCheckForCorruptJournalFiles
public void setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)
-
getPurgeRecoveredXATransactionStrategyEnum
public MessageDatabase.PurgeRecoveredXATransactionStrategy getPurgeRecoveredXATransactionStrategyEnum()
-
getPurgeRecoveredXATransactionStrategy
public String getPurgeRecoveredXATransactionStrategy()
-
setPurgeRecoveredXATransactionStrategy
public void setPurgeRecoveredXATransactionStrategy(String purgeRecoveredXATransactionStrategy)
-
isChecksumJournalFiles
public boolean isChecksumJournalFiles()
-
setChecksumJournalFiles
public void setChecksumJournalFiles(boolean checksumJournalFiles)
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
- Specified by:
setBrokerService
in interfaceBrokerServiceAware
-
isArchiveDataLogs
public boolean isArchiveDataLogs()
- Returns:
- the archiveDataLogs
-
setArchiveDataLogs
public void setArchiveDataLogs(boolean archiveDataLogs)
- Parameters:
archiveDataLogs
- the archiveDataLogs to set
-
getDirectoryArchive
public File getDirectoryArchive()
- Returns:
- the directoryArchive
-
setDirectoryArchive
public void setDirectoryArchive(File directoryArchive)
- Parameters:
directoryArchive
- the directoryArchive to set
-
isArchiveCorruptedIndex
public boolean isArchiveCorruptedIndex()
-
setArchiveCorruptedIndex
public void setArchiveCorruptedIndex(boolean archiveCorruptedIndex)
-
getIndexLFUEvictionFactor
public float getIndexLFUEvictionFactor()
-
setIndexLFUEvictionFactor
public void setIndexLFUEvictionFactor(float indexLFUEvictionFactor)
-
isUseIndexLFRUEviction
public boolean isUseIndexLFRUEviction()
-
setUseIndexLFRUEviction
public void setUseIndexLFRUEviction(boolean useIndexLFRUEviction)
-
setEnableIndexDiskSyncs
public void setEnableIndexDiskSyncs(boolean enableIndexDiskSyncs)
-
setEnableIndexRecoveryFile
public void setEnableIndexRecoveryFile(boolean enableIndexRecoveryFile)
-
setEnableIndexPageCaching
public void setEnableIndexPageCaching(boolean enableIndexPageCaching)
-
isEnableIndexDiskSyncs
public boolean isEnableIndexDiskSyncs()
-
isEnableIndexRecoveryFile
public boolean isEnableIndexRecoveryFile()
-
isEnableIndexPageCaching
public boolean isEnableIndexPageCaching()
-
getPersistenceAdapterStatistics
public PersistenceAdapterStatistics getPersistenceAdapterStatistics()
-
getIndexDirectory
public File getIndexDirectory()
-
setIndexDirectory
public void setIndexDirectory(File indexDirectory)
-
getPreallocationScope
public String getPreallocationScope()
-
setPreallocationScope
public void setPreallocationScope(String preallocationScope)
-
getPreallocationStrategy
public String getPreallocationStrategy()
-
setPreallocationStrategy
public void setPreallocationStrategy(String preallocationStrategy)
-
getCompactAcksAfterNoGC
public int getCompactAcksAfterNoGC()
-
setCompactAcksAfterNoGC
public void setCompactAcksAfterNoGC(int compactAcksAfterNoGC)
Sets the number of GC cycles where no journal logs were removed before an attempt to move forward all the acks in the last log that contains them and is otherwise unreferenced.A value of -1 will disable this feature.
- Parameters:
compactAcksAfterNoGC
- Number of empty GC cycles before we rewrite old ACKS.
-
isCompactAcksIgnoresStoreGrowth
public boolean isCompactAcksIgnoresStoreGrowth()
Returns whether Ack compaction will ignore that the store is still growing and run more often.- Returns:
- the compactAcksIgnoresStoreGrowth current value.
-
setCompactAcksIgnoresStoreGrowth
public void setCompactAcksIgnoresStoreGrowth(boolean compactAcksIgnoresStoreGrowth)
Configure if Ack compaction will occur regardless of continued growth of the journal logs meaning that the store has not run out of space yet. Because the compaction operation can be costly this value is defaulted to off and the Ack compaction is only done when it seems that the store cannot grow and larger.- Parameters:
compactAcksIgnoresStoreGrowth
- the compactAcksIgnoresStoreGrowth to set
-
isEnableAckCompaction
public boolean isEnableAckCompaction()
Returns whether Ack compaction is enabled- Returns:
- enableAckCompaction
-
setEnableAckCompaction
public void setEnableAckCompaction(boolean enableAckCompaction)
Configure if the Ack compaction task should be enabled to run- Parameters:
enableAckCompaction
-
-
isEnableSubscriptionStatistics
public boolean isEnableSubscriptionStatistics()
- Returns:
-
setEnableSubscriptionStatistics
public void setEnableSubscriptionStatistics(boolean enableSubscriptionStatistics)
Enable caching statistics for each subscription to allow non-blocking retrieval of metrics. This could incur some overhead to compute if there are a lot of subscriptions.- Parameters:
enableSubscriptionStatistics
-
-
-