|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GroupManagementService
Provides API for joining, and leaving the group and to register Action Factories of specific types for specific Group Event Signals.
Nested Class Summary | |
---|---|
static class |
GroupManagementService.MemberType
Members joining the group should be one of the following types. |
static class |
GroupManagementService.RECOVERY_STATE
These are possible recovery states used by GMS's recovery selection and failure fencing functions |
Method Summary | |
---|---|
void |
addActionFactory(FailureNotificationActionFactory failureNotificationActionFactory)
Registers a FailureNotificationActionFactory instance. |
void |
addActionFactory(FailureSuspectedActionFactory failureSuspectedActionFactory)
Registers a FailureSuspectedActionFactory Instance. |
void |
addActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
Registers a JoinedAndReadyNotificationActionFactory instance. |
void |
addActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
Registers a JoinNotificationActionFactory instance. |
void |
addActionFactory(MessageActionFactory messageActionFactory,
String componentName)
Registers a MessageActionFactory instance for the specified component name. |
void |
addActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
Registers a PlannedShutdownActionFactory instance. |
void |
addActionFactory(String componentName,
FailureRecoveryActionFactory failureRecoveryActionFactory)
Registers a FailureRecoveryActionFactory instance. |
void |
announceGroupShutdown(String groupName,
GMSConstants.shutdownState shutdownState)
This method can be used by parent application to notify all group members that the parent application is "initiating" or has "completed" shutdown of this group. |
Map<Serializable,Serializable> |
getAllMemberDetails(Serializable key)
returns the member details pertaining to the given key. |
GroupHandle |
getGroupHandle()
Returns an implementation of GroupHandle |
Map<Serializable,Serializable> |
getMemberDetails(String memberToken)
returns the details pertaining to the given member. |
boolean |
isGroupBeingShutdown(String groupName)
This API allows applications to query GMS to see if the group is shutting down. |
void |
join()
Invokes the underlying group communication library's group creation and joining operations. |
void |
removeActionFactory(FailureNotificationActionFactory failureNotificationActionFactory)
Removes a FailureNotificationActionFactory instance |
void |
removeActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
Removes a JoinedAndReadyNotificationActionFactory instance |
void |
removeActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
Removes a JoinNotificationActionFactory instance |
void |
removeActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
Removes a PlannedShutdownActionFactory instance |
void |
removeFailureRecoveryActionFactory(String componentName)
Removes a FailureRecoveryActionFactory instance |
void |
removeFailureSuspectedActionFactory(FailureSuspectedActionFactory failureSuspectedActionFactory)
Removes a FailureSuspectedActionFactory instance |
void |
removeMessageActionFactory(String componentName)
Removes a MessageActionFactory instance belonging to the specified component |
void |
reportJoinedAndReadyState(String groupName)
This API is provided for the parent application to report to the group its joined and ready state to begin processing its operations. |
void |
shutdown(GMSConstants.shutdownType shutdownType)
Sends a shutdown command to the GMS indicating that the parent thread is about to be shutdown as part of a planned shutdown operation for the given shutdown type. |
void |
updateMemberDetails(String memberToken,
Serializable key,
Serializable value)
Enables the client to update the Member Details shared datastructure The implementation of this api updates an existing datastructure that is keyed to MEMBER_DETAILS in the DistributedStateCache which stores other shared information. |
Method Detail |
---|
void addActionFactory(FailureNotificationActionFactory failureNotificationActionFactory)
failureNotificationActionFactory
- Implementation of this interface produces
a FailureNotificationAction instance which consumes the failure notification Signalvoid addActionFactory(String componentName, FailureRecoveryActionFactory failureRecoveryActionFactory)
componentName
- The name of the parent application's component
that should be notified of being selected for performing recovery
operations. One or more components in the parent application may
want to be notified of such selection for their respective recovery
operationsfailureRecoveryActionFactory
- Implementation of this interface produces
a FailureRecoveryAction instance which consumes the failure recovery selection
notification Signalvoid addActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
joinNotificationActionFactory
- Implementation of this interface produces
a JoinNotificationAction instance which consumes the member join notification
signal.void addActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
joinedAndReadyNotificationActionFactory
- Implementation of this interface produces
a JoinedAndReadyNotificationAction instance which consumes the member
joined and ready notification signal.void addActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
plannedShutdownActionFactory
- Implementation of this interface produces
a PlannedShutdownAction instance which consumes the planned shutdown notification
Signalvoid addActionFactory(MessageActionFactory messageActionFactory, String componentName)
messageActionFactory
- Implementation of this interface produces a
MessageAction instance that consumes a MessageSignal.componentName
- Name of the component that would like to consume
Messages. One or more components in the parent application would want to
be notified when messages arrive addressed to them. This registration
allows GMS to deliver messages to specific components.void addActionFactory(FailureSuspectedActionFactory failureSuspectedActionFactory)
failureSuspectedActionFactory
- Implementation of this interface produces
a Failure Suspected Action instance that would consume the FailureSuspectedSignalvoid removeActionFactory(FailureNotificationActionFactory failureNotificationActionFactory)
failureNotificationActionFactory
- void removeFailureRecoveryActionFactory(String componentName)
componentName
- void removeFailureSuspectedActionFactory(FailureSuspectedActionFactory failureSuspectedActionFactory)
failureSuspectedActionFactory
- void removeActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
joinNotificationActionFactory
- void removeActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
joinedAndReadyNotificationActionFactory
- void removeActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
plannedShutdownActionFactory
- void removeMessageActionFactory(String componentName)
componentName
- GroupHandle getGroupHandle()
void join() throws GMSException
GMSException
- wraps any underlying exception that causes join to not occurvoid shutdown(GMSConstants.shutdownType shutdownType)
void updateMemberDetails(String memberToken, Serializable key, Serializable value) throws GMSException
memberToken
- - identifier token of this memberkey
- - Serializable object that uniquely identifies this cachable
statevalue
- - Serializable object that is to be stored in the shared
cache
GMSException
Map<Serializable,Serializable> getMemberDetails(String memberToken)
memberToken
-
Map<Serializable,Serializable> getAllMemberDetails(Serializable key)
key
-
void announceGroupShutdown(String groupName, GMSConstants.shutdownState shutdownState)
groupName
- shutdownState
- from GMSConstants.shutdownState - one of Initiated
or Completedvoid reportJoinedAndReadyState(String groupName)
This API is provided for the parent application to report to the group its joined and ready state to begin processing its operations. The group member that this parent application represents is now ready to process its operations at the time of this announcement to the group. GMS clients in all other group members that are interested in knowing when another member is ready to start processing operations, can subscribe to the event JoinedAndReadyEvent and be given this JoinedAndReadyNotificationSignal. Currently this API can only be used by cluster members which are of the type CORE and not the SPECTATOR members. Shoal makes the assumption that only the CORE members will act as servers for serving the client requests and not the SPECTATOR members.
The behavioral semantics of this feature is that as each member reports its
joined and ready state, the corresponding JoinedAndReadyNotificationSignal will be
delivered to other cluster members who have already joined the group and have components
who have registered for this event to be delivered. There may be members who may not
have joined the group at the time a particular member reported its JoinedAndReady state.
For these cases, those members have to rely on the JoinNotificationSignal
of this particular member and call the getMemberState()
api.
The implementation currently does not require the joined and ready notification
to be sent out to members joining the group after a member reported its
joined and ready state.
groupName
- name of the groupboolean isGroupBeingShutdown(String groupName)
This API allows applications to query GMS to see if the group is shutting down. This helps with any pre-shutdown processing that may be required to be done on the application's side.
groupName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |