Package org.cougaar.core.thread

This package contains the Cougaar pooled ThreadService implementation.

See:
          Description

Interface Summary
AgentLoadService This Service provides a simple time-based integral of agent load.
CougaarThread Defines a set of Schedulable state constants.
RightsSelector A getNextPending method of a RightSelector is used by a PropagatingScheduler to decide now to share rights among its own Schedulables and its children.
Schedulable A Schedulable is an API provided by the ThreadService that takes the place of standard Java Threads and TimerTasks.
ThreadListener Objects which wish to subscribe to the ThreadListenerService should implement this interface.
ThreadStatusService This service is designed to provide a low-fidelity snapshot of the current state of the ThreadServices.
ThreadStatusService.Body  
 

Class Summary
AgentControlPlugin This trivial Plugin exists only to create a SchedulerWatcher for whatever Agent it's loaded in to.
AgentLoadRatePlugin This Plugin collects the load history for the Agent in which it's loaded, and uplaads that data to the metrics service.
AgentLoadSensorPlugin This Plugin provides the AgentLoadService for other Plugins in the same Agent.
AgentLoadService.AgentLoad This struct-like class holds the four values of a CPU load snapshot.
DynamicSortedQueue A simple queue, built on array list, that uses a Comparator to determine which elements is next (the smallest, according to the Comparator).
LimitThreadsPlugin This Component limits the number of threads that an agent can use to run its schedulables in parallel.
PercentageLoadSelector A sample RightsSelector that attempts to select among the children in such a way as to match a set of target percentages.
PropagatingScheduler The standard hiearchical thread service implementation uses this extension of Scheduler to handle the propagation of rights.
RightsPropagatingScheduler This experimenatal extension of Scheduler is not currently used.
RootControlPlugin This node-level Plugin shows examples of limiting the top-level thread service in two ways: it sets the global max to 2, and it qualifies rights selection for children so that no child ever uses more than half of the available rights.
RunnableQueue This utility class embads a CircularQueue in its own Schedulable, the body of which processes elements on the queue for up to 500ms or until the queue is empty, whichever comes first.
SchedulableStatus An optional utility class for use by Runnables running in a pooled ThreadService thread to tell the ThreadService why they are running so long (for example, due to a blocking I/O call).
Scheduler The base class of thread-scheduler.
SchedulerWatcher This class listens for events on the closest ThreadService, collects information about every consumer, and periodically uploads that information the the metrics service.
SingleThreadServiceProvider This Component provides a very simple, serializing ThreadService for its container.
ThreadServiceProvider This component is the ServiceProvider for the ThreadService, ThreadControlService, ThreadListenerService, and ThreadStatusService.
ThreadsWellBehavedPlugin This class marks the agent as wellbehaved.
TopPlugin This component is used to create the TopServlet, which it will do unless the "servlet" parameter is set to "false", and the RogueThreadDetector, which it will do unless the "detector" parameter is set to "false".
TrivialThreadServiceProvider The ServiceProvider for the simple ThreadServices.
 

Package org.cougaar.core.thread Description

This package contains the Cougaar pooled ThreadService implementation.

For most ThreadService clients, the only public APIs are the Schedulable and perhaps SchedulableStatus.

ThreadService documentation is in:
$COUGAAR_INSTALL_PATH/doc/OnlineManual/ThreadService/index.html

For more detail, see the Cougaar Developers' Guide.