org.sandev.basics.DataManager
Class InitRetryThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.sandev.basics.DataManager.InitRetryThread
All Implemented Interfaces:
java.lang.Runnable

public class InitRetryThread
extends java.lang.Thread

A thread to retry Persister initialization for a specified number of tries at a specified interval. The sandNodeState is set to Controllable.STATE_FAILING while the thread is executing. At conclusion the sandNodeState is either FAILED or RUNNING.

Note that we first wait, since we are called to run after having just failed.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  int attempts
           
protected  DataManagerNode dm
           
protected  int seconds
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InitRetryThread(int seconds, int attempts, DataManagerNode dm)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

seconds

protected int seconds

attempts

protected int attempts

dm

protected DataManagerNode dm
Constructor Detail

InitRetryThread

public InitRetryThread(int seconds,
                       int attempts,
                       DataManagerNode dm)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread