com.sun.enterprise.ee.cms.impl.base
Class GMSContextImpl

java.lang.Object
  extended by com.sun.enterprise.ee.cms.impl.common.GMSContextBase
      extended by com.sun.enterprise.ee.cms.impl.base.GMSContextImpl
All Implemented Interfaces:
GMSContext

public class GMSContextImpl
extends GMSContextBase

Version:
$Revision: 1662 $
Author:
Shreedhar Ganapathy Date: Jun 26, 2006

Field Summary
 
Fields inherited from class com.sun.enterprise.ee.cms.impl.common.GMSContextBase
gmsMember, gmsMemberType, groupName, logger, memberType, router, serverToken, shutdownHelper, shuttingDown, startTime, suspectList
 
Constructor Summary
GMSContextImpl(String serverToken, String groupName, GroupManagementService.MemberType memberType, Properties configProperties)
           
 
Method Summary
 boolean addToSuspectList(String token)
           
 void announceGroupShutdown(String groupName, GMSConstants.shutdownState shutdownState)
           
 void announceGroupStartup(String groupName, GMSConstants.groupStartupState startupState, List<String> memberTokens)
           
 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.
protected  void createDistributedStateCache()
           
 AliveAndReadyViewWindow getAliveAndReadyViewWindow()
           
 AliveAndReadyView getCurrentAliveAndReadyView()
           
 DistributedStateCache getDistributedStateCache()
           
 GMSMonitor getGMSMonitor()
           
 GroupCommunicationProvider getGroupCommunicationProvider()
           
 GroupHandle getGroupHandle()
          returns Group handle
 Map<String,RejoinSubevent> getInstanceRejoins()
           
 AliveAndReadyView getPreviousAliveAndReadyView()
           
 ShutdownHelper getShutdownHelper()
           
 long getStartTime()
           
 List<String> getSuspectList()
           
 ViewWindow getViewWindow()
           
 boolean isGroupBeingShutdown(String groupName)
           
 boolean isGroupStartup()
           
 boolean isGroupStartupComplete()
           
 boolean isSuspected(String token)
           
 boolean isWatchdog()
           
 void join()
           
 void leave(GMSConstants.shutdownType shutdownType)
           
 int outstandingNotifications()
           
 void removeFromSuspectList(String token)
           
 void setGroupStartup(boolean value)
           
 void setGroupStartupJoinMembers(Set<String> members)
           
 boolean setGroupStartupState(String member, MemberStates state)
           
 
Methods inherited from class com.sun.enterprise.ee.cms.impl.common.GMSContextBase
getGroupName, getMemberType, getMemberType, getRouter, getServerIdentityToken, isShuttingDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMSContextImpl

public GMSContextImpl(String serverToken,
                      String groupName,
                      GroupManagementService.MemberType memberType,
                      Properties configProperties)
Method Detail

getGMSMonitor

public GMSMonitor getGMSMonitor()
Specified by:
getGMSMonitor in interface GMSContext
Specified by:
getGMSMonitor in class GMSContextBase

createDistributedStateCache

protected void createDistributedStateCache()
Specified by:
createDistributedStateCache in class GMSContextBase

getGroupHandle

public GroupHandle getGroupHandle()
returns Group handle

Returns:
Group handle

getDistributedStateCache

public DistributedStateCache getDistributedStateCache()

join

public void join()
          throws GMSException
Throws:
GMSException

leave

public void leave(GMSConstants.shutdownType shutdownType)

getStartTime

public long getStartTime()

announceGroupShutdown

public void announceGroupShutdown(String groupName,
                                  GMSConstants.shutdownState shutdownState)

announceGroupStartup

public void announceGroupStartup(String groupName,
                                 GMSConstants.groupStartupState startupState,
                                 List<String> memberTokens)

addToSuspectList

public boolean addToSuspectList(String token)

removeFromSuspectList

public void removeFromSuspectList(String token)

isSuspected

public boolean isSuspected(String token)

getSuspectList

public List<String> getSuspectList()

getShutdownHelper

public ShutdownHelper getShutdownHelper()

getGroupCommunicationProvider

public GroupCommunicationProvider getGroupCommunicationProvider()

getViewWindow

public ViewWindow getViewWindow()

assumeGroupLeadership

public void assumeGroupLeadership()
Description copied from interface: GMSContext
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

public boolean isGroupBeingShutdown(String groupName)

isGroupStartup

public boolean isGroupStartup()

setGroupStartup

public void setGroupStartup(boolean value)

isWatchdog

public boolean isWatchdog()

outstandingNotifications

public int outstandingNotifications()

getPreviousAliveAndReadyView

public AliveAndReadyView getPreviousAliveAndReadyView()

getCurrentAliveAndReadyView

public AliveAndReadyView getCurrentAliveAndReadyView()

getInstanceRejoins

public Map<String,RejoinSubevent> getInstanceRejoins()

getAliveAndReadyViewWindow

public AliveAndReadyViewWindow getAliveAndReadyViewWindow()
Specified by:
getAliveAndReadyViewWindow in interface GMSContext
Specified by:
getAliveAndReadyViewWindow in class GMSContextBase

setGroupStartupJoinMembers

public void setGroupStartupJoinMembers(Set<String> members)

isGroupStartupComplete

public boolean isGroupStartupComplete()

setGroupStartupState

public boolean setGroupStartupState(String member,
                                    MemberStates state)


Copyright © 2012. All Rights Reserved.