org.objectweb.cjdbc.controller.core.shutdown
Class VirtualDatabaseShutdownThread
java.lang.Object
org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread
org.objectweb.cjdbc.controller.core.shutdown.VirtualDatabaseShutdownThread
- All Implemented Interfaces:
- java.lang.Runnable
- public class VirtualDatabaseShutdownThread
- extends ShutdownThread
Executes all the work for shutting down a virtual database. This implies
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
database
VirtualDatabase database
shutdownLevel
int shutdownLevel
VirtualDatabaseShutdownThread
public VirtualDatabaseShutdownThread(VirtualDatabase db,
int ilevel)
- Prepare the thread for shutting down.
- Parameters:
db
- the database to shutdownilevel
- the level Smart,Fast,Immediate
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()
shutdownImmediate
public void shutdownImmediate()
throws ShutdownException
- Description copied from class:
ShutdownThread
- Force immediate shutdown. This method needs recovery at next start up.
- Specified by:
shutdownImmediate
in class ShutdownThread
- Throws:
ShutdownException
- if fails- 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()
terminateClients
private void terminateClients()
closeVirtualDatabase
private void closeVirtualDatabase()
waitForDisconnectClients
private void waitForDisconnectClients()
shutdownBackends
private void shutdownBackends(java.lang.String checkpoint)
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.