1 14 15 package org.apache.activemq.store; 16 17 import java.io.IOException ; 18 import org.apache.activemq.Service; 19 import org.apache.activemq.broker.ConnectionContext; 20 import org.apache.activemq.command.ActiveMQDestination; 21 import org.apache.activemq.command.Message; 22 import org.apache.activemq.command.MessageAck; 23 import org.apache.activemq.command.MessageId; 24 import org.apache.activemq.memory.UsageManager; 25 26 32 public interface MessageStore extends Service{ 33 34 41 public void addMessage(ConnectionContext context,Message message) throws IOException ; 42 43 51 public Message getMessage(MessageId identity) throws IOException ; 52 53 61 public void removeMessage(ConnectionContext context,MessageAck ack) throws IOException ; 62 63 69 public void removeAllMessages(ConnectionContext context) throws IOException ; 70 71 77 public void recover(MessageRecoveryListener container) throws Exception ; 78 79 84 public ActiveMQDestination getDestination(); 85 86 89 public void setUsageManager(UsageManager usageManager); 90 91 96 public int getMessageCount() throws IOException ; 97 98 104 public void resetBatching(); 105 106 107 public void recoverNextMessages(int maxReturned,MessageRecoveryListener listener) 108 throws Exception ; 109 110 } 111 | Popular Tags |