|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.store.ProxyTopicMessageStore
public class ProxyTopicMessageStore
A simple proxy that delegates to another MessageStore.
| Constructor Summary | |
|---|---|
ProxyTopicMessageStore(TopicMessageStore delegate)
|
|
| Method Summary | |
|---|---|
void |
acknowledge(ConnectionContext context,
String clientId,
String subscriptionName,
MessageId messageId,
MessageAck ack)
Stores the last acknowledged messgeID for the given subscription so that we can recover and commence dispatching messages from the last checkpoint |
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
void |
addMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store |
void |
addSubsciption(SubscriptionInfo subscriptionInfo,
boolean retroactive)
Inserts the subscriber info due to a subscription change If this is a new subscription and the retroactive is false, then the last message sent to the topic should be set as the last message acknowledged by they new subscription. |
Future<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
Future<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store |
Future<Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
Future<Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store |
void |
deleteSubscription(String clientId,
String subscriptionName)
|
void |
dispose(ConnectionContext context)
|
SubscriptionInfo[] |
getAllSubscriptions()
Lists all the durable subscriptions for a given destination. |
MessageStore |
getDelegate()
|
ActiveMQDestination |
getDestination()
The destination that the message store is holding messages for. |
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the messageNumber. |
int |
getMessageCount()
|
int |
getMessageCount(String clientId,
String subscriberName)
Get the number of messages ready to deliver from the store to a durable subscriber |
boolean |
isEmpty()
flag to indicate if the store is empty |
boolean |
isPrioritizedMessages()
|
SubscriptionInfo |
lookupSubscription(String clientId,
String subscriptionName)
Finds the subscriber entry for the given consumer info |
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered. |
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener)
|
void |
recoverNextMessages(String clientId,
String subscriptionName,
int maxReturned,
MessageRecoveryListener listener)
For an active subscription - retrieve messages from the store for the subscriber after the lastMessageId messageId |
void |
recoverSubscription(String clientId,
String subscriptionName,
MessageRecoveryListener listener)
For the new subscription find the last acknowledged message ID and then find any new messages since then and dispatch them to the subscription. |
void |
removeAllMessages(ConnectionContext context)
Removes all the messages from the message store. |
void |
removeAsyncMessage(ConnectionContext context,
MessageAck ack)
|
void |
removeMessage(ConnectionContext context,
MessageAck ack)
Removes a message from the message store. |
void |
resetBatching()
A hint to the Store to reset any batching state for the Destination |
void |
resetBatching(String clientId,
String subscriptionName)
A hint to the Store to reset any batching state for a durable subscriber |
void |
setBatch(MessageId messageId)
allow caching cursors to set the current batch offset when cache is exhausted |
void |
setMemoryUsage(MemoryUsage memoryUsage)
|
void |
setPrioritizedMessages(boolean prioritizedMessages)
A hint to the store to try recover messages according to priority |
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 ProxyTopicMessageStore(TopicMessageStore delegate)
| Method Detail |
|---|
public MessageStore getDelegate()
public void addMessage(ConnectionContext context,
Message message)
throws IOException
MessageStore
addMessage in interface MessageStorecontext - context
IOException
public void addMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
throws IOException
MessageStore
addMessage in interface MessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the disk
IOException
public Message getMessage(MessageId identity)
throws IOException
MessageStore
getMessage in interface MessageStoreidentity - which contains either the messageID or the messageNumber
IOException
public void recover(MessageRecoveryListener listener)
throws Exception
MessageStore
recover in interface MessageStoreException
public void removeAllMessages(ConnectionContext context)
throws IOException
MessageStore
removeAllMessages in interface MessageStoreIOException
public void removeMessage(ConnectionContext context,
MessageAck ack)
throws IOException
MessageStore
removeMessage in interface MessageStoreack - 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.
IOException
public void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceException
public SubscriptionInfo lookupSubscription(String clientId,
String subscriptionName)
throws IOException
TopicMessageStore
lookupSubscription in interface TopicMessageStoreIOException
public void acknowledge(ConnectionContext context,
String clientId,
String subscriptionName,
MessageId messageId,
MessageAck ack)
throws IOException
TopicMessageStore
acknowledge in interface TopicMessageStoreIOException
public void addSubsciption(SubscriptionInfo subscriptionInfo,
boolean retroactive)
throws IOException
TopicMessageStore
addSubsciption in interface TopicMessageStoreIOException
public void deleteSubscription(String clientId,
String subscriptionName)
throws IOException
deleteSubscription in interface TopicMessageStoreIOException
public void recoverSubscription(String clientId,
String subscriptionName,
MessageRecoveryListener listener)
throws Exception
TopicMessageStore
recoverSubscription in interface TopicMessageStoreException
public void recoverNextMessages(String clientId,
String subscriptionName,
int maxReturned,
MessageRecoveryListener listener)
throws Exception
TopicMessageStore
recoverNextMessages in interface TopicMessageStoreException
public void resetBatching(String clientId,
String subscriptionName)
TopicMessageStore
resetBatching in interface TopicMessageStorepublic ActiveMQDestination getDestination()
MessageStore
getDestination in interface MessageStore
public SubscriptionInfo[] getAllSubscriptions()
throws IOException
TopicMessageStore
getAllSubscriptions in interface TopicMessageStoreIOExceptionpublic void setMemoryUsage(MemoryUsage memoryUsage)
setMemoryUsage in interface MessageStorememoryUsage - The SystemUsage that is controlling the
destination's memory usage.
public int getMessageCount(String clientId,
String subscriberName)
throws IOException
TopicMessageStore
getMessageCount in interface TopicMessageStoreIOException
public int getMessageCount()
throws IOException
getMessageCount in interface MessageStoreIOException
public void recoverNextMessages(int maxReturned,
MessageRecoveryListener listener)
throws Exception
recoverNextMessages in interface MessageStoreExceptionpublic void dispose(ConnectionContext context)
dispose in interface MessageStorepublic void resetBatching()
MessageStore
resetBatching in interface MessageStore
public void setBatch(MessageId messageId)
throws Exception
MessageStore
setBatch in interface MessageStoreException
public boolean isEmpty()
throws Exception
MessageStore
isEmpty in interface MessageStoreException
public Future<Object> asyncAddTopicMessage(ConnectionContext context,
Message message)
throws IOException
MessageStore
asyncAddTopicMessage in interface MessageStorecontext - context
IOException
public Future<Object> asyncAddTopicMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
throws IOException
MessageStore
asyncAddTopicMessage in interface MessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the disk
IOException
public Future<Object> asyncAddQueueMessage(ConnectionContext context,
Message message)
throws IOException
MessageStore
asyncAddQueueMessage in interface MessageStorecontext - context
IOException
public Future<Object> asyncAddQueueMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
throws IOException
MessageStore
asyncAddQueueMessage in interface MessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the disk
IOException
public void removeAsyncMessage(ConnectionContext context,
MessageAck ack)
throws IOException
removeAsyncMessage in interface MessageStoreIOExceptionpublic void setPrioritizedMessages(boolean prioritizedMessages)
MessageStore
setPrioritizedMessages in interface MessageStorepublic boolean isPrioritizedMessages()
isPrioritizedMessages in interface MessageStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||