org.cougaar.core.plugin.freeze
Class FreezeNodePlugin

java.lang.Object
  extended by org.cougaar.util.GenericStateModelAdapter
      extended by org.cougaar.core.blackboard.BlackboardClientComponent
          extended by org.cougaar.core.plugin.ComponentPlugin
              extended by org.cougaar.core.plugin.ServiceUserPlugin
                  extended by org.cougaar.core.plugin.freeze.FreezePlugin
                      extended by org.cougaar.core.plugin.freeze.FreezeSourcePlugin
                          extended by org.cougaar.core.plugin.freeze.FreezeNodePlugin
All Implemented Interfaces:
BlackboardClient, org.cougaar.core.component.Component, PluginBase, org.cougaar.util.GenericStateModel

public class FreezeNodePlugin
extends FreezeSourcePlugin

This component gathers and integrates freeze information from agents in a node to determine the "freeze" of the current tasks. It continually determines the worst laggard in the node and forwards that one laggard to the society root.

NOTE: This is part of the older mechanism for freezing the society. The current mechanism uses FreezeServlet located on every agent in the society, and depends on some external process to tell all agents to freeze. This older mechanism has not been removed so that people can continue to use a single servlet to freeze the entire society, but the FreezeServlet mechanism is preferred now.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cougaar.core.blackboard.BlackboardClient
BlackboardClient.Local
 
Field Summary
 
Fields inherited from class org.cougaar.core.plugin.freeze.FreezeSourcePlugin
uidService
 
Fields inherited from class org.cougaar.core.plugin.freeze.FreezePlugin
logger, sourceRelayPredicate, targetRelayPredicate
 
Fields inherited from class org.cougaar.core.blackboard.BlackboardClientComponent
agentId, agentIdentificationService, alarmService, blackboard, blackboardClientName
 
Fields inherited from interface org.cougaar.core.plugin.PluginBase
INSERTION_POINT
 
Fields inherited from interface org.cougaar.util.GenericStateModel
ACTIVE, IDLE, LOADED, UNINITIALIZED, UNLOADED
 
Fields inherited from interface org.cougaar.core.blackboard.BlackboardClient
current
 
Constructor Summary
FreezeNodePlugin()
           
 
Method Summary
 void execute()
          If the relay subscription becomes empty with thaw our children (rescind our relay).
protected  java.util.Set getTargetNames()
          Get the names of our target agents.
 void load()
          Override to get a logger on load
protected  void setUnfrozenAgents(java.util.Set unfrozenAgents)
          Our children have become frozen, so we tell our parent(s) we are frozen, too
 void setupSubscriptions()
          Called once after initialization, as a "pre-execute()".
 
Methods inherited from class org.cougaar.core.plugin.freeze.FreezeSourcePlugin
freeze, thaw, unload
 
Methods inherited from class org.cougaar.core.plugin.ServiceUserPlugin
acquireServices, cancelTimer, getTimer, getTimerExpirationTime, hasUnexpiredTimer, resetTimer, startTimer, timerExpired
 
Methods inherited from class org.cougaar.core.plugin.ComponentPlugin
getConfigFinder
 
Methods inherited from class org.cougaar.core.blackboard.BlackboardClientComponent
currentTimeMillis, cycle, getAgentIdentifier, getAlarmService, getBindingSite, getBlackboardClientName, getBlackboardService, getMessageAddress, getParameter, getParameters, getServiceBroker, halt, precycle, requestCycle, resume, setAgentIdentificationService, setAlarmService, setBindingSite, setBlackboardService, setParameter, setSchedulerService, setServiceBroker, setSuicideService, shouldExecute, start, stop, suspend, toString, wasAwakened
 
Methods inherited from class org.cougaar.util.GenericStateModelAdapter
getModelState, initialize, transitState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cougaar.util.GenericStateModel
getModelState, halt, initialize, resume, start, stop, suspend
 

Constructor Detail

FreezeNodePlugin

public FreezeNodePlugin()
Method Detail

load

public void load()
Description copied from class: ServiceUserPlugin
Override to get a logger on load

Specified by:
load in interface org.cougaar.util.GenericStateModel
Overrides:
load in class ServiceUserPlugin

setupSubscriptions

public void setupSubscriptions()
Description copied from class: ComponentPlugin
Called once after initialization, as a "pre-execute()".

Overrides:
setupSubscriptions in class FreezeSourcePlugin

execute

public void execute()
If the relay subscription becomes empty with thaw our children (rescind our relay). If the relay subscription becomes non-empty, we freeze our children (send a relay). Redundant freezes and thaws are filtered by our base class.

Overrides:
execute in class FreezeSourcePlugin

getTargetNames

protected java.util.Set getTargetNames()
Get the names of our target agents.

Specified by:
getTargetNames in class FreezeSourcePlugin
Returns:
the names of agents in this node

setUnfrozenAgents

protected void setUnfrozenAgents(java.util.Set unfrozenAgents)
Our children have become frozen, so we tell our parent(s) we are frozen, too

Specified by:
setUnfrozenAgents in class FreezeSourcePlugin