org.objectweb.cjdbc.controller.core.shutdown
Class ShutdownThread

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.core.shutdown.ShutdownThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ControllerShutdownThread, VirtualDatabaseShutdownThread

public abstract class ShutdownThread
extends java.lang.Object
implements java.lang.Runnable

Skeleton for shutdown threads. This includes Controller, VirtualDatabase and DatabaseBackend shutdown threads.

Author:
Emmanuel Cecchet , Nicolas Modrzyk

Field Summary
(package private)  Trace logger
          Logger instance.
 java.lang.ThreadGroup shutdownGroup
          Group to join onto when shutting down
protected  int shutdownLevel
           
 
Constructor Summary
ShutdownThread(int level)
          Create a new shutdown thread
 
Method Summary
 void abortShutdown(java.lang.Exception cause)
          If shutdown fails ...
 java.lang.ThreadGroup getShutdownGroup()
          Returns the shutdownGroup value.
 int getShutdownLevel()
          Get shutdown level
 void run()
          Execute the shutdown
abstract  void shutdown()
          Specific implementation of the shutdown method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shutdownGroup

public java.lang.ThreadGroup shutdownGroup
Group to join onto when shutting down


shutdownLevel

protected int shutdownLevel

logger

Trace logger
Logger instance.

Constructor Detail

ShutdownThread

public ShutdownThread(int level)
Create a new shutdown thread

Parameters:
level - Constants.SHUTDOWN_WAIT, Constants.SHUTDOWN_SAFE or Constants.SHUTDOWN_FORCE
Method Detail

getShutdownGroup

public java.lang.ThreadGroup getShutdownGroup()
Returns the shutdownGroup value.

Returns:
Returns the shutdownGroup.

getShutdownLevel

public int getShutdownLevel()
Get shutdown level

Returns:
level

run

public void run()
Execute the shutdown

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

abortShutdown

public void abortShutdown(java.lang.Exception cause)
If shutdown fails ...

Parameters:
cause - why shutdown was aborted

shutdown

public abstract void shutdown()
                       throws ShutdownException
Specific implementation of the shutdown method.

Throws:
ShutdownException - if fails


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