本文整理匯總了Java中org.hsqldb.lib.StopWatch.stop方法的典型用法代碼示例。如果您正苦於以下問題:Java StopWatch.stop方法的具體用法?Java StopWatch.stop怎麽用?Java StopWatch.stop使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.hsqldb.lib.StopWatch的用法示例。
在下文中一共展示了StopWatch.stop方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。
示例1: openDatabases
點讚 2
import org.hsqldb.lib.StopWatch; //導入方法依賴的package包/類
/**
* Opens this server's database instances. This method returns true If
* at least one database goes online, otherwise it returns false.
*
* If opening any of the databases is attempted and an exception is
* thrown, the server error is set to this exception.
*/
final boolean openDatabases() {
printWithThread("openDatabases() entered");
boolean success = false;
setDBInfoArrays();
for (int i = 0; i < dbAlias.length; i++) {
if (dbAlias[i] == null) {
continue;
}
printWithThread("Opening database: [" + dbType[i] + dbPath[i]
+ "]");
StopWatch sw = new StopWatch();
int id;
try {
id = DatabaseManager.getDatabase(dbType[i], dbPath[i], this,
dbProps[i]);
dbID[i] = id;
success = true;
} catch (HsqlException e) {
printError("Database [index=" + i + ", db=" + dbType[i]
+ dbPath[i] + ", alias=" + dbAlias[i]
+ "] did not open: " + e.toString());
setServerError(e);
dbAlias[i] = null;
dbPath[i] = null;
dbType[i] = null;
dbProps[i] = null;
continue;
}
sw.stop();
String msg = "Database [index=" + i + ", id=" + id + ", db="
+ dbType[i] + dbPath[i] + ", alias=" + dbAlias[i]
+ "] opened successfully";
print(sw.elapsedTimeToMessage(msg));
}
printWithThread("openDatabases() exiting");
if (isRemoteOpen) {
success = true;
}
if (!success && getServerError() == null) {
// database alias / path list is empty or without full info for any DB
setServerError(Error.error(ErrorCode.SERVER_NO_DATABASE));
}
return success;
}
開發者ID:tiweGH,項目名稱:OpenDiabetes,代碼行數:69,
示例2: openDatabases
點讚 2
import org.hsqldb.lib.StopWatch; //導入方法依賴的package包/類
/**
* Opens this server's database instances. This method returns true If
* at least one database goes online, otherwise it returns false.
*
* If openning any of the databases is attempted and an exception is
* thrown, the server error is set to this exception.
*/
final boolean openDatabases() {
printWithThread("openDatabases() entered");
boolean success = false;
setDBInfoArrays();
for (int i = 0; i < dbAlias.length; i++) {
if (dbAlias[i] == null) {
continue;
}
printWithThread("Opening database: [" + dbType[i] + dbPath[i]
+ "]");
StopWatch sw = new StopWatch();
int id;
try {
id = DatabaseManager.getDatabase(dbType[i], dbPath[i], this,
dbProps[i]);
dbID[i] = id;
success = true;
} catch (HsqlException e) {
printError("Database [index=" + i + ", db=" + dbType[i]
+ dbPath[i] + ", alias=" + dbAlias[i]
+ "] did not open: " + e.toString());
setServerError(e);
dbAlias[i] = null;
dbPath[i] = null;
dbType[i] = null;
dbProps[i] = null;
continue;
}
sw.stop();
String msg = "Database [index=" + i + ", id=" + id + ", db="
+ dbType[i] + dbPath[i] + ", alias=" + dbAlias[i]
+ "] opened sucessfully";
print(sw.elapsedTimeToMessage(msg));
}
printWithThread("openDatabases() exiting");
if (isRemoteOpen) {
success = true;
}
if (!success && getServerError() == null) {
// database alias / path list is empty or without full info for any DB
setServerError(Error.error(ErrorCode.SERVER_NO_DATABASE));
}
return success;
}
開發者ID:Julien35,項目名稱:dev-courses,代碼行數:69,
示例3: openDatabases
點讚 2
import org.hsqldb.lib.StopWatch; //導入方法依賴的package包/類
/**
* Opens this server's database instances. This method returns true If
* at least one database goes online, otherwise it returns false.
*
* If openning any of the databases is attempted and an exception is
* thrown, the server error is set to this exception.
*
* @throws HsqlException if a database access error occurs
*/
final boolean openDatabases() {
printWithThread("openDatabases() entered");
boolean success = false;
setDBInfoArrays();
for (int i = 0; i < dbAlias.length; i++) {
if (dbAlias[i] == null) {
continue;
}
printWithThread("Opening database: [" + dbType[i] + dbPath[i]
+ "]");
StopWatch sw = new StopWatch();
int id;
try {
id = DatabaseManager.getDatabase(dbType[i], dbPath[i], this,
dbProps[i]);
dbID[i] = id;
success = true;
} catch (HsqlException e) {
printError("Database [index=" + i + "db=" + dbType[i]
+ dbPath[i] + ", alias=" + dbAlias[i]
+ "] did not open: " + e.toString());
setServerError(e);
dbAlias[i] = null;
dbPath[i] = null;
dbType[i] = null;
dbProps[i] = null;
continue;
}
sw.stop();
String msg = "Database [index=" + i + ", id=" + id + ", " + "db="
+ dbType[i] + dbPath[i] + ", alias=" + dbAlias[i]
+ "] opened sucessfully";
print(sw.elapsedTimeToMessage(msg));
}
printWithThread("openDatabases() exiting");
if (!success && getServerError() == null) {
// database alias / path list is empty or without full info for any DB
setServerError(Trace.error(Trace.SERVER_NO_DATABASE));
}
return success;
}
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:67,
示例4: openDatabases
點讚 2
import org.hsqldb.lib.StopWatch; //導入方法依賴的package包/類
/**
* Opens this server's database instances. This method returns true If
* at least one database goes online, otherwise it returns false.
*
* If openning any of the databases is attempted and an exception is
* thrown, the server error is set to this exception.
*
* @throws HsqlException if a database access error occurs
*/
final boolean openDatabases() {
printWithThread("openDatabases() entered");
boolean success = false;
setDBInfoArrays();
for (int i = 0; i < dbAlias.length; i++) {
if (dbAlias[i] == null) {
continue;
}
printWithThread("Opening database: [" + dbType[i] + dbPath[i]
+ "]");
StopWatch sw = new StopWatch();
int id;
try {
id = DatabaseManager.getDatabase(dbType[i], dbPath[i], this,
dbProps[i]);
dbID[i] = id;
success = true;
} catch (HsqlException e) {
printError("Database [index=" + i + "db=" + dbType[i]
+ dbPath[i] + ", alias=" + dbAlias[i]
+ "] did not open: " + e.toString());
setServerError(e);
dbAlias[i] = null;
dbPath[i] = null;
dbType[i] = null;
dbProps[i] = null;
continue;
}
sw.stop();
String msg = "Database [index=" + i + ", id=" + id + ", " + "db="
+ dbType[i] + dbPath[i] + ", alias=" + dbAlias[i]
+ "] opened sucessfully";
print(sw.elapsedTimeToMessage(msg));
}
printWithThread("openDatabases() exiting");
if (isRemoteOpen) {
success = true;
}
if (!success && getServerError() == null) {
// database alias / path list is empty or without full info for any DB
setServerError(Trace.error(Trace.SERVER_NO_DATABASE));
}
return success;
}
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:71,
注:本文中的org.hsqldb.lib.StopWatch.stop方法示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。