@PerLookup @Service public class GMSAdapterImpl extends Object implements GMSAdapter, org.glassfish.hk2.api.PostConstruct, com.sun.enterprise.ee.cms.core.CallBack
| Constructor and Description |
|---|
GMSAdapterImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
complete() |
String |
getClusterName() |
com.sun.enterprise.ee.cms.core.GroupManagementService |
getGMS(String groupName) |
HealthHistory |
getHealthHistory()
Returns an object that contains the current health of
each instance.
|
com.sun.enterprise.ee.cms.core.GroupManagementService |
getModule() |
protected Properties |
getProperties(File propFile) |
boolean |
initialize(String clusterName) |
void |
postConstruct() |
void |
processNotification(com.sun.enterprise.ee.cms.core.Signal signal) |
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.
|
public void postConstruct()
postConstruct in interface org.glassfish.hk2.api.PostConstructpublic String getClusterName()
getClusterName in interface GMSAdapterpublic boolean initialize(String clusterName)
initialize in interface GMSAdapterpublic void complete()
complete in interface GMSAdapterpublic HealthHistory getHealthHistory()
GMSAdaptergetHealthHistory in interface GMSAdapterprotected final Properties getProperties(File propFile) throws IOException
IOExceptionpublic com.sun.enterprise.ee.cms.core.GroupManagementService getModule()
getModule in interface GMSAdapterpublic com.sun.enterprise.ee.cms.core.GroupManagementService getGMS(String groupName)
public void processNotification(com.sun.enterprise.ee.cms.core.Signal signal)
processNotification in interface com.sun.enterprise.ee.cms.core.CallBackpublic void registerJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerJoinNotificationListener in interface GMSAdaptercallback - processes GMS notification JoinNotificationSignalpublic void registerJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerJoinedAndReadyNotificationListener in interface GMSAdaptercallback - processes GMS notification JoinAndReadyNotificationSignalpublic void registerMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerMemberLeavingListener in interface GMSAdaptercallback - Signal can be either PlannedShutdownSignal, FailureNotificationSignal or JoinNotificationSignal(subevent Rejoin).public void registerPlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerPlannedShutdownListener in interface GMSAdaptercallback - processes GMS notification PlannedShutdownSignalpublic void registerFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerFailureSuspectedListener in interface GMSAdaptercallback - processes GMS notification FailureSuspectedSignalpublic void registerFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerFailureNotificationListener in interface GMSAdaptercallback - processes GMS notification FailureNotificationSignalpublic void registerFailureRecoveryListener(String componentName, com.sun.enterprise.ee.cms.core.CallBack callback)
registerFailureRecoveryListener in interface GMSAdaptercallback - 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.public void registerMessageListener(String componentName, com.sun.enterprise.ee.cms.core.CallBack messageListener)
registerMessageListener in interface GMSAdaptercomponentName - 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 MessageSignalpublic void registerGroupLeadershipNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
registerGroupLeadershipNotificationListener in interface GMSAdaptercallback - 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.public void removeFailureRecoveryListener(String componentName)
GMSAdaptercomponentNameremoveFailureRecoveryListener in interface GMSAdaptercomponentName - name of the component to remove its registered CallBack.public void removeMessageListener(String componentName)
GMSAdaptercomponentNameremoveMessageListener in interface GMSAdaptercomponentName - name of the component to remove its registered CallBack.public void removeFailureNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremoveFailureNotificationListener in interface GMSAdaptercallback - to be removedpublic void removeFailureSuspectedListener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremoveFailureSuspectedListener in interface GMSAdaptercallback - to be removedpublic void removeJoinNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremoveJoinNotificationListener in interface GMSAdaptercallback - to be removedpublic void removeJoinedAndReadyNotificationListener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremoveJoinedAndReadyNotificationListener in interface GMSAdaptercallback - to be removedpublic void removePlannedShutdownListener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremovePlannedShutdownListener in interface GMSAdaptercallback - to be removedpublic void removeGroupLeadershipLNotificationistener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremoveGroupLeadershipLNotificationistener in interface GMSAdaptercallback - to be removedpublic void removeMemberLeavingListener(com.sun.enterprise.ee.cms.core.CallBack callback)
GMSAdapterremoveMemberLeavingListener in interface GMSAdaptercallback - to be removedCopyright © 2017. All rights reserved.