org.objectweb.cjdbc.driver.connectpolicy
Class ControllerPingThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.objectweb.cjdbc.driver.connectpolicy.ControllerPingThread
All Implemented Interfaces:
java.lang.Runnable

public class ControllerPingThread
extends java.lang.Thread

This class defines a ControllerPingThread that periodically tries to connect to a failed controller to check if it is back online.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
private  int debugLevel
           
private  AbstractControllerConnectPolicy policy
           
private  long retryIntervalInMs
           
private  boolean threadTerminated
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ControllerPingThread(AbstractControllerConnectPolicy policy, long retryIntervalInMs, int debugLevel)
          Creates a new ControllerPingThread object.
 
Method Summary
 boolean isTerminated()
          Returns true if the thread is terminated.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

policy

private AbstractControllerConnectPolicy policy

retryIntervalInMs

private long retryIntervalInMs

threadTerminated

private boolean threadTerminated

debugLevel

private int debugLevel
Constructor Detail

ControllerPingThread

public ControllerPingThread(AbstractControllerConnectPolicy policy,
                            long retryIntervalInMs,
                            int debugLevel)
Creates a new ControllerPingThread object.

Parameters:
policy - controller connection policy.
retryIntervalInMs - interval in ms between 2 pings (checks).
debugLevel - the debug level to use
Method Detail

run

public void run()
See Also:
Runnable.run()

isTerminated

public boolean isTerminated()
Returns true if the thread is terminated.

Returns:
true if the thread is terminated.


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.