org.cougaar.core.plugin.freeze
Class FreezeNodePlugin
java.lang.Object
org.cougaar.util.GenericStateModelAdapter
org.cougaar.core.blackboard.BlackboardClientComponent
org.cougaar.core.plugin.ComponentPlugin
org.cougaar.core.plugin.ServiceUserPlugin
org.cougaar.core.plugin.freeze.FreezePlugin
org.cougaar.core.plugin.freeze.FreezeSourcePlugin
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.
| Fields inherited from interface org.cougaar.util.GenericStateModel |
ACTIVE, IDLE, LOADED, UNINITIALIZED, UNLOADED |
|
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.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 |
FreezeNodePlugin
public FreezeNodePlugin()
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