org.apache.activemq.store.journal
Class JournalTopicMessageStore
java.lang.Object
org.apache.activemq.store.AbstractMessageStore
org.apache.activemq.store.journal.JournalMessageStore
org.apache.activemq.store.journal.JournalTopicMessageStore
- All Implemented Interfaces:
- org.apache.activemq.Service, MessageStore, TopicMessageStore
public class JournalTopicMessageStore
- extends JournalMessageStore
- implements TopicMessageStore
A MessageStore that uses a Journal to store it's messages.
|
Method Summary |
void |
acknowledge(ConnectionContext context,
String clientId,
String subscriptionName,
org.apache.activemq.command.MessageId messageId,
org.apache.activemq.command.MessageAck originalAck)
|
protected void |
acknowledge(org.apache.activemq.command.MessageId messageId,
org.apache.activeio.journal.RecordLocation location,
SubscriptionKey key)
|
void |
addMessage(ConnectionContext context,
org.apache.activemq.command.Message message)
Not synchronized since the Journal has better throughput if you increase
the number of concurrent writes that it is doing. |
void |
addSubsciption(org.apache.activemq.command.SubscriptionInfo subscriptionInfo,
boolean retroactive)
|
org.apache.activeio.journal.RecordLocation |
checkpoint()
|
void |
deleteSubscription(String clientId,
String subscriptionName)
|
org.apache.activemq.command.SubscriptionInfo[] |
getAllSubscriptions()
|
TopicMessageStore |
getLongTermTopicMessageStore()
|
int |
getMessageCount(String clientId,
String subscriberName)
|
org.apache.activemq.command.SubscriptionInfo |
lookupSubscription(String clientId,
String subscriptionName)
|
void |
recoverNextMessages(String clientId,
String subscriptionName,
int maxReturned,
MessageRecoveryListener listener)
|
void |
recoverSubscription(String clientId,
String subscriptionName,
MessageRecoveryListener listener)
|
void |
replayAcknowledge(ConnectionContext context,
String clientId,
String subscritionName,
org.apache.activemq.command.MessageId messageId)
|
void |
resetBatching(String clientId,
String subscriptionName)
|
| Methods inherited from class org.apache.activemq.store.journal.JournalMessageStore |
addMessageReference, checkpoint, getLongTermMessageStore, getMessage, getMessageCount, getMessageReference, recover, recoverNextMessages, removeAllMessages, removeMessage, replayAddMessage, replayRemoveMessage, resetBatching, setBatch, setMemoryUsage, start, stop |
| Methods inherited from class org.apache.activemq.store.AbstractMessageStore |
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, isEmpty, isPrioritizedMessages, removeAsyncMessage, setPrioritizedMessages |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.activemq.store.MessageStore |
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getMessage, getMessageCount, isEmpty, isPrioritizedMessages, recover, recoverNextMessages, removeAllMessages, removeAsyncMessage, removeMessage, resetBatching, setBatch, setMemoryUsage, setPrioritizedMessages |
| Methods inherited from interface org.apache.activemq.Service |
start, stop |
JournalTopicMessageStore
public JournalTopicMessageStore(JournalPersistenceAdapter adapter,
TopicMessageStore checkpointStore,
org.apache.activemq.command.ActiveMQTopic destinationName)
recoverSubscription
public void recoverSubscription(String clientId,
String subscriptionName,
MessageRecoveryListener listener)
throws Exception
- Specified by:
recoverSubscription in interface TopicMessageStore
- Throws:
Exception
recoverNextMessages
public void recoverNextMessages(String clientId,
String subscriptionName,
int maxReturned,
MessageRecoveryListener listener)
throws Exception
- Specified by:
recoverNextMessages in interface TopicMessageStore
- Throws:
Exception
lookupSubscription
public org.apache.activemq.command.SubscriptionInfo lookupSubscription(String clientId,
String subscriptionName)
throws IOException
- Specified by:
lookupSubscription in interface TopicMessageStore
- Throws:
IOException
addSubsciption
public void addSubsciption(org.apache.activemq.command.SubscriptionInfo subscriptionInfo,
boolean retroactive)
throws IOException
- Specified by:
addSubsciption in interface TopicMessageStore
- Throws:
IOException
addMessage
public void addMessage(ConnectionContext context,
org.apache.activemq.command.Message message)
throws IOException
- Description copied from class:
JournalMessageStore
- Not synchronized since the Journal has better throughput if you increase
the number of concurrent writes that it is doing.
- Specified by:
addMessage in interface MessageStore- Overrides:
addMessage in class JournalMessageStore
- Throws:
IOException
acknowledge
public void acknowledge(ConnectionContext context,
String clientId,
String subscriptionName,
org.apache.activemq.command.MessageId messageId,
org.apache.activemq.command.MessageAck originalAck)
throws IOException
- Specified by:
acknowledge in interface TopicMessageStore
- Throws:
IOException
replayAcknowledge
public void replayAcknowledge(ConnectionContext context,
String clientId,
String subscritionName,
org.apache.activemq.command.MessageId messageId)
acknowledge
protected void acknowledge(org.apache.activemq.command.MessageId messageId,
org.apache.activeio.journal.RecordLocation location,
SubscriptionKey key)
- Parameters:
messageId - location - key -
checkpoint
public org.apache.activeio.journal.RecordLocation checkpoint()
throws IOException
- Overrides:
checkpoint in class JournalMessageStore
- Returns:
-
- Throws:
IOException
getLongTermTopicMessageStore
public TopicMessageStore getLongTermTopicMessageStore()
- Returns:
- Returns the longTermStore.
deleteSubscription
public void deleteSubscription(String clientId,
String subscriptionName)
throws IOException
- Specified by:
deleteSubscription in interface TopicMessageStore
- Throws:
IOException
getAllSubscriptions
public org.apache.activemq.command.SubscriptionInfo[] getAllSubscriptions()
throws IOException
- Specified by:
getAllSubscriptions in interface TopicMessageStore
- Throws:
IOException
getMessageCount
public int getMessageCount(String clientId,
String subscriberName)
throws IOException
- Specified by:
getMessageCount in interface TopicMessageStore
- Throws:
IOException
resetBatching
public void resetBatching(String clientId,
String subscriptionName)
- Specified by:
resetBatching in interface TopicMessageStore
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.