com.isti.util
Class ExtendedArchiveManager.AbstractWorkerThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.isti.util.IstiThread
          extended by com.isti.util.IstiNotifyThread
              extended by com.isti.util.ExtendedArchiveManager.AbstractWorkerThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ExtendedArchiveManager.ArchiveItemWorkerThread, ExtendedArchiveManager.PurgeWorkerThread
Enclosing class:
ExtendedArchiveManager

protected abstract static class ExtendedArchiveManager.AbstractWorkerThread
extends IstiNotifyThread

Class AbstractWorkerThread is a general worker thread for archive managers.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.util.Vector archiveManagerVector
           
protected static long DEF_WORKER_SLEEPTIME
           
protected  long sleepTime
           
 
Fields inherited from class com.isti.util.IstiThread
DEFAULT_TERMINATE_WAIT_TIME, terminateFlag
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ExtendedArchiveManager.AbstractWorkerThread(java.lang.String name, long sleepTime)
           
 
Method Summary
 void addArchiveManager(ExtendedArchiveManager am)
          Adds an archive manager if it has not already been added.
 ExtendedArchiveManager getArchiveManager(int index)
          Gets the archive manager for the specified index.
 int getNumArchiveManagers()
          Gets the number of archive managers handled by this class.
abstract  void processArchiveManager(ExtendedArchiveManager am)
          Processes an archive manager.
 void removeArchiveManager(ExtendedArchiveManager am)
          Removes an archive manager.
 void run()
          Runs the worker thread.
 
Methods inherited from class com.isti.util.IstiNotifyThread
sleep, terminate
 
Methods inherited from class com.isti.util.IstiThread
clearThreadWaitNotifyFlag, isTerminated, nextThreadNum, notifyThread, start, terminate, waitForNotify, waitForNotify, waitForTerminate, waitForTerminate, wasStarted
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEF_WORKER_SLEEPTIME

protected static final long DEF_WORKER_SLEEPTIME
See Also:
Constant Field Values

sleepTime

protected final long sleepTime

archiveManagerVector

protected java.util.Vector archiveManagerVector
Constructor Detail

ExtendedArchiveManager.AbstractWorkerThread

public ExtendedArchiveManager.AbstractWorkerThread(java.lang.String name,
                                                   long sleepTime)
Method Detail

addArchiveManager

public void addArchiveManager(ExtendedArchiveManager am)
Adds an archive manager if it has not already been added.

Parameters:
am - the archive manager.

getArchiveManager

public ExtendedArchiveManager getArchiveManager(int index)
Gets the archive manager for the specified index.

Parameters:
index - index of archive manager to return.
Returns:
the archive manager or null if it does not exist.

getNumArchiveManagers

public int getNumArchiveManagers()
Gets the number of archive managers handled by this class.

Returns:
the number of archive managers handled by this class.

processArchiveManager

public abstract void processArchiveManager(ExtendedArchiveManager am)
Processes an archive manager.

Parameters:
am - the archive manager.

removeArchiveManager

public void removeArchiveManager(ExtendedArchiveManager am)
Removes an archive manager.

Parameters:
am - the archive manager.

run

public void run()
Runs the worker thread.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread