cgl.narada.wsinfra.wsrm.storage
Interface WsrmProtocolStorageOperations

All Known Implementing Classes:
WsrmProtocolStorageOperationsImpl

public interface WsrmProtocolStorageOperations

This class pertains to storage operations related to the WSRM protocol. These include functions such as
(a) Storage of sent/received messages over a sequence.
(b) Processing acknowledgements for a given sequence from over a set of message numbers.
(c) Retrieving messages for retransmissions.
(d) Retrieving the message numbers for a given sequence that have not been acknowledged yet.
(e) Retrieval of the last message number for a sequence.


Method Summary
 long[] getAcknowledgedMessageNumbers(String sequenceIdentifier)
          Retrieves the list of message numbers that have been acknowledged This method throws WsrmStorageException.
 long getMessageNumberLastAssigned(String sequenceIdentifier)
          Retrieves the message number that was last assigned on a given sequence.
 WsrmStorageWidget getStoredElement(String sequenceIdentifier, long messageNumber)
          Retrieves a stored WsrmStorageWidget from storage.
 WsrmStorageWidget[] getStoredElements(String sequenceIdentifier, long[] messageNumbers)
          Retrieves stored WsrmStorageWidgets from storage.
 long[] getUnacknowledgedMessageNumbers(String sequenceIdentifier, boolean ackRequested)
          Retrieves the list of message numbers that have NOT been acknowledged for a given Sequence.
 long[] getUnacknowledgedMessageNumbers(String sequenceIdentifier, long upUntilMessageNumber)
          Retrieves the list of message numbers that have NOT been acknowledged, up until the message number specified in upUntilMessageNumber This method throws an exception under the following conditions.
 boolean hasStoredElement(String sequenceIdentifier, long messageNumber)
          Check to see if there is a widget that has been stored for a specific message number in a given Sequence
 boolean hasStoredElements(String sequenceIdentifier)
          Checks to see if there are widgets that have been stored for the sequence in question.
 void processAcknowledgementOnSequence(String sequenceIdentifier, long ackMessageNumber)
          Processes an acknowledgement received on a given sequence for a specific message number.
 void processAcknowledgementsOnSequence(String sequenceIdentifier, long[] ackMessageNumbers)
          Processes a set of acknowledgements received on a given sequence.
 void resetAckInterval(WsrmStorageWidget wsrmStorageWidget, long ackInterval)
          Reset the ack interval associated with the message
 void store(WsrmStorageWidget widget)
          Store a WSRM message to storage.
 

Method Detail

processAcknowledgementsOnSequence

void processAcknowledgementsOnSequence(String sequenceIdentifier,
                                       long[] ackMessageNumbers)
                                       throws WsrmStorageException
Processes a set of acknowledgements received on a given sequence. This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
One or more of the acknowledgements refer to non-existent message numbers.
Storage related problems

Throws:
WsrmStorageException

processAcknowledgementOnSequence

void processAcknowledgementOnSequence(String sequenceIdentifier,
                                      long ackMessageNumber)
                                      throws WsrmStorageException
Processes an acknowledgement received on a given sequence for a specific message number. This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
The acknowledgement refers to non-existent message number
Storage related problems

Throws:
WsrmStorageException

getUnacknowledgedMessageNumbers

long[] getUnacknowledgedMessageNumbers(String sequenceIdentifier,
                                       long upUntilMessageNumber)
                                       throws WsrmStorageException
Retrieves the list of message numbers that have NOT been acknowledged, up until the message number specified in upUntilMessageNumber This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
The specified message number is a non-existent one.
Storage related problems

Throws:
WsrmStorageException

getUnacknowledgedMessageNumbers

long[] getUnacknowledgedMessageNumbers(String sequenceIdentifier,
                                       boolean ackRequested)
                                       throws WsrmStorageException
Retrieves the list of message numbers that have NOT been acknowledged for a given Sequence. The message numbers returned are those for which the ackInterval has expired. The ackRequested variable if it is true indicates that this constraint is no longer valid, and ALL message numbers that have not been acknowledged should be returned. This method throws an exception if the Sequence specified in sequenceIdentifier is an unknown one or if there are other storage problems.

Throws:
WsrmStorageException

getAcknowledgedMessageNumbers

long[] getAcknowledgedMessageNumbers(String sequenceIdentifier)
                                     throws WsrmStorageException
Retrieves the list of message numbers that have been acknowledged This method throws WsrmStorageException.

Throws:
WsrmStorageException

getMessageNumberLastAssigned

long getMessageNumberLastAssigned(String sequenceIdentifier)
                                  throws WsrmStorageException
Retrieves the message number that was last assigned on a given sequence. This method throws an exception if the Sequence specified in sequenceIdentifier is an unknown one or if there are storage related problems.

Throws:
WsrmStorageException

store

void store(WsrmStorageWidget widget)
           throws WsrmStorageException
Store a WSRM message to storage. This method throws an exception if there are storage related problems.

Throws:
WsrmStorageException

hasStoredElements

boolean hasStoredElements(String sequenceIdentifier)
                          throws WsrmStorageException
Checks to see if there are widgets that have been stored for the sequence in question.

Throws:
WsrmStorageException

hasStoredElement

boolean hasStoredElement(String sequenceIdentifier,
                         long messageNumber)
                         throws WsrmStorageException
Check to see if there is a widget that has been stored for a specific message number in a given Sequence

Throws:
WsrmStorageException

getStoredElement

WsrmStorageWidget getStoredElement(String sequenceIdentifier,
                                   long messageNumber)
                                   throws WsrmStorageException
Retrieves a stored WsrmStorageWidget from storage. This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
The specified message number is a non-existent one.
Storage related problems

Throws:
WsrmStorageException

getStoredElements

WsrmStorageWidget[] getStoredElements(String sequenceIdentifier,
                                      long[] messageNumbers)
                                      throws WsrmStorageException
Retrieves stored WsrmStorageWidgets from storage. This method throws an exception under the following conditions.
The Sequence specified in sequenceIdentifier is an unknown one.
One or more of the specified message numbers are non-existent.
Storage related problems

Throws:
WsrmStorageException

resetAckInterval

void resetAckInterval(WsrmStorageWidget wsrmStorageWidget,
                      long ackInterval)
                      throws WsrmStorageException
Reset the ack interval associated with the message

Throws:
WsrmStorageException


For comments and suggestions please send e-mail to The NaradaBrokering Project