|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.store.AbstractMessageStore
org.apache.activemq.store.jdbc.JDBCMessageStore
public class JDBCMessageStore
Field Summary | |
---|---|
protected JDBCAdapter |
adapter
|
protected ActiveMQMessageAudit |
audit
|
protected java.util.concurrent.atomic.AtomicLong |
lastRecoveredPriority
|
protected java.util.concurrent.atomic.AtomicLong |
lastRecoveredSequenceId
|
protected JDBCPersistenceAdapter |
persistenceAdapter
|
protected WireFormat |
wireFormat
|
Fields inherited from class org.apache.activemq.store.AbstractMessageStore |
---|
destination, FUTURE, prioritizedMessages |
Constructor Summary | |
---|---|
JDBCMessageStore(JDBCPersistenceAdapter persistenceAdapter,
JDBCAdapter adapter,
WireFormat wireFormat,
ActiveMQDestination destination,
ActiveMQMessageAudit audit)
|
Method Summary | |
---|---|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store |
void |
addMessageReference(ConnectionContext context,
MessageId messageId,
long expirationTime,
java.lang.String messageRef)
|
Message |
getMessage(MessageId messageId)
Looks up a message using either the String messageID or the messageNumber. |
int |
getMessageCount()
|
java.lang.String |
getMessageReference(MessageId messageId)
|
protected void |
onAdd(long sequenceId,
byte priority)
|
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 |
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 |
setPrioritizedMessages(boolean prioritizedMessages)
A hint to the store to try recover messages according to priority |
Methods inherited from class org.apache.activemq.store.AbstractMessageStore |
---|
asyncAddQueueMessage, asyncAddTopicMessage, dispose, getDestination, isEmpty, isPrioritizedMessages, removeAsyncMessage, setMemoryUsage, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final WireFormat wireFormat
protected final JDBCAdapter adapter
protected final JDBCPersistenceAdapter persistenceAdapter
protected java.util.concurrent.atomic.AtomicLong lastRecoveredSequenceId
protected java.util.concurrent.atomic.AtomicLong lastRecoveredPriority
protected ActiveMQMessageAudit audit
Constructor Detail |
---|
public JDBCMessageStore(JDBCPersistenceAdapter persistenceAdapter, JDBCAdapter adapter, WireFormat wireFormat, ActiveMQDestination destination, ActiveMQMessageAudit audit)
Method Detail |
---|
public void addMessage(ConnectionContext context, Message message) throws java.io.IOException
MessageStore
context
- context
java.io.IOException
protected void onAdd(long sequenceId, byte priority)
public void addMessageReference(ConnectionContext context, MessageId messageId, long expirationTime, java.lang.String messageRef) throws java.io.IOException
java.io.IOException
public Message getMessage(MessageId messageId) throws java.io.IOException
MessageStore
messageId
- which contains either the messageID or the messageNumber
java.io.IOException
public java.lang.String getMessageReference(MessageId messageId) throws java.io.IOException
java.io.IOException
public void removeMessage(ConnectionContext context, MessageAck ack) throws java.io.IOException
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 recover(MessageRecoveryListener listener) throws java.lang.Exception
MessageStore
java.lang.Exception
public void removeAllMessages(ConnectionContext context) throws java.io.IOException
MessageStore
java.io.IOException
MessageStore.removeAllMessages(ConnectionContext)
public int getMessageCount() throws java.io.IOException
java.io.IOException
public void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws java.lang.Exception
maxReturned
- listener
-
java.lang.Exception
MessageStore.recoverNextMessages(int,
org.apache.activemq.store.MessageRecoveryListener)
public void resetBatching()
MessageStore
MessageStore.resetBatching()
public void setBatch(MessageId messageId)
MessageStore
setBatch
in interface MessageStore
setBatch
in class AbstractMessageStore
public void setPrioritizedMessages(boolean prioritizedMessages)
MessageStore
setPrioritizedMessages
in interface MessageStore
setPrioritizedMessages
in class AbstractMessageStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |