1 17 package org.apache.sandesha.storage.dao; 18 19 import org.apache.sandesha.RMMessageContext; 20 21 import java.util.Set ; 22 23 26 27 public interface ISandeshaDAO { 28 29 33 boolean addIncomingSequence(String sequenceId); 34 35 36 40 boolean addOutgoingSequence(String sequenceId); 41 42 43 47 boolean addPriorityMessage(RMMessageContext message); 48 49 50 54 RMMessageContext getNextPriorityMessageContextToSend(); 55 56 57 61 boolean addMessageToIncomingSequence(String sequenceId, Long msgNo, 62 RMMessageContext rmMessageContext); 63 64 65 68 boolean addMessageToOutgoingSequence(String sequenceId, 69 RMMessageContext rmMessageContext); 70 71 72 76 boolean isIncomingSequenceExists(String sequenceId); 77 78 79 83 boolean isOutgoingSequenceExists(String sequenceId); 84 85 86 90 boolean isIncomingMessageExists(String sequenceId, Long msgNo); 91 92 93 97 RMMessageContext getNextMsgContextToProcess(Object seq); 98 99 100 103 RMMessageContext getNextOutgoingMsgContextToSend(); 104 105 public Object getRandomSeqToProcess(); 106 107 108 112 Set getAllReceivedMsgNumsOfIncomingSeq(String sequenceId); 113 114 115 122 void setOutSequence(String sequenceId, String outSequenceId); 123 124 125 132 void setOutSequenceApproved(String sequenceID, boolean approved); 133 134 135 139 String getSequenceOfOutSequence(String outsequenceId); 140 141 142 146 void removeCreateSequenceMsg(String messageId); 147 148 153 long getNextOutgoingMessageNumber(String sequenceId); 154 155 159 public RMMessageContext checkForResponseMessage(String requestId, String seqId); 160 161 164 public String searchForSequenceId(String messageId); 165 166 170 public void markOutgoingMessageToDelete(String sequenceId, Long msgNumber); 171 172 173 176 public void setAckReceived(String seqId, long msgNo); 177 178 183 public void addLowPriorityMessage(RMMessageContext msg); 184 185 188 public RMMessageContext getNextLowPriorityMessageContextToSend(); 189 190 194 public void addSendMsgNo(String seqId, long msgNo); 195 196 200 public boolean isSentMsg(String seqId, long msgNo); 201 202 203 207 public boolean hasLastIncomingMsgReceived(String seqId); 208 209 212 public long getLastIncomingMsgNo(String seqId); 213 214 218 public void addRequestedSequence(String seqId); 219 220 223 public boolean isRequestedSeqPresent(String seqId); 224 225 230 public String getKeyFromIncomingSequenceId(String incomingSeqID); 231 232 235 public String getKeyFromOutgoingSequenceId(String outgoingSeqID); 236 237 240 public void setTerminateSend(String seqId); 241 242 245 public void setTerminateReceived(String seqId); 246 247 250 public boolean isAllOutgoingTerminateSent(); 251 252 256 public boolean isAllIncommingTerminateReceived(); 257 258 261 public void setAcksTo(String seqId, String acksTo); 262 263 266 public String getAcksTo(String seqId); 267 268 271 void addOffer(String msgID, String offerID); 272 273 276 public String getOffer(String msgID); 277 278 281 void clear(); 282 283 public boolean isOutgoingTerminateSent(String seqId); 284 285 public boolean isIncommingTerminateReceived(String seqId); 286 287 public void updateFinalMessageArrivedTime(String sequenceID); 288 289 public void sendAck(String sequenceId); 290 291 public void removeAllAcks(String sequenceID); 292 } | Popular Tags |