本文整理汇总了Java中org.hsqldb.scriptio.ScriptWriterBase类的典型用法代码示例。如果您正苦于以下问题:Java ScriptWriterBase类的具体用法?Java ScriptWriterBase怎么用?Java ScriptWriterBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScriptWriterBase类属于org.hsqldb.scriptio包,在下文中一共展示了ScriptWriterBase类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initParams
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
void initParams() {
// Allows the user to set log size in the properties file.
int logMegas = properties.getIntegerProperty(
HsqlDatabaseProperties.hsqldb_log_size, 0);
maxLogSize = logMegas * 1024L * 1024;
scriptFormat = properties.getIntegerProperty(
HsqlDatabaseProperties.hsqldb_script_format,
ScriptWriterBase.SCRIPT_TEXT_170);
incBackup = properties.isPropertyTrue(
HsqlDatabaseProperties.hsqldb_inc_backup);
writeDelay = properties.getDefaultWriteDelay();
filesReadOnly = database.isFilesReadOnly();
scriptFileName = fileName + ".script";
logFileName = fileName + ".log";
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:18,代码来源:Log.java
示例2: openLog
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Wrappers for openning-starting / stoping-closing the log file and
* writer.
*/
private void openLog() {
if (filesReadOnly) {
return;
}
try {
dbLogWriter = ScriptWriterBase.newScriptWriter(database,
logFileName, false, false,
ScriptWriterBase.SCRIPT_TEXT_170);
dbLogWriter.setWriteDelay(writeDelay);
dbLogWriter.start();
} catch (Exception e) {
throw Error.error(ErrorCode.FILE_IO_ERROR, logFileName);
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:Log.java
示例3: readScript
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
void readScript() throws HsqlException {
bRestoring = true;
try {
if (dDatabase.isFilesInJar() || FileUtil.exists(sFileScript)) {
ScriptReaderBase scr =
ScriptReaderBase.newScriptReader(dDatabase, sFileScript,
scriptFormat);
scr.readAll(dDatabase.sessionManager.getSysSession());
scr.close();
}
} catch (IOException e) {
throw Trace.error(Trace.FILE_IO_ERROR, e.getMessage());
}
if (!dDatabase.isFilesInJar() && FileUtil.exists(sFileLog)) {
ScriptRunner.runScript(dDatabase, sFileLog,
ScriptWriterBase.SCRIPT_TEXT_170);
}
bRestoring = false;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:25,代码来源:Log.java
示例4: openLog
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Wrappers for openning-starting / stoping-closing the log file and
* writer.
*/
private void openLog() throws HsqlException {
if (filesReadOnly) {
return;
}
try {
dbLogWriter = ScriptWriterBase.newScriptWriter(database,
logFileName, false, false,
ScriptWriterBase.SCRIPT_TEXT_170);
dbLogWriter.setWriteDelay(writeDelay);
dbLogWriter.start();
} catch (Exception e) {
throw Trace.error(Trace.FILE_IO_ERROR, logFileName);
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:22,代码来源:Log.java
示例5: writeScript
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Write the .script file as .script.new.
*/
private void writeScript(boolean full) {
deleteNewScript();
//fredt - to do - flag for chache set index
ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database,
scriptFileName + ".new", full, true, scriptFormat);
scw.writeAll();
scw.close();
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:15,代码来源:Log.java
示例6: processLog
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Performs all the commands in the .log file.
*/
private void processLog() {
if (!database.isFilesInJar() && fa.isStreamElement(logFileName)) {
ScriptRunner.runScript(database, logFileName,
ScriptWriterBase.SCRIPT_TEXT_170);
}
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:11,代码来源:Log.java
示例7: writeScript
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Method declaration
*
* @param full
* @throws HsqlException
*/
private void writeScript(boolean full) throws HsqlException {
try {
FileUtil.delete(sFileScript + ".new");
} catch (IOException e) {}
// script; but only positions of cached tables, not full
//fredt - to do - flag for chache set index
ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(dDatabase,
sFileScript + ".new", full, true, scriptFormat);
scw.writeAll();
scw.close();
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:Log.java
示例8: writeScript
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Write the .script file as .script.new.
*/
private void writeScript(boolean full) throws HsqlException {
deleteNewScript();
//fredt - to do - flag for chache set index
ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database,
scriptFileName + ".new", full, true, scriptFormat);
scw.writeAll();
scw.close();
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:Log.java
示例9: processLog
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* Performs all the commands in the .log file.
*/
private void processLog() throws HsqlException {
if (!database.isFilesInJar() && fa.isStreamElement(logFileName)) {
ScriptRunner.runScript(database, logFileName,
ScriptWriterBase.SCRIPT_TEXT_170);
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:11,代码来源:Log.java
示例10: initParams
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
void initParams() {
// Allows the user to set log size in the properties file.
int logMegas = properties.getIntegerProperty(
HsqlDatabaseProperties.hsqldb_log_size, 0);
maxLogSize = logMegas * 1024 * 1024;
scriptFormat = properties.getIntegerProperty(
HsqlDatabaseProperties.hsqldb_script_format,
ScriptWriterBase.SCRIPT_TEXT_170);
writeDelay = properties.getDefaultWriteDelay();
filesReadOnly = database.isFilesReadOnly();
scriptFileName = fileName + ".script";
logFileName = fileName + ".log";
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:Log.java
示例11: open
import org.hsqldb.scriptio.ScriptWriterBase; //导入依赖的package包/类
/**
* When opening a database, the hsqldb.compatible_version property is
* used to determine if this version of the engine is equal to or greater
* than the earliest version of the engine capable of opening that
* database.<p>
*
* @throws HsqlException
*/
void open() throws HsqlException {
// Allows the user to set log size in the properties file.
int logMegas = pProperties.getIntegerProperty("hsqldb.log_size", 0);
maxLogSize = logMegas * 1024 * 1024;
scriptFormat = pProperties.getIntegerProperty("hsqldb.script_format",
ScriptWriterBase.SCRIPT_TEXT_170);
filesReadOnly = dDatabase.isFilesReadOnly();
sFileScript = sName + ".script";
sFileLog = sName + ".log";
sFileCache = sName + ".data";
sFileBackup = sName + ".backup";
if (filesReadOnly) {
if (cCache != null) {
cCache.open(true);
}
reopenAllTextCaches();
readScript();
return;
}
boolean needbackup = false;
int state = pProperties.getDBModified();
try {
if (state == HsqlDatabaseProperties.FILES_MODIFIED_NEW) {
FileUtil.renameOverwrite(sFileScript + ".new", sFileScript);
FileUtil.renameOverwrite(sFileBackup + ".new", sFileBackup);
FileUtil.delete(sFileLog);
} else if (state == HsqlDatabaseProperties.FILES_MODIFIED) {
// recovering after a crash (or forgot to close correctly)
restoreBackup();
needbackup = true;
}
} catch (IOException e) {}
pProperties.setDBModified(HsqlDatabaseProperties.FILES_MODIFIED);
if (cCache != null) {
cCache.open(false);
}
reopenAllTextCaches();
if (!dDatabase.isNew) {
readScript();
if (needbackup) {
close(false, true);
pProperties.setDBModified(
HsqlDatabaseProperties.FILES_MODIFIED);
if (cCache != null) {
cCache.open(false);
}
reopenAllTextCaches();
}
}
openLog();
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:77,代码来源:Log.java
注:本文中的org.hsqldb.scriptio.ScriptWriterBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论