1 17 package org.apache.sandesha; 18 19 import org.apache.sandesha.storage.Callback; 20 21 import java.util.Map ; 22 23 27 public interface IStorageManager { 28 void init(); 29 30 boolean isSequenceExist(String sequenceID); 31 32 boolean isResponseSequenceExist(String sequenceID); 33 34 Object getNextSeqToProcess(); 35 36 RMMessageContext getNextMessageToProcess(Object seq); 37 38 void setAcknowledged(String seqID, long msgNumber); 39 40 void addSequence(String sequenceID); 41 42 void addCreateSequenceResponse(RMMessageContext rmMessageContext); 43 44 void addCreateSequenceRequest(RMMessageContext rmMessageContext); 45 46 void addAcknowledgement(RMMessageContext rmMessageContext); 47 48 boolean isMessageExist(String sequenceID, long messageNumber); 49 50 Map getListOfMessageNumbers(String sequenceID); 51 52 RMMessageContext getNextMessageToSend(); 53 54 void setTemporaryOutSequence(String sequenceId, String outSequenceId); 55 56 boolean setApprovedOutSequence(String oldOutsequenceId, String newOutSequenceId); 57 58 long getNextMessageNumber(String sequenceID); 59 60 void insertOutgoingMessage(RMMessageContext rmMessageContext); 61 62 void insertIncomingMessage(RMMessageContext rmMessageContext); 63 64 RMMessageContext checkForResponseMessage(String sequenceId, String requestMsgId); 65 66 void insertTerminateSeqMessage(RMMessageContext terminateSeqMessage); 67 68 void setAckReceived(String seqId, long msgNo); 69 70 void insertFault(RMMessageContext rmMsgCtx); 71 72 void addSendMsgNo(String seqId, long msgNo); 73 74 boolean isSentMsg(String seqId, long msgNo); 75 76 boolean hasLastIncomingMsgReceived(String seqId); 77 78 long getLastIncomingMsgNo(String seqId); 79 80 void addOutgoingSequence(String seqId); 81 82 void addIncomingSequence(String seqId); 83 84 String getOutgoingSeqOfMsg(String msgId); 85 86 void addRequestedSequence(String seqId); 87 88 boolean isRequestedSeqPresent(String seqId); 89 90 String getOutgoingSeqenceIdOfIncomingMsg(RMMessageContext msg); 91 92 void setTerminateSend(String seqId); 93 94 void setTerminateReceived(String seqId); 95 96 String getKeyFromOutgoingSeqId(String seqId); 97 98 void setAcksTo(String seqId, String acksTo); 99 100 String getAcksTo(String seqId); 101 102 void setCallback(Callback callBack); 103 104 void removeCallback(); 105 106 void addOffer(String msgID, String offerID); 107 108 String getOffer(String msgID); 109 110 void clearStorage(); 111 112 boolean isSequenceComplete(String seqId); 113 114 void sendAck(String sequenceId); 115 } | Popular Tags |