クラス org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread

org.objectweb.cjdbc.controller.core.shutdown.ShutdownThreadに対する継承グラフ

Inheritance graph
[凡例]
すべてのメンバ一覧

説明

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

作者:
Nicolas Modrzyk

ShutdownThread.java41 行で定義されています。

Public メソッド

 ShutdownThread (int level, String type, String name)
void run ()
String getShutdownType ()
int getShutdownLevel ()
void abortShutdown (Exception cause)
abstract void shutdownSmart () throws ShutdownException
abstract void shutdownFast () throws ShutdownException
abstract void shutdownImmediate () throws ShutdownException
ThreadGroup getShutdownGroup ()

Public 変数

ThreadGroup shutdownGroup = new ThreadGroup("shutdown"+new Date())

Static Public 変数

final String CONTROLLER = "controller"
final String DATABASE = "database"
final String BACKEND = "backend"

Protected メソッド

void beforeShutdown ()
void postShutdown ()

Protected 変数

int shutdownLevel
String type
String name

変数

Trace logger


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.ShutdownThread int  level,
String  type,
String  name
 

Create a new shutdown thread

引数:
level Immediate,Smart,Fast
type of shutdown thread for logging
name of element to shutdown
ShutdownThread.java70 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.logger.

00071 { 00072 this.shutdownLevel = level; 00073 this.type = type; 00074 this.name = name; 00075 logger = Trace.getLogger("org.objectweb.cjdbc.controller.shutdown." + type); 00076 switch (level) 00077 { 00078 case Constants.CONTROLLER_SHUTDOWN_SMART : 00079 logger.warn(Translate.get("controller.shutdown.type.smart", 00080 new String[]{name, type})); 00081 break; 00082 case Constants.CONTROLLER_SHUTDOWN_FAST : 00083 logger.warn(Translate.get("controller.shutdown.type.fast", 00084 new String[]{name, type})); 00085 break; 00086 case Constants.CONTROLLER_SHUTDOWN_IMMEDIATE : 00087 logger.warn(Translate.get("controller.shutdown.type.immediate", 00088 new String[]{name, type})); 00089 break; 00090 default : 00091 logger.error(Translate.get("controller.shutdown.unknown.level",level)); 00092 } 00093 }


メソッド

void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.abortShutdown Exception  cause  ) 
 

If shutdown fails ...

引数:
cause why shutdown was aborted
ShutdownThread.java164 行で定義されています。
00165 { 00166 logger.info(Translate.get("controller.shutdown.aborted", cause)); 00167 }

void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.beforeShutdown  )  [protected]
 

org.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThreadで再定義されています。

ShutdownThread.java129 行で定義されています。

00130 { 00131 00132 }

ThreadGroup org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.getShutdownGroup  ) 
 

Returns the shutdownGroup value.

戻り値:
Returns the shutdownGroup.
ShutdownThread.java198 行で定義されています。

参照元 org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase.shutdown(), と org.objectweb.cjdbc.controller.core.Controller.shutdown().

00199 { 00200 return shutdownGroup; 00201 }

int org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.getShutdownLevel  ) 
 

Get shutdown level

戻り値:
level
ShutdownThread.java154 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThread.shutdownFast(), と org.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThread.shutdownSmart().

00155 { 00156 return this.shutdownLevel; 00157 }

String org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.getShutdownType  ) 
 

Get shutdown type

戻り値:
controller,database or backend
ShutdownThread.java144 行で定義されています。
00145 { 00146 return this.type; 00147 }

void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.postShutdown  )  [protected]
 

ShutdownThread.java134 行で定義されています。

00135 { 00136 00137 }

void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.run  ) 
 

Execute the shutdown

参照:
java.lang.Runnable#run()
ShutdownThread.java100 行で定義されています。
00101 { 00102 logger.info("Running shutdown type:"+type); 00103 try 00104 { 00105 beforeShutdown(); 00106 switch (shutdownLevel) 00107 { 00108 case Constants.CONTROLLER_SHUTDOWN_SMART : 00109 shutdownSmart(); 00110 break; 00111 case Constants.CONTROLLER_SHUTDOWN_FAST : 00112 shutdownFast(); 00113 break; 00114 case Constants.CONTROLLER_SHUTDOWN_IMMEDIATE : 00115 shutdownImmediate(); 00116 break; 00117 default : 00118 break; 00119 } 00120 postShutdown(); 00121 } 00122 catch (ShutdownException se) 00123 { 00124 se.printStackTrace(); 00125 abortShutdown(se); 00126 } 00127 }

abstract void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.shutdownFast  )  throws ShutdownException [pure virtual]
 

Wait for all clients to finish transaction and then force disconnection. Then disable backends for checkpoint. This shutdown method does not need recovery.

例外:
ShutdownException if fails

org.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThread, と org.objectweb.cjdbc.controller.core.shutdown.VirtualDatabaseShutdownThreadで実装されています.

abstract void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.shutdownImmediate  )  throws ShutdownException [pure virtual]
 

Force immediate shutdown. This method needs recovery at next start up.

例外:
ShutdownException if fails

org.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThread, と org.objectweb.cjdbc.controller.core.shutdown.VirtualDatabaseShutdownThreadで実装されています.

abstract void org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.shutdownSmart  )  throws ShutdownException [pure virtual]
 

Wait for all clients to finish transaction and disconnect. Then disable all backends for checkpoints.

例外:
ShutdownException if fails

org.objectweb.cjdbc.controller.core.shutdown.ControllerShutdownThread, と org.objectweb.cjdbc.controller.core.shutdown.VirtualDatabaseShutdownThreadで実装されています.


変数

final String org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.BACKEND = "backend" [static]
 

Backend Thread ShutdownThread.java48 行で定義されています。

final String org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.CONTROLLER = "controller" [static]
 

Controller Thread ShutdownThread.java44 行で定義されています。

final String org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.DATABASE = "database" [static]
 

Database Thread ShutdownThread.java46 行で定義されています。

Trace org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.logger [package]
 

初期値:

Trace .getLogger("org.objectweb.cjdbc.controller.shutdown")
Logger instance. ShutdownThread.java57 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.ShutdownThread().

String org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.name [protected]
 

ShutdownThread.java61 行で定義されています。

ThreadGroup org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.shutdownGroup = new ThreadGroup("shutdown"+new Date())
 

Group to join onto when shutting down ShutdownThread.java51 行で定義されています。

int org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.shutdownLevel [protected]
 

org.objectweb.cjdbc.controller.core.shutdown.VirtualDatabaseShutdownThreadで再定義されています。

ShutdownThread.java54 行で定義されています。

String org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread.type [protected]
 

ShutdownThread.java60 行で定義されています。


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:41 2004に生成されました。 doxygen 1.3.8