org.objectweb.cjdbc.controller.shutdown
Class ControllerShutdownThread

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.shutdown.ShutdownThread
      extended byorg.objectweb.cjdbc.controller.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
           
 
Fields inherited from class org.objectweb.cjdbc.controller.shutdown.ShutdownThread
BACKEND, CONTROLLER, DATABASE, logger, name, shutdownLevel, type
 
Constructor Summary
ControllerShutdownThread(Controller controller, int ilevel)
          Prepare the thread for shutting down.
 
Method Summary
protected  void finish()
           
private  void shutdownDatabases()
           
 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.shutdown.ShutdownThread
abortShutdown, getShutdownLevel, getShutdownType, 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
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

finish

protected void finish()
Overrides:
finish in class ShutdownThread

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()

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()
                       throws ShutdownException
Throws:
ShutdownException

shutdownDatabases

private void shutdownDatabases()
                        throws ShutdownException
Throws:
ShutdownException

shutdownServerConnectionThread

private void shutdownServerConnectionThread()
                                     throws ShutdownException
Throws:
ShutdownException


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