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

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.core.shutdown.ShutdownThread
      extended byorg.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThread
All Implemented Interfaces:
java.lang.Runnable

public class ControllerShutdownThread
extends ShutdownThread

Executes all the work for shutting down a controller. This implies, blocking new clients, waiting for current clients to finish their transaction or disconnect them. Shutdown databases by shutting down backends and storing checkpoints

Version:
1.0
Author:
Nicolas Modrzyk

Field Summary
private  Controller controller
           
private  ReportManager report
           
private  boolean systemExit
           
 
Fields inherited from class org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread
BACKEND, CONTROLLER, DATABASE, logger, name, shutdownGroup, shutdownLevel, type
 
Constructor Summary
ControllerShutdownThread(Controller controller, int ilevel)
          Prepare the thread for shutting down.
 
Method Summary
protected  void beforeShutdown()
           
 void setSystemExit(boolean systemExit)
          Sets the systemExit value.
protected  void shutdown()
           
private  void shutdownDatabases(int level)
           
 void shutdownFast()
          Wait for all clients to finish transaction and then force disconnection.
 void shutdownImmediate()
          Force immediate shutdown.
private  void shutdownJmxAgent()
           
private  void shutdownServerConnectionThread()
           
 void shutdownSmart()
          Wait for all clients to finish transaction and disconnect.
 
Methods inherited from class org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread
abortShutdown, getShutdownGroup, getShutdownLevel, getShutdownType, postShutdown, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller

private Controller controller

report

private ReportManager report

systemExit

private boolean systemExit
Constructor Detail

ControllerShutdownThread

public ControllerShutdownThread(Controller controller,
                                int ilevel)
Prepare the thread for shutting down.

Parameters:
controller - the controller to shutdown
ilevel - the level Smart,Fast,Immediate
Method Detail

shutdownImmediate

public void shutdownImmediate()
Description copied from class: ShutdownThread
Force immediate shutdown. This method needs recovery at next start up.

Specified by:
shutdownImmediate in class ShutdownThread
See Also:
ShutdownThread.shutdownImmediate()

beforeShutdown

protected void beforeShutdown()
Overrides:
beforeShutdown in class ShutdownThread

shutdown

protected void shutdown()

shutdownSmart

public void shutdownSmart()
                   throws ShutdownException
Description copied from class: ShutdownThread
Wait for all clients to finish transaction and disconnect. Then disable all backends for checkpoints.

Specified by:
shutdownSmart in class ShutdownThread
Throws:
ShutdownException - if fails
See Also:
ShutdownThread.shutdownSmart()

shutdownFast

public void shutdownFast()
                  throws ShutdownException
Description copied from class: ShutdownThread
Wait for all clients to finish transaction and then force disconnection. Then disable backends for checkpoint. This shutdown method does not need recovery.

Specified by:
shutdownFast in class ShutdownThread
Throws:
ShutdownException - if fails
See Also:
ShutdownThread.shutdownFast()

shutdownJmxAgent

private void shutdownJmxAgent()

shutdownDatabases

private void shutdownDatabases(int level)

shutdownServerConnectionThread

private void shutdownServerConnectionThread()
                                     throws ShutdownException
Throws:
ShutdownException

setSystemExit

public void setSystemExit(boolean systemExit)
Sets the systemExit value.

Parameters:
systemExit - The systemExit to set.


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