|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.store.journal.JournalMessageStore
A MessageStore that uses a Journal to store it's messages.
Field Summary | |
protected java.lang.String |
destinationName
|
protected java.util.HashSet |
inFlightTxLocations
|
protected org.activeio.journal.RecordLocation |
lastLocation
|
protected MessageStore |
longTermStore
|
protected JournalPersistenceAdapter |
peristenceAdapter
|
protected JournalTransactionStore |
transactionStore
|
protected TransactionTemplate |
transactionTemplate
|
Constructor Summary | |
JournalMessageStore(JournalPersistenceAdapter adapter,
MessageStore checkpointStore,
java.lang.String destinationName)
|
Method Summary | |
void |
addMessage(ActiveMQMessage message)
Not synchronized since the Journal has better throughput if you increase the number of conncurrent writes that it is doing. |
org.activeio.journal.RecordLocation |
checkpoint()
|
MessageStore |
getLongTermMessageStore()
|
ActiveMQMessage |
getMessage(MessageIdentity identity)
Looks up a message using either the String messageID or the messageNumber. |
void |
recover(RecoveryListener listener)
Replays the checkpointStore first as those messages are the oldest ones, then messages are replayed from the transaction log and then the cache is updated. |
void |
removeAllMessages()
Removes all the messages from the message store. |
void |
removeMessage(MessageAck ack)
Removes a message from the message store. |
void |
replayAddMessage(ActiveMQMessage msg)
|
void |
replayRemoveMessage(MessageAck ack)
|
void |
setCacheMessageStore(CacheMessageStore store)
|
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final JournalPersistenceAdapter peristenceAdapter
protected final MessageStore longTermStore
protected final java.lang.String destinationName
protected final TransactionTemplate transactionTemplate
protected java.util.HashSet inFlightTxLocations
protected org.activeio.journal.RecordLocation lastLocation
protected final JournalTransactionStore transactionStore
Constructor Detail |
public JournalMessageStore(JournalPersistenceAdapter adapter, MessageStore checkpointStore, java.lang.String destinationName)
Method Detail |
public void addMessage(ActiveMQMessage message) throws javax.jms.JMSException
addMessage
in interface MessageStore
javax.jms.JMSException
public void removeMessage(MessageAck ack) throws javax.jms.JMSException
MessageStore
removeMessage
in interface MessageStore
ack
- the ack request that cause the message to be removed. It conatins
the identity which contains the messageID of the message that needs to be removed.
javax.jms.JMSException
public org.activeio.journal.RecordLocation checkpoint() throws javax.jms.JMSException
javax.jms.JMSException
public ActiveMQMessage getMessage(MessageIdentity identity) throws javax.jms.JMSException
MessageStore
getMessage
in interface MessageStore
identity
- which contains either the messageID or the messageNumber
javax.jms.JMSException
public void recover(RecoveryListener listener) throws javax.jms.JMSException
recover
in interface MessageStore
listener
-
javax.jms.JMSException
public void start() throws javax.jms.JMSException
Service
start
in interface Service
javax.jms.JMSException
public void stop() throws javax.jms.JMSException
Service
stop
in interface Service
javax.jms.JMSException
public MessageStore getLongTermMessageStore()
public void setCacheMessageStore(CacheMessageStore store)
setCacheMessageStore
in interface CacheMessageStoreAware
CacheMessageStoreAware.setCacheMessageStore(org.activemq.store.cache.CacheMessageStore)
public void removeAllMessages() throws javax.jms.JMSException
MessageStore
removeAllMessages
in interface MessageStore
javax.jms.JMSException
MessageStore.removeAllMessages()
public void replayAddMessage(ActiveMQMessage msg)
public void replayRemoveMessage(MessageAck ack)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |