cgl.narada.wsinfra.wsr.storage
Interface WsrProtocolStorageOperations

All Known Implementing Classes:
WsrProtocolStorageOperationsImpl

public interface WsrProtocolStorageOperations

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


Method Summary
 void deleteGroupTerminationInfo(String groupId)
          Delete the GroupTerminationInfo object.
 void deleteStoredElement(String groupId, long sequenceNumber)
          Removes stored WsrStorageWidget from storage.
 long[] getAcknowledgedSequenceNumbers(String groupId)
          Retrieves the list of sequence numbers that have been acknowledged This method throws WsrStorageException.
 WsrGroupTerminationInfoImpl getGroupTerminationInfo(String groupId)
          Retrieves the GroupTerminationInfo object.
 String getMessageFault(String groupId, long sequenceNumber)
          Gets the Fault associate with the message if message is faulted from storage
 byte getMessageStatus(String groupId, long sequenceNumber)
          Gets the Status of the Message from storage
 long getSequenceNumberLastAssigned(String groupId)
          Retrieves the sequence number that was last assigned on a given group.
 long[] getSequenceNumbers(String groupId)
          Retrieves the list of all sequence numbers
 WsrStorageWidgetImpl getStoredElement(String groupId, long sequenceNumber)
          Retrieves a stored WsrStorageWidget from storage.
 WsrStorageWidgetImpl[] getStoredElements(String groupId, long[] sequenceNumbers)
          Retrieves stored WsrStorageWidgets from storage.
 long[] getUnacknowledgedSequenceNumbers(String groupId)
          Retrieves the list of sequence numbers that have NOT been acknowledged and faulted for a given group.
 long[] getUnacknowledgedSequenceNumbers(String groupId, long upUntilSequenceNumber)
          Retrieves the list of sequence numbers that have NOT been acknowledged, up until the sequence number specified in upUntilSequenceNumber This method throws an exception under the following conditions.
 long[] getUnDeliveredSequenceNumbers(String groupId)
          Retrieves the list of sequence numbers that have NOT been Delivered for a given group.This method throws an exception if the group specified by groupId is an unknown one or if there are other storage problems.
 long[] getUnDeliveredSequenceNumbers(String groupId, long sequenceNumber)
          Retrieves the list of sequence numbers that have NOT been Delivered, and have sequenceNumber greater than specified sequenceNumber This method throws an exception under the following conditions.
 boolean hasStoredElement(String groupId, long sequenceNumber)
          Check to see if there is a widget that has been stored for a specific sequence number in a given group
 boolean hasStoredElements(String groupId)
          Checks to see if there are widgets that have been stored for the group in question.
 void processAcknowledgementOnGroup(String groupId, long ackSequenceNumber)
          Processes an acknowledgement received on a given group for a specific sequence number.
 void processAcknowledgementsOnGroup(String groupId, long[] ackSequenceNumbers)
          Processes a set of acknowledgements received on a given group.
 void processFaultOnGroup(String groupId, long sequenceNumber, QName fault)
          Processes Fault received on a given group for a specific sequence number.
 void resetNumberOfRetries(WsrStorageWidgetImpl wsrStorageWidgetImpl, byte numberOfRetries)
          Reset the Number Of Retries associated with the retransmission of the message
 void resetRetransmissionTime(WsrStorageWidgetImpl wsrStorageWidgetImpl, long retransmissionTime)
          Reset the Retranmission Time associated with the message
 void store(WsrStorageWidgetImpl widget)
          Store a WSR message to storage.
 void storeGroupTerminationInfo(WsrGroupTerminationInfoImpl groupTerminationInfo)
          Stores the GroupTerminationInfo object.
 

Method Detail

processAcknowledgementsOnGroup

void processAcknowledgementsOnGroup(String groupId,
                                    long[] ackSequenceNumbers)
                                    throws WsrStorageException
Processes a set of acknowledgements received on a given group. This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
One or more of the acknowledgements refer to non-existent sequence numbers.
Storage related problems

Throws:
WsrStorageException

processAcknowledgementOnGroup

void processAcknowledgementOnGroup(String groupId,
                                   long ackSequenceNumber)
                                   throws WsrStorageException
Processes an acknowledgement received on a given group for a specific sequence number. This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
The acknowledgement refers to non-existent sequence number
Storage related problems

Throws:
WsrStorageException

processFaultOnGroup

void processFaultOnGroup(String groupId,
                         long sequenceNumber,
                         QName fault)
                         throws WsrStorageException
Processes Fault received on a given group for a specific sequence number. This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
The fault refers to non-existent sequence number
Storage related problems

Throws:
WsrStorageException

getUnacknowledgedSequenceNumbers

long[] getUnacknowledgedSequenceNumbers(String groupId,
                                        long upUntilSequenceNumber)
                                        throws WsrStorageException
Retrieves the list of sequence numbers that have NOT been acknowledged, up until the sequence number specified in upUntilSequenceNumber This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
The specified sequence number is a non-existent one.
Storage related problems

Throws:
WsrStorageException

getUnacknowledgedSequenceNumbers

long[] getUnacknowledgedSequenceNumbers(String groupId)
                                        throws WsrStorageException
Retrieves the list of sequence numbers that have NOT been acknowledged and faulted for a given group. This method throws an exception if the group specified by groupId is an unknown one or if there are other storage problems.

Throws:
WsrStorageException

getUnDeliveredSequenceNumbers

long[] getUnDeliveredSequenceNumbers(String groupId,
                                     long sequenceNumber)
                                     throws WsrStorageException
Retrieves the list of sequence numbers that have NOT been Delivered, and have sequenceNumber greater than specified sequenceNumber This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
Storage related problems

Throws:
WsrStorageException

getUnDeliveredSequenceNumbers

long[] getUnDeliveredSequenceNumbers(String groupId)
                                     throws WsrStorageException
Retrieves the list of sequence numbers that have NOT been Delivered for a given group.This method throws an exception if the group specified by groupId is an unknown one or if there are other storage problems.

Throws:
WsrStorageException

getAcknowledgedSequenceNumbers

long[] getAcknowledgedSequenceNumbers(String groupId)
                                      throws WsrStorageException
Retrieves the list of sequence numbers that have been acknowledged This method throws WsrStorageException.

Throws:
WsrStorageException

getSequenceNumbers

long[] getSequenceNumbers(String groupId)
                          throws WsrStorageException
Retrieves the list of all sequence numbers

Throws:
WsrStorageException

getSequenceNumberLastAssigned

long getSequenceNumberLastAssigned(String groupId)
                                   throws WsrStorageException
Retrieves the sequence number that was last assigned on a given group. This method throws an exception if the group specified by groupId is an unknown one or if there are storage related problems.

Throws:
WsrStorageException

store

void store(WsrStorageWidgetImpl widget)
           throws WsrStorageException
Store a WSR message to storage. This method throws an exception if there are storage related problems.

Throws:
WsrStorageException

hasStoredElements

boolean hasStoredElements(String groupId)
                          throws WsrStorageException
Checks to see if there are widgets that have been stored for the group in question.

Throws:
WsrStorageException

hasStoredElement

boolean hasStoredElement(String groupId,
                         long sequenceNumber)
                         throws WsrStorageException
Check to see if there is a widget that has been stored for a specific sequence number in a given group

Throws:
WsrStorageException

getStoredElement

WsrStorageWidgetImpl getStoredElement(String groupId,
                                      long sequenceNumber)
                                      throws WsrStorageException
Retrieves a stored WsrStorageWidget from storage. This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
The specified sequence number is a non-existent one.
Storage related problems

Throws:
WsrStorageException

getStoredElements

WsrStorageWidgetImpl[] getStoredElements(String groupId,
                                         long[] sequenceNumbers)
                                         throws WsrStorageException
Retrieves stored WsrStorageWidgets from storage. This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
One or more of the specified sequence numbers are non-existent.
Storage related problems

Throws:
WsrStorageException

deleteStoredElement

void deleteStoredElement(String groupId,
                         long sequenceNumber)
                         throws WsrStorageException
Removes stored WsrStorageWidget from storage. This method throws an exception under the following conditions.
The group specified by groupId is an unknown one.
Storage related problems

Throws:
WsrStorageException

storeGroupTerminationInfo

void storeGroupTerminationInfo(WsrGroupTerminationInfoImpl groupTerminationInfo)
                               throws WsrStorageException
Stores the GroupTerminationInfo object. This method stores the groupTerminationInfo object in storage If groupId in groupTerminationInfo object is already exist then it updates the GroupTerminationInfo Object in storage. This method throws exception if
Storage related problems

Throws:
WsrStorageException

getMessageStatus

byte getMessageStatus(String groupId,
                      long sequenceNumber)
                      throws WsrStorageException
Gets the Status of the Message from storage

Throws:
WsrStorageException

getMessageFault

String getMessageFault(String groupId,
                       long sequenceNumber)
                       throws WsrStorageException
Gets the Fault associate with the message if message is faulted from storage

Throws:
WsrStorageException

getGroupTerminationInfo

WsrGroupTerminationInfoImpl getGroupTerminationInfo(String groupId)
                                                    throws WsrStorageException
Retrieves the GroupTerminationInfo object. This method retrieves the groupTerminationInfo object for particular groupId from storage This method throws an exception under the following circumstances
The groupId in the GroupTerminationInfo not exists.
Storage related problems

Throws:
WsrStorageException

deleteGroupTerminationInfo

void deleteGroupTerminationInfo(String groupId)
                                throws WsrStorageException
Delete the GroupTerminationInfo object. This method deletes the groupTerminationInfo object for particular groupId from storage. This method throws an exception under the following circumstances
The groupId in the GroupTerminationInfo not exists.
Storage related problems

Throws:
WsrStorageException

resetRetransmissionTime

void resetRetransmissionTime(WsrStorageWidgetImpl wsrStorageWidgetImpl,
                             long retransmissionTime)
                             throws WsrStorageException
Reset the Retranmission Time associated with the message

Throws:
WsrStorageException

resetNumberOfRetries

void resetNumberOfRetries(WsrStorageWidgetImpl wsrStorageWidgetImpl,
                          byte numberOfRetries)
                          throws WsrStorageException
Reset the Number Of Retries associated with the retransmission of the message

Throws:
WsrStorageException


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