to.etc.domui.util.janitor
Class JanitorThread

java.lang.Object
  extended by to.etc.domui.util.janitor.JanitorThread
All Implemented Interfaces:
java.lang.Runnable

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

Encapsulates a single job spawned by the janitor.


Field Summary
static int jtfASSIGN
          Started but thread has not yet started
static int jtfDONE
          Terminated and released.
static int jtfIDLE
          Idle and available for a job
static int jtfRUNNING
          Currently running
static int jtfTERM
          Terminated but not yet released
protected  JanitorTask m_jt
          The janitor task executing in this thread
protected  int m_slot
          The slot number for this Janitor Thread
 
Constructor Summary
JanitorThread(Janitor j, int slot)
           
 
Method Summary
 void assignTask(JanitorTask jt)
           
protected  boolean hasState(int state)
           
 void run()
          The main thread entry for the job...
protected  void setState(int state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jtfIDLE

public static final int jtfIDLE
Idle and available for a job

See Also:
Constant Field Values

jtfASSIGN

public static final int jtfASSIGN
Started but thread has not yet started

See Also:
Constant Field Values

jtfRUNNING

public static final int jtfRUNNING
Currently running

See Also:
Constant Field Values

jtfTERM

public static final int jtfTERM
Terminated but not yet released

See Also:
Constant Field Values

jtfDONE

public static final int jtfDONE
Terminated and released.

See Also:
Constant Field Values

m_jt

protected JanitorTask m_jt
The janitor task executing in this thread


m_slot

protected int m_slot
The slot number for this Janitor Thread

Constructor Detail

JanitorThread

public JanitorThread(Janitor j,
                     int slot)
Method Detail

hasState

protected boolean hasState(int state)

setState

protected void setState(int state)

assignTask

public void assignTask(JanitorTask jt)

run

public void run()
The main thread entry for the job...

Specified by:
run in interface java.lang.Runnable