org.mmbase.module.builders.vwms
Class VwmProbe

java.lang.Object
  extended byorg.mmbase.module.builders.vwms.VwmProbe
All Implemented Interfaces:
java.lang.Runnable

public class VwmProbe
extends java.lang.Object
implements java.lang.Runnable

admin module, keeps track of all the worker pools and adds/kills workers if needed (depending on there load and info from the config module).

Version:
$Id: VwmProbe.java,v 1.10 2003/07/02 06:20:45 keesj Exp $ current version $Id: VwmProbe.java,v 1.10 2003/07/02 06:20:45 keesj Exp $
Author:
Daniel Ockeloen

Constructor Summary
VwmProbe(VwmProbeInterface parent)
           
 
Method Summary
 boolean containsTask(MMObjectNode node)
          Checks if a task node already exists in the task nodes vector.
 void init()
           
 boolean putTask(MMObjectNode node)
          Puts a task node to the vector (sorted on task start time) of new tasks.
 boolean replaceTask(MMObjectNode node)
          Replaces a task node entry in the sorted task nodes vector with a new one.
 void run()
          blocked on the first task in the queue
 void start()
          Starts the admin Thread.
 void stop()
          Stops the admin Thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VwmProbe

public VwmProbe(VwmProbeInterface parent)
Method Detail

init

public void init()

start

public void start()
Starts the admin Thread.


stop

public void stop()
Stops the admin Thread.


run

public void run()
blocked on the first task in the queue

Specified by:
run in interface java.lang.Runnable

putTask

public boolean putTask(MMObjectNode node)
Puts a task node to the vector (sorted on task start time) of new tasks. If the tasks vector already contains the node, it will be replaced.

Parameters:
node - task node
Returns:
true always.

containsTask

public boolean containsTask(MMObjectNode node)
Checks if a task node already exists in the task nodes vector.

Parameters:
node - task node
Returns:
true if the nodes objectnr matches a node objectnr in the vector, false if tasks vector is empty or doesn't contain the node.

replaceTask

public boolean replaceTask(MMObjectNode node)
Replaces a task node entry in the sorted task nodes vector with a new one.

Parameters:
node - task node
Returns:
true if task node was found and replaced, false if tasks vector is empty or doesn't contain the node.


MMBase build 1.7.1.20041002