@Contract
public interface GMSAdapter
The register methods below replace GroupManagementService.addFactory methods. The remove methods below replace GroupManagementService.removeFactory methods.
TODO: Example of a Leaving Listener handling FailureNotificationSignal, PlannedShutdownSignal and the Rejoin subevent of AddNotificationSignal.
| Modifier and Type | Method and Description |
|---|---|
void |
complete() |
String |
getClusterName() |
HealthHistory |
getHealthHistory()
Returns an object that contains the current health of
each instance.
|
com.sun.enterprise.ee.cms.core.GroupManagementService |
getModule() |
boolean |
initialize(String clusterName) |
void |
registerFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a FailureNotification Listener.
|
void |
registerFailureRecoveryListener(String componentName,
com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a FailureRecovery Listener.
|
void |
registerFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a FailureSuspected Listener.
|
void |
registerGroupLeadershipNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a GroupLeadershipNotification Listener.
|
void |
registerJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a JoinAndReadyNotification Listener.
|
void |
registerJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a JoinNotification Listener.
|
void |
registerMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Register a listener for all events that represent a member has left the group.
|
void |
registerMessageListener(String componentName,
com.sun.enterprise.ee.cms.core.CallBack messageListener)
Registers a Message Listener.
|
void |
registerPlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Registers a PlannedShutdown Listener.
|
void |
removeFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered FailureNotificationListener.
|
void |
removeFailureRecoveryListener(String componentName)
Remove FailureRecoveryListener for
componentName |
void |
removeFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered FailureSuspectedListener.
|
void |
removeGroupLeadershipLNotificationistener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered GroupLeadershipNotificationListener.
|
void |
removeJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered JoinedAndReadyNotificationListener.
|
void |
removeJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered JoinNotificationListener.
|
void |
removeMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered Listeners related to Leaving a Group.
|
void |
removeMessageListener(String componentName)
Remove MessageListener for
componentName |
void |
removePlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
Remove previously registered PlannedShutdownListener.
|
com.sun.enterprise.ee.cms.core.GroupManagementService getModule()
String getClusterName()
void registerJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification JoinNotificationSignalvoid registerJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification JoinAndReadyNotificationSignalvoid registerMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - Signal can be either PlannedShutdownSignal, FailureNotificationSignal or JoinNotificationSignal(subevent Rejoin).void registerPlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification PlannedShutdownSignalvoid registerFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification FailureSuspectedSignalvoid registerFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification FailureNotificationSignalvoid registerFailureRecoveryListener(String componentName, com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification FailureRecoverySignalcomponentName - The name of the parent application's component that should be notified of 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 operations.void registerMessageListener(String componentName, com.sun.enterprise.ee.cms.core.CallBack messageListener)
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.messageListener - processes GMS MessageSignalvoid registerGroupLeadershipNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - processes GMS notification GroupLeadershipNotificationSignal. This event occurs when the GMS masters leaves the Group
and another member of the group takes over leadership. The signal indicates the new leader.void removeFailureRecoveryListener(String componentName)
componentNamecomponentName - name of the component to remove its registered CallBack.void removeMessageListener(String componentName)
componentNamecomponentName - name of the component to remove its registered CallBack.void removeFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedvoid removeFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedvoid removeJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedvoid removeJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedvoid removePlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedvoid removeGroupLeadershipLNotificationistener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedvoid removeMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
callback - to be removedboolean initialize(String clusterName)
void complete()
HealthHistory getHealthHistory()
Copyright © 2017. All rights reserved.