1 14 package org.apache.activemq.broker.region.cursors; 15 16 import java.io.IOException ; 17 import java.util.LinkedList ; 18 19 import org.apache.activemq.Service; 20 import org.apache.activemq.broker.ConnectionContext; 21 import org.apache.activemq.broker.region.Destination; 22 import org.apache.activemq.broker.region.MessageReference; 23 import org.apache.activemq.memory.UsageManager; 24 25 30 public interface PendingMessageCursor extends Service{ 31 32 33 39 public void add(ConnectionContext context, Destination destination) throws Exception ; 40 41 47 public void remove(ConnectionContext context, Destination destination) throws Exception ; 48 51 public boolean isEmpty(); 52 53 58 public boolean isEmpty(Destination destination); 59 60 64 public void reset(); 65 66 71 public void release(); 72 73 79 public void addMessageLast(MessageReference node) throws Exception ; 80 81 86 public void addMessageFirst(MessageReference node) throws Exception ; 87 88 93 public void addRecoveredMessage(MessageReference node) throws Exception ; 94 95 98 public boolean hasNext(); 99 100 103 public MessageReference next(); 104 105 109 public void remove(); 110 111 114 public int size(); 115 116 120 public void clear(); 121 122 127 public boolean isRecoveryRequired(); 128 129 132 public int getMaxBatchSize(); 133 134 138 public void setMaxBatchSize(int maxBatchSize); 139 140 144 public void resetForGC(); 145 146 150 public void remove(MessageReference node); 151 152 153 157 public void gc(); 158 159 164 public void setUsageManager(UsageManager usageManager); 165 166 169 public UsageManager getUsageManager(); 170 171 174 public int getMemoryUsageHighWaterMark(); 175 176 177 180 public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark); 181 182 183 186 public boolean isFull(); 187 188 191 public boolean hasMessagesBufferedToDeliver(); 192 193 197 public void destroy() throws Exception ; 198 199 204 public LinkedList pageInList(int maxItems); 205 206 207 } 208 | Popular Tags |