|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.store.ProxyMessageStore
public class ProxyMessageStore
A simple proxy that delegates to another MessageStore.
Constructor Summary | |
---|---|
ProxyMessageStore(MessageStore delegate)
|
Method Summary | |
---|---|
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 |
java.util.concurrent.Future<java.lang.Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
java.util.concurrent.Future<java.lang.Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store |
java.util.concurrent.Future<java.lang.Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
java.util.concurrent.Future<java.lang.Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store |
void |
dispose(ConnectionContext context)
|
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()
|
boolean |
isEmpty()
flag to indicate if the store is empty |
boolean |
isPrioritizedMessages()
|
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered. |
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener)
|
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 |
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 ProxyMessageStore(MessageStore delegate)
Method Detail |
---|
public MessageStore getDelegate()
public void addMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStore
addMessage
in interface MessageStore
context
- context
java.io.IOException
public void addMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws java.io.IOException
MessageStore
addMessage
in interface MessageStore
context
- contextcanOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the disk
java.io.IOException
public Message getMessage(MessageId identity) throws java.io.IOException
MessageStore
getMessage
in interface MessageStore
identity
- which contains either the messageID or the messageNumber
java.io.IOException
public void recover(MessageRecoveryListener listener) throws java.lang.Exception
MessageStore
recover
in interface MessageStore
java.lang.Exception
public void removeAllMessages(ConnectionContext context) throws java.io.IOException
MessageStore
removeAllMessages
in interface MessageStore
java.io.IOException
public void removeMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
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.
java.io.IOException
public void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
public void dispose(ConnectionContext context)
dispose
in interface MessageStore
public ActiveMQDestination getDestination()
MessageStore
getDestination
in interface MessageStore
public void setMemoryUsage(MemoryUsage memoryUsage)
setMemoryUsage
in interface MessageStore
memoryUsage
- The SystemUsage that is controlling the
destination's memory usage.public int getMessageCount() throws java.io.IOException
getMessageCount
in interface MessageStore
java.io.IOException
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws java.lang.Exception
recoverNextMessages
in interface MessageStore
java.lang.Exception
public void resetBatching()
MessageStore
resetBatching
in interface MessageStore
public void setBatch(MessageId messageId) throws java.lang.Exception
MessageStore
setBatch
in interface MessageStore
java.lang.Exception
public boolean isEmpty() throws java.lang.Exception
MessageStore
isEmpty
in interface MessageStore
java.lang.Exception
public java.util.concurrent.Future<java.lang.Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStore
asyncAddQueueMessage
in interface MessageStore
context
- context
java.io.IOException
public java.util.concurrent.Future<java.lang.Object> asyncAddQueueMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws java.io.IOException
MessageStore
asyncAddQueueMessage
in interface MessageStore
context
- contextcanOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the disk
java.io.IOException
public java.util.concurrent.Future<java.lang.Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStore
asyncAddTopicMessage
in interface MessageStore
context
- context
java.io.IOException
public java.util.concurrent.Future<java.lang.Object> asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws java.io.IOException
MessageStore
asyncAddTopicMessage
in interface MessageStore
context
- contextcanOptimizeHint
- - give a hint to the store that the message may be consumed before it hits the disk
java.io.IOException
public void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
removeAsyncMessage
in interface MessageStore
java.io.IOException
public void setPrioritizedMessages(boolean prioritizedMessages)
MessageStore
setPrioritizedMessages
in interface MessageStore
public boolean isPrioritizedMessages()
isPrioritizedMessages
in interface MessageStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |