|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.service.impl.PersistenceAdapterSupport
org.codehaus.activemq.store.howl.HowlPersistenceAdapter
An implementation of PersistenceAdapter
designed for
optimal use with Howl
as the transaction log and then checkpointing asynchronously
on a timeout with some other persistent storage.
Constructor Summary | |
HowlPersistenceAdapter()
|
|
HowlPersistenceAdapter(File directory,
PersistenceAdapter longTermPersistence)
|
Method Summary | |
void |
beginTransaction()
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 optimisation. |
void |
commitTransaction()
Commit a persistence transaction |
protected org.objectweb.howl.log.Configuration |
createConfiguration()
|
PreparedTransactionStore |
createPreparedTransactionStore()
Factory method to create a new persistent prepared transaction store for XA recovery |
MessageStore |
createQueueMessageStore(String destinationName)
Factory method to create a new queue message store with the given destination name |
TopicMessageStore |
createTopicMessageStore(String destinationName)
Factory method to create a new topic message store with the given destination name |
protected org.objectweb.howl.log.Logger |
createTransactionLog()
|
String |
getBufferClassName()
|
int |
getBufferSize()
|
org.objectweb.howl.log.Configuration |
getConfiguration()
|
File |
getDirectory()
|
int |
getFlushSleepTime()
|
Map |
getInitialDestinations()
Returns a map, indexed by String name, of all the Destination
objects active on startup. |
String |
getLogFileDir()
|
String |
getLogFileExt()
|
String |
getLogFileName()
|
PersistenceAdapter |
getLongTermPersistence()
|
int |
getMaxBlocksPerFile()
|
int |
getMaxBuffers()
|
int |
getMaximumCachedMessagesPerStore()
|
int |
getMaximumTotalCachedMessages()
|
int |
getMaxLogFiles()
|
int |
getMinBuffers()
|
int |
getThreadsWaitingForceThreshold()
|
org.objectweb.howl.log.Logger |
getTransactionLog()
|
boolean |
hasCacheCapacity(HowlMessageStore messageStore)
Return true if a store is allowed to cache a message. |
boolean |
isChecksumEnabled()
|
static HowlPersistenceAdapter |
newInstance(File directory)
Factory method to create an instance using the defaults |
void |
onMessageRemove(HowlMessageStore messageStore)
|
void |
rollbackTransaction()
Rollback a persistence transaction |
void |
setBufferClassName(String s)
|
void |
setBufferSize(int i)
|
void |
setChecksumEnabled(boolean b)
|
void |
setConfiguration(org.objectweb.howl.log.Configuration configuration)
|
void |
setDirectory(File directory)
|
void |
setFlushSleepTime(int i)
|
void |
setLogFileDir(String s)
|
void |
setLogFileExt(String s)
|
void |
setLogFileName(String s)
|
void |
setLongTermPersistence(PersistenceAdapter longTermPersistence)
|
void |
setMaxBlocksPerFile(int i)
|
void |
setMaxBuffers(int i)
|
void |
setMaximumCachedMessagesPerStore(int maximumCachedMessagesPerStore)
|
void |
setMaximumTotalCachedMessages(int maximumTotalCachedMessages)
|
void |
setMaxLogFiles(int i)
|
void |
setMinBuffers(int i)
|
void |
setThreadsWaitingForceThreshold(int i)
|
void |
setTransactionLog(org.objectweb.howl.log.Logger transactionLog)
|
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
Methods inherited from class org.codehaus.activemq.service.impl.PersistenceAdapterSupport |
createQueueMessageContainer, createTopicMessageContainer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HowlPersistenceAdapter()
public HowlPersistenceAdapter(File directory, PersistenceAdapter longTermPersistence)
Method Detail |
public static HowlPersistenceAdapter newInstance(File directory) throws JMSException
directory
- the directory in which to store the persistent files
JMSException
public Map getInitialDestinations()
PersistenceAdapter
Destination
objects active on startup.
public MessageStore createQueueMessageStore(String destinationName) throws JMSException
PersistenceAdapter
JMSException
public TopicMessageStore createTopicMessageStore(String destinationName) throws JMSException
PersistenceAdapter
JMSException
public PreparedTransactionStore createPreparedTransactionStore() throws JMSException
PersistenceAdapter
JMSException
public void beginTransaction() throws JMSException
PersistenceAdapter
JMSException
public void commitTransaction() throws JMSException
PersistenceAdapter
JMSException
PersistenceAdapter.beginTransaction()
public void rollbackTransaction()
PersistenceAdapter
PersistenceAdapter.beginTransaction()
public void start() throws JMSException
Service
JMSException
public void stop() throws JMSException
Service
JMSException
public boolean hasCacheCapacity(HowlMessageStore messageStore)
messageStore
-
public void onMessageRemove(HowlMessageStore messageStore)
public PersistenceAdapter getLongTermPersistence()
public void setLongTermPersistence(PersistenceAdapter longTermPersistence)
public int getMaximumCachedMessagesPerStore()
public void setMaximumCachedMessagesPerStore(int maximumCachedMessagesPerStore)
public int getMaximumTotalCachedMessages()
public void setMaximumTotalCachedMessages(int maximumTotalCachedMessages)
public File getDirectory()
public void setDirectory(File directory)
public org.objectweb.howl.log.Configuration getConfiguration() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setConfiguration(org.objectweb.howl.log.Configuration configuration)
public org.objectweb.howl.log.Logger getTransactionLog()
public void setTransactionLog(org.objectweb.howl.log.Logger transactionLog)
public String getBufferClassName() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getBufferSize() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getFlushSleepTime() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public String getLogFileDir() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public String getLogFileExt() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public String getLogFileName() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getMaxBlocksPerFile() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getMaxBuffers() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getMaxLogFiles() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getMinBuffers() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public int getThreadsWaitingForceThreshold() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public boolean isChecksumEnabled() throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setBufferClassName(String s) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setBufferSize(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setChecksumEnabled(boolean b) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setFlushSleepTime(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setLogFileDir(String s) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setLogFileExt(String s) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setLogFileName(String s) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setMaxBlocksPerFile(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setMaxBuffers(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setMaxLogFiles(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setMinBuffers(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
public void setThreadsWaitingForceThreshold(int i) throws org.objectweb.howl.log.LogConfigurationException, IOException
org.objectweb.howl.log.LogConfigurationException
IOException
protected org.objectweb.howl.log.Logger createTransactionLog() throws IOException, org.objectweb.howl.log.LogConfigurationException
IOException
org.objectweb.howl.log.LogConfigurationException
protected org.objectweb.howl.log.Configuration createConfiguration() throws IOException, org.objectweb.howl.log.LogConfigurationException
IOException
org.objectweb.howl.log.LogConfigurationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |