Interface GMSContext
-
- All Known Implementing Classes:
GMSContextBase,GMSContextImpl
public interface GMSContextProvides contextual information about all useful GMS artifacts. These are GMS objects that are tied to a particular group identity and thus scoped to provide information within the group's context. There can be as many GMSContext objects as there are groups within a single JVM process.- Version:
- $Revision$
- Author:
- Shreedhar Ganapathy Date: Jan 12, 2004
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddToSuspectList(java.lang.String token)voidannounceGroupShutdown(java.lang.String groupName, com.sun.enterprise.ee.cms.core.GMSConstants.shutdownState shutdownState)voidannounceGroupStartup(java.lang.String groupName, com.sun.enterprise.ee.cms.core.GMSConstants.groupStartupState startupState, java.util.List<java.lang.String> memberTokens)voidassumeGroupLeadership()lets this instance become a group leader explicitly Typically this can be employed by an administrative member to become a group leader prior to shutting down a group of members simultaneously.AliveAndReadyViewWindowgetAliveAndReadyViewWindow()com.sun.enterprise.ee.cms.core.AliveAndReadyViewgetCurrentAliveAndReadyView()com.sun.enterprise.ee.cms.core.DistributedStateCachegetDistributedStateCache()GMSMonitorgetGMSMonitor()com.sun.enterprise.ee.cms.spi.GroupCommunicationProvidergetGroupCommunicationProvider()com.sun.enterprise.ee.cms.core.GroupHandlegetGroupHandle()returns Group handlejava.lang.StringgetGroupName()returns the name of the group this context represents.java.util.Map<java.lang.String,com.sun.enterprise.ee.cms.core.RejoinSubevent>getInstanceRejoins()com.sun.enterprise.ee.cms.core.GroupManagementService.MemberTypegetMemberType()com.sun.enterprise.ee.cms.core.AliveAndReadyViewgetPreviousAliveAndReadyView()RoutergetRouter()returns the routerjava.lang.StringgetServerIdentityToken()returns the serverIdentityToken pertaining to the process that owns this GMS instanceShutdownHelpergetShutdownHelper()longgetStartTime()java.util.List<java.lang.String>getSuspectList()ViewWindowgetViewWindow()booleanisGroupBeingShutdown(java.lang.String groupName)booleanisGroupStartup()booleanisGroupStartupComplete()booleanisShuttingDown()booleanisSuspected(java.lang.String token)booleanisWatchdog()voidjoin()voidleave(com.sun.enterprise.ee.cms.core.GMSConstants.shutdownType shutdownType)voidremoveFromSuspectList(java.lang.String token)voidsetGroupStartup(boolean value)voidsetGroupStartupJoinMembers(java.util.Set<java.lang.String> members)booleansetGroupStartupState(java.lang.String member, com.sun.enterprise.ee.cms.spi.MemberStates state)
-
-
-
Method Detail
-
getServerIdentityToken
java.lang.String getServerIdentityToken()
returns the serverIdentityToken pertaining to the process that owns this GMS instance- Returns:
- java.lang.String
-
getGroupName
java.lang.String getGroupName()
returns the name of the group this context represents.- Returns:
- the name of the group.
-
getGroupHandle
com.sun.enterprise.ee.cms.core.GroupHandle getGroupHandle()
returns Group handle- Returns:
- Group handle
-
getRouter
Router getRouter()
returns the router- Returns:
- router
-
getViewWindow
ViewWindow getViewWindow()
-
getDistributedStateCache
com.sun.enterprise.ee.cms.core.DistributedStateCache getDistributedStateCache()
-
getGMSMonitor
GMSMonitor getGMSMonitor()
-
join
void join() throws com.sun.enterprise.ee.cms.core.GMSException
- Throws:
com.sun.enterprise.ee.cms.core.GMSException
-
leave
void leave(com.sun.enterprise.ee.cms.core.GMSConstants.shutdownType shutdownType)
-
isShuttingDown
boolean isShuttingDown()
-
getStartTime
long getStartTime()
-
announceGroupStartup
void announceGroupStartup(java.lang.String groupName, com.sun.enterprise.ee.cms.core.GMSConstants.groupStartupState startupState, java.util.List<java.lang.String> memberTokens)
-
announceGroupShutdown
void announceGroupShutdown(java.lang.String groupName, com.sun.enterprise.ee.cms.core.GMSConstants.shutdownState shutdownState)
-
addToSuspectList
boolean addToSuspectList(java.lang.String token)
-
removeFromSuspectList
void removeFromSuspectList(java.lang.String token)
-
isSuspected
boolean isSuspected(java.lang.String token)
-
getSuspectList
java.util.List<java.lang.String> getSuspectList()
-
getShutdownHelper
ShutdownHelper getShutdownHelper()
-
getGroupCommunicationProvider
com.sun.enterprise.ee.cms.spi.GroupCommunicationProvider getGroupCommunicationProvider()
-
assumeGroupLeadership
void assumeGroupLeadership()
lets this instance become a group leader explicitly Typically this can be employed by an administrative member to become a group leader prior to shutting down a group of members simultaneously. For underlying Group Communication Providers who don't support the feature of a explicit leader role assumption, the implementation of this method would be a no-op.
-
isGroupBeingShutdown
boolean isGroupBeingShutdown(java.lang.String groupName)
-
isGroupStartup
boolean isGroupStartup()
-
setGroupStartup
void setGroupStartup(boolean value)
-
getMemberType
com.sun.enterprise.ee.cms.core.GroupManagementService.MemberType getMemberType()
-
isWatchdog
boolean isWatchdog()
-
getPreviousAliveAndReadyView
com.sun.enterprise.ee.cms.core.AliveAndReadyView getPreviousAliveAndReadyView()
-
getCurrentAliveAndReadyView
com.sun.enterprise.ee.cms.core.AliveAndReadyView getCurrentAliveAndReadyView()
-
getInstanceRejoins
java.util.Map<java.lang.String,com.sun.enterprise.ee.cms.core.RejoinSubevent> getInstanceRejoins()
-
getAliveAndReadyViewWindow
AliveAndReadyViewWindow getAliveAndReadyViewWindow()
-
setGroupStartupJoinMembers
void setGroupStartupJoinMembers(java.util.Set<java.lang.String> members)
-
isGroupStartupComplete
boolean isGroupStartupComplete()
-
setGroupStartupState
boolean setGroupStartupState(java.lang.String member, com.sun.enterprise.ee.cms.spi.MemberStates state)
-
-