本文整理汇总了Java中org.hsqldb.DatabaseManager.shutdownDatabases方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseManager.shutdownDatabases方法的具体用法?Java DatabaseManager.shutdownDatabases怎么用?Java DatabaseManager.shutdownDatabases使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.DatabaseManager
的用法示例。
在下文中一共展示了DatabaseManager.shutdownDatabases方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shutdownWithCatalogs
import org.hsqldb.DatabaseManager; //导入方法依赖的package包/类
/**
* Shuts down this server and all the database served by this server. As a
* consequence, any other server that is serving a subset of the databases
* will be shutdown, unless the server was started with server.remote_open
* property.
*
* The shutdownMode must be one of:
*
* <ul>
* <li>org.hsqldb.Database.CLOSEMODE_IMMEDIATELY
* <li>org.hsqldb.Database.CLOSEMODE_NORMAL
* <li>org.hsqldb.Database.CLOSEMODE_COMPACT
* <li>org.hsqldb.Database.CLOSEMODE_SCRIPT
* </ul>
* @param shutdownMode a value between 0-4, usually 0 or 1.
*/
public void shutdownWithCatalogs(int shutdownMode) {
// If an unchecked exception is thrown, isShuttingDown will be left true,
// which is good from a security standpoint.
isShuttingDown = true;
// make handleConnection() reject new connection attempts
DatabaseManager.shutdownDatabases(this, shutdownMode);
shutdown(false);
isShuttingDown = false;
}
示例2: shutdownCatalogs
import org.hsqldb.DatabaseManager; //导入方法依赖的package包/类
/**
* Shuts down all the database served by this server. As a consequence,
* this server and any other server that is serving a subset of the
* databases will be shutdown, unless the server was started with
* server.remote_open property.
*
* The shutdownMode must be one of:
*
* <ul>
* <li>org.hsqldb.Database.CLOSEMODE_IMMEDIATELY
* <li>org.hsqldb.Database.CLOSEMODE_NORMAL
* <li>org.hsqldb.Database.CLOSEMODE_COMPACT
* <li>org.hsqldb.Database.CLOSEMODE_SCRIPT
* </ul>
* @param shutdownMode a value between 0-4, usually 0 or 1.
*/
public void shutdownCatalogs(int shutdownMode) {
DatabaseManager.shutdownDatabases(this, shutdownMode);
}