|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.store.kahadb.KahaDBPersistenceAdapter
public class KahaDBPersistenceAdapter
An implementation of PersistenceAdapter
designed for use with a
Journal
and then check pointing asynchronously on a timeout with some
other long term persistent storage.
Constructor Summary | |
---|---|
KahaDBPersistenceAdapter()
|
Method Summary | |
---|---|
void |
beginTransaction(ConnectionContext context)
This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimization. |
void |
checkpoint(boolean sync)
checkpoint any |
void |
commitTransaction(ConnectionContext context)
Commit a persistence transaction |
MessageStore |
createQueueMessageStore(ActiveMQQueue destination)
Factory method to create a new queue message store with the given destination name |
TopicMessageStore |
createTopicMessageStore(ActiveMQTopic destination)
Factory method to create a new topic message store with the given destination name |
TransactionStore |
createTransactionStore()
Factory method to create a new persistent prepared transaction store for XA recovery |
void |
deleteAllMessages()
Delete's all the messages in the persistent store. |
long |
getCheckpointInterval()
Get the checkpointInterval |
long |
getCleanupInterval()
Get the cleanupInterval |
Set<ActiveMQDestination> |
getDestinations()
Returns a set of all the ActiveMQDestination
objects that the persistence store is aware exist. |
File |
getDirectory()
Get the directory |
int |
getIndexCacheSize()
Get the indexCacheSize |
int |
getIndexWriteBatchSize()
Get the indexWriteBatchSize |
int |
getJournalMaxFileLength()
Get the journalMaxFileLength |
int |
getJournalMaxWriteBatchSize()
Get the journalMaxWriteBatchSize |
long |
getLastMessageBrokerSequenceId()
|
boolean |
isCheckForCorruptJournalFiles()
|
boolean |
isChecksumJournalFiles()
|
boolean |
isEnableIndexWriteAsync()
Get the enableIndexWriteAsync |
boolean |
isEnableJournalDiskSyncs()
Get the enableJournalDiskSyncs |
boolean |
isIgnoreMissingJournalfiles()
Get the ignoreMissingJournalfiles |
void |
removeQueueMessageStore(ActiveMQQueue destination)
Cleanup method to remove any state associated with the given destination. |
void |
removeTopicMessageStore(ActiveMQTopic destination)
Cleanup method to remove any state associated with the given destination This method does not stop the message store (it might not be cached). |
void |
rollbackTransaction(ConnectionContext context)
Rollback a persistence transaction |
void |
setBrokerName(String brokerName)
Set the name of the broker using the adapter |
void |
setBrokerService(BrokerService brokerService)
|
void |
setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)
|
void |
setCheckpointInterval(long checkpointInterval)
Set the checkpointInterval |
void |
setChecksumJournalFiles(boolean checksumJournalFiles)
|
void |
setCleanupInterval(long cleanupInterval)
Set the cleanupInterval |
void |
setDirectory(File dir)
Set the directory where any data files should be created |
void |
setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
Set the enableIndexWriteAsync |
void |
setEnableJournalDiskSyncs(boolean enableJournalDiskSyncs)
Set the enableJournalDiskSyncs |
void |
setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
Set the ignoreMissingJournalfiles |
void |
setIndexCacheSize(int indexCacheSize)
Set the indexCacheSize |
void |
setIndexWriteBatchSize(int indexWriteBatchSize)
Set the indexWriteBatchSize |
void |
setJournalMaxFileLength(int journalMaxFileLength)
When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used |
void |
setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
Set the journalMaxWriteBatchSize |
void |
setUsageManager(SystemUsage usageManager)
|
long |
size()
A hint to return the size of the store on disk |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KahaDBPersistenceAdapter()
Method Detail |
---|
public void beginTransaction(ConnectionContext context) throws IOException
PersistenceAdapter
beginTransaction
in interface PersistenceAdapter
context
-
IOException
PersistenceAdapter.beginTransaction(org.apache.activemq.broker.ConnectionContext)
public void checkpoint(boolean sync) throws IOException
PersistenceAdapter
checkpoint
in interface PersistenceAdapter
sync
-
IOException
PersistenceAdapter.checkpoint(boolean)
public void commitTransaction(ConnectionContext context) throws IOException
PersistenceAdapter
commitTransaction
in interface PersistenceAdapter
context
-
IOException
PersistenceAdapter.commitTransaction(org.apache.activemq.broker.ConnectionContext)
public MessageStore createQueueMessageStore(ActiveMQQueue destination) throws IOException
PersistenceAdapter
createQueueMessageStore
in interface PersistenceAdapter
destination
-
IOException
PersistenceAdapter.createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)
public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException
PersistenceAdapter
createTopicMessageStore
in interface PersistenceAdapter
destination
-
IOException
PersistenceAdapter.createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)
public TransactionStore createTransactionStore() throws IOException
PersistenceAdapter
createTransactionStore
in interface PersistenceAdapter
IOException
PersistenceAdapter.createTransactionStore()
public void deleteAllMessages() throws IOException
PersistenceAdapter
deleteAllMessages
in interface PersistenceAdapter
IOException
PersistenceAdapter.deleteAllMessages()
public Set<ActiveMQDestination> getDestinations()
PersistenceAdapter
ActiveMQDestination
objects that the persistence store is aware exist.
getDestinations
in interface PersistenceAdapter
PersistenceAdapter.getDestinations()
public long getLastMessageBrokerSequenceId() throws IOException
getLastMessageBrokerSequenceId
in interface PersistenceAdapter
IOException
PersistenceAdapter.getLastMessageBrokerSequenceId()
public void removeQueueMessageStore(ActiveMQQueue destination)
PersistenceAdapter
removeQueueMessageStore
in interface PersistenceAdapter
destination
- PersistenceAdapter.removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue)
public void removeTopicMessageStore(ActiveMQTopic destination)
PersistenceAdapter
removeTopicMessageStore
in interface PersistenceAdapter
destination
- PersistenceAdapter.removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic)
public void rollbackTransaction(ConnectionContext context) throws IOException
PersistenceAdapter
rollbackTransaction
in interface PersistenceAdapter
context
-
IOException
PersistenceAdapter.rollbackTransaction(org.apache.activemq.broker.ConnectionContext)
public void setBrokerName(String brokerName)
PersistenceAdapter
setBrokerName
in interface PersistenceAdapter
brokerName
- PersistenceAdapter.setBrokerName(java.lang.String)
public void setUsageManager(SystemUsage usageManager)
setUsageManager
in interface PersistenceAdapter
usageManager
- PersistenceAdapter.setUsageManager(org.apache.activemq.usage.SystemUsage)
public long size()
PersistenceAdapter
size
in interface PersistenceAdapter
PersistenceAdapter.size()
public void start() throws Exception
start
in interface Service
Exception
Service.start()
public void stop() throws Exception
stop
in interface Service
Exception
Service.stop()
public int getJournalMaxFileLength()
public void setJournalMaxFileLength(int journalMaxFileLength)
public long getCheckpointInterval()
public void setCheckpointInterval(long checkpointInterval)
checkpointInterval
- the checkpointInterval to setpublic long getCleanupInterval()
public void setCleanupInterval(long cleanupInterval)
cleanupInterval
- the cleanupInterval to setpublic int getIndexWriteBatchSize()
public void setIndexWriteBatchSize(int indexWriteBatchSize)
indexWriteBatchSize
- the indexWriteBatchSize to setpublic int getJournalMaxWriteBatchSize()
public void setJournalMaxWriteBatchSize(int journalMaxWriteBatchSize)
journalMaxWriteBatchSize
- the journalMaxWriteBatchSize to setpublic boolean isEnableIndexWriteAsync()
public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
enableIndexWriteAsync
- the enableIndexWriteAsync to setpublic File getDirectory()
public void setDirectory(File dir)
PersistenceAdapter
setDirectory
in interface PersistenceAdapter
dir
- PersistenceAdapter.setDirectory(java.io.File)
public boolean isEnableJournalDiskSyncs()
public void setEnableJournalDiskSyncs(boolean enableJournalDiskSyncs)
enableJournalDiskSyncs
- the enableJournalDiskSyncs to setpublic int getIndexCacheSize()
public void setIndexCacheSize(int indexCacheSize)
indexCacheSize
- the indexCacheSize to setpublic boolean isIgnoreMissingJournalfiles()
public void setIgnoreMissingJournalfiles(boolean ignoreMissingJournalfiles)
ignoreMissingJournalfiles
- the ignoreMissingJournalfiles to setpublic boolean isChecksumJournalFiles()
public boolean isCheckForCorruptJournalFiles()
public void setChecksumJournalFiles(boolean checksumJournalFiles)
public void setCheckForCorruptJournalFiles(boolean checkForCorruptJournalFiles)
public void setBrokerService(BrokerService brokerService)
setBrokerService
in interface BrokerServiceAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |