|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.enterprise.ee.cms.impl.common.GroupManagementServiceImpl
public class GroupManagementServiceImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.sun.enterprise.ee.cms.core.GroupManagementService |
---|
GroupManagementService.MemberType, GroupManagementService.RECOVERY_STATE |
Constructor Summary | |
---|---|
GroupManagementServiceImpl(String serverToken,
String groupName,
GroupManagementService.MemberType membertype,
Properties properties)
Creates a GMSContext instance with the given paramters. |
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 PlannedShuttdownActionFactory instance. |
void |
addActionFactory(String componentName,
FailureRecoveryActionFactory failureRecoveryActionFactory)
Registers a FailureRecoveryActionFactory instance. |
void |
announceGroupShutdown(String groupName,
GMSConstants.shutdownState shutdownState)
This method is used to announce that the group is about to be shutdown. |
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 To remove a MessageActionFactory for a specific component, use the method: removeActionFactory(String componentName); |
void |
removeActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
Removes a JoinedAndReadyNotificationActionFactory instance To remove a MessageActionFactory for a specific component, use the method: removeActionFactory(String componentName); |
void |
removeActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
Removes a JoinNotificationActionFactory instance To remove a MessageActionFactory for a specific component, use the method: removeActionFactory(String componentName); |
void |
removeActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
Removes a PlannedShutdownActionFactory instance To remove a MessageActionFactory for a specific component, use the method: removeActionFactory(String componentName); |
void |
removeFailureRecoveryActionFactory(String componentName)
Removes a FailureRecoveryActionFactory instance To remove a MessageActionFactory for a specific component, use the method: removeActionFactory(String componentName); |
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 |
run()
|
void |
setMemberDetails(String serverToken,
Map<? extends Object,? extends Object> keyValuePairs)
for this serverToken, use the map to derive key value pairs that constitute data pertaining to this member's details |
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupManagementServiceImpl(String serverToken, String groupName, GroupManagementService.MemberType membertype, Properties properties)
serverToken
- identity token of this member processgroupName
- name of the groupmembertype
- Type of member as specified in GroupManagementService.MemberTypeproperties
- Configuration PropertiesMethod Detail |
---|
public void run()
run
in interface Runnable
public void addActionFactory(FailureNotificationActionFactory failureNotificationActionFactory)
addActionFactory
in interface GroupManagementService
failureNotificationActionFactory
- implementation of this interfacepublic void addActionFactory(String componentName, FailureRecoveryActionFactory failureRecoveryActionFactory)
addActionFactory
in interface GroupManagementService
componentName
- name of componentfailureRecoveryActionFactory
- implmentation of this interfacepublic void addActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
addActionFactory
in interface GroupManagementService
joinedAndReadyNotificationActionFactory
- Implementation of this interface produces
a JoinedAndReadyNotificationAction instance which consumes the member
joined and ready notification signal.public void addActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
addActionFactory
in interface GroupManagementService
joinNotificationActionFactory
- implementation of this interfacepublic void addActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
addActionFactory
in interface GroupManagementService
plannedShutdownActionFactory
- implementation of this interfacepublic void addActionFactory(MessageActionFactory messageActionFactory, String componentName)
addActionFactory
in interface GroupManagementService
messageActionFactory
- implementation of this interfacecomponentName
- name of component to identify target component for message deliverypublic void addActionFactory(FailureSuspectedActionFactory failureSuspectedActionFactory)
GroupManagementService
addActionFactory
in interface GroupManagementService
failureSuspectedActionFactory
- Implementation of this interface produces
a Failure Suspected Action instance that would consume the FailureSuspectedSignalpublic void removeActionFactory(FailureNotificationActionFactory failureNotificationActionFactory)
removeActionFactory
in interface GroupManagementService
failureNotificationActionFactory
- implementation of this interfacepublic void removeFailureRecoveryActionFactory(String componentName)
removeFailureRecoveryActionFactory
in interface GroupManagementService
componentName
- name of componentpublic void removeFailureSuspectedActionFactory(FailureSuspectedActionFactory failureSuspectedActionFactory)
GroupManagementService
removeFailureSuspectedActionFactory
in interface GroupManagementService
public void removeActionFactory(JoinNotificationActionFactory joinNotificationActionFactory)
removeActionFactory
in interface GroupManagementService
joinNotificationActionFactory
- implementation of this interfacepublic void removeActionFactory(JoinedAndReadyNotificationActionFactory joinedAndReadyNotificationActionFactory)
removeActionFactory
in interface GroupManagementService
joinedAndReadyNotificationActionFactory
- implementation of this interfacepublic void removeActionFactory(PlannedShutdownActionFactory plannedShutdownActionFactory)
removeActionFactory
in interface GroupManagementService
plannedShutdownActionFactory
- implementation of this interfacepublic void removeMessageActionFactory(String componentName)
removeMessageActionFactory
in interface GroupManagementService
componentName
- name of componentpublic GroupHandle getGroupHandle()
getGroupHandle
in interface GroupManagementService
public void shutdown(GMSConstants.shutdownType shutdownType)
shutdown
in interface GroupManagementService
public void updateMemberDetails(String memberToken, Serializable key, Serializable value) throws GMSException
GroupManagementService
updateMemberDetails
in interface GroupManagementService
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
public Map<Serializable,Serializable> getMemberDetails(String memberToken)
getMemberDetails
in interface GroupManagementService
memberToken
- identity token of the member process
public Map<Serializable,Serializable> getAllMemberDetails(Serializable key)
GroupManagementService
getAllMemberDetails
in interface GroupManagementService
public void setMemberDetails(String serverToken, Map<? extends Object,? extends Object> keyValuePairs) throws GMSException
serverToken
- - member token id for this member.keyValuePairs
- - a Map containing key-value pairs
GMSException
- wraps underlying exception that caused adding of member details to fail.public void join() throws GMSException
GroupManagementService
join
in interface GroupManagementService
GMSException
- wraps any underlying exception that causes join to not occurpublic void announceGroupShutdown(String groupName, GMSConstants.shutdownState shutdownState)
announceGroupShutdown
in interface GroupManagementService
groupName
- name of group being shutdown.shutdownState
- from GMSConstants.shutdownState - one of Initiated
or Completedpublic 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. 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 notified of this JoinedAndReadyNotificationSignal.
This api should be called only after group join operation has completed.
reportJoinedAndReadyState
in interface GroupManagementService
groupName
- name of the grouppublic boolean 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.
isGroupBeingShutdown
in interface GroupManagementService
groupName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |