cgl.narada.wsinfra.wsr.storage.impl
Class WsrGroupInfoStorageOperationsImpl

java.lang.Object
  extended by cgl.narada.wsinfra.wsr.storage.impl.WsrGroupInfoStorageOperationsImpl
All Implemented Interfaces:
WsrGroupInfoStorageOperations

public class WsrGroupInfoStorageOperationsImpl
extends Object
implements WsrGroupInfoStorageOperations


Constructor Summary
WsrGroupInfoStorageOperationsImpl()
           
WsrGroupInfoStorageOperationsImpl(Connection connection)
           
 
Method Summary
 void addDestinationGroupIdPair(String destination, String groupId)
          Stores the GroupId that should be used while communicating with a given destination.
 void deleteGroupInfo(String groupId)
          Removes the GroupInfo corresponding to the specified groupId.
 String getDestinationForGroupId(String groupId)
          Retrieves the destination for a specific groupId
 String[] getGroupIdsForDestination(String destination)
          Retrieve the GroupIds for a specific destination
 WsrGroupInfoImpl getGroupInfoUsingGroupId(String groupId)
          Retrieves the GroupInfo corresponding to the specified groupId.
 String[] getListOfAllGroups(boolean isSource)
          Retrieves the entire list of groupIds registered with the underlying service.
 long getSequenceNumberLastDelivered(String groupId)
          Retrieves the sequence number that was last Delivered on a given group.
 boolean hasGroupIdForDestination(String destination)
          Checks to see if there is a groupId/destination pair corresponding to the destination in question.
 boolean isGroupExists(String groupId)
          A method which checks whether a certain group (irrespective of whether it is active/terminated/expired/timed-out) is a exits(from Sink point of view) at this node
 boolean isKnownGroup(String groupId)
          A method which checks whether a certain group (irrespective of whether it is active/terminated/expired/timed-out) is a known group at this node
 void removeDestinationGroupIdPair(String groupId)
          Removes the destination/group identifier pair corresponding to this groupId
 void storeCreatedGroup(WsrGroupInfoImpl wsrGroupInfo)
          Store a GroupInfo object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsrGroupInfoStorageOperationsImpl

public WsrGroupInfoStorageOperationsImpl()

WsrGroupInfoStorageOperationsImpl

public WsrGroupInfoStorageOperationsImpl(Connection connection)
Method Detail

addDestinationGroupIdPair

public void addDestinationGroupIdPair(String destination,
                                      String groupId)
                               throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Stores the GroupId that should be used while communicating with a given destination. This feature allows us to send messages reliably with minimal intervention from the application.

Specified by:
addDestinationGroupIdPair in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

getGroupIdsForDestination

public String[] getGroupIdsForDestination(String destination)
                                   throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Retrieve the GroupIds for a specific destination

Specified by:
getGroupIdsForDestination in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

getDestinationForGroupId

public String getDestinationForGroupId(String groupId)
                                throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Retrieves the destination for a specific groupId

Specified by:
getDestinationForGroupId in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

removeDestinationGroupIdPair

public void removeDestinationGroupIdPair(String groupId)
                                  throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Removes the destination/group identifier pair corresponding to this groupId

Specified by:
removeDestinationGroupIdPair in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

hasGroupIdForDestination

public boolean hasGroupIdForDestination(String destination)
                                 throws WsrStorageException
Checks to see if there is a groupId/destination pair corresponding to the destination in question.

Specified by:
hasGroupIdForDestination in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

getSequenceNumberLastDelivered

public long getSequenceNumberLastDelivered(String groupId)
                                    throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Retrieves the sequence number that was last Delivered 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.

Specified by:
getSequenceNumberLastDelivered in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

isKnownGroup

public boolean isKnownGroup(String groupId)
                     throws WsrStorageException
A method which checks whether a certain group (irrespective of whether it is active/terminated/expired/timed-out) is a known group at this node

Specified by:
isKnownGroup in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

isGroupExists

public boolean isGroupExists(String groupId)
                      throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
A method which checks whether a certain group (irrespective of whether it is active/terminated/expired/timed-out) is a exits(from Sink point of view) at this node

Specified by:
isGroupExists in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

storeCreatedGroup

public void storeCreatedGroup(WsrGroupInfoImpl wsrGroupInfo)
                       throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Store a GroupInfo object. This method throws an exception under the following circumstances
The groupId in the GroupInfo already exists.
Storage related problems

Specified by:
storeCreatedGroup in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

getGroupInfoUsingGroupId

public WsrGroupInfoImpl getGroupInfoUsingGroupId(String groupId)
                                          throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Retrieves the GroupInfo corresponding to the specified groupId. This method throws an exception under the following conditions.
The Group specified in groupId is an unknown one.
Storage related problems

Specified by:
getGroupInfoUsingGroupId in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

deleteGroupInfo

public void deleteGroupInfo(String groupId)
                     throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Removes the GroupInfo corresponding to the specified groupId. This method throws an exception under the following conditions.
The Group specified in groupId is an unknown one.
Storage related problems

Specified by:
deleteGroupInfo in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException

getListOfAllGroups

public String[] getListOfAllGroups(boolean isSource)
                            throws WsrStorageException
Description copied from interface: WsrGroupInfoStorageOperations
Retrieves the entire list of groupIds registered with the underlying service. This method throws an exception if there are storage related problems.

Specified by:
getListOfAllGroups in interface WsrGroupInfoStorageOperations
Throws:
WsrStorageException


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