| java.lang.Object org.hsqldb.persist.Log
Log | public class Log (Code) | | This class is responsible for managing the database files. An HSQLDB database
consists of a .properties file, a .script file (contains an SQL script),
a .data file (contains data of cached tables) a .backup file
and a .log file.
When using TEXT tables, a data source for each table is also present.
Notes on OpenOffice.org integration.
A Storage API is used when HSQLDB is integrated into OpenOffice.org. All
file operations on the 4 main files are performed by OOo, which integrates
the contents of these files into its database file. The script format is
always TEXT in this case.
Extensively rewritten and extended in successive versions of HSQLDB.
author: Thomas Mueller (Hypersonic SQL Group) author: fredt@users. version: 1.8.0 since: Hypersonic SQL |
Method Summary | |
void | backupData() | void | checkpoint(boolean defrag) Performs checkpoint including pre and post operations. | void | close(boolean script) Close all the database files. | void | closeTextCache(Table table) | void | deleteBackup() | void | deleteData() | void | deleteLog() | void | deleteNewAndOldFiles() Deletes the leftovers from any previous unfinished operations. | void | deleteNewBackup() | void | deleteNewScript() | boolean | forceDefrag() | DataFileCache | getCache() Responsible for creating the cache instance. | int | getLogSize() | int | getScriptType() | int | getWriteDelay() Write delay specifies the frequency of FileDescriptor.sync() calls. | boolean | hasCache() | void | initParams() | boolean | isAnyCacheModified() | void | open() | DataFileCache | openTextCache(Table table, String source, boolean readOnlyData, boolean reversed) | void | renameNewBackup() | void | renameNewScript() | void | setLogSize(int megas) | void | setScriptType(int type) Changing the script format results in a checkpoint, with the .script
file written in the new format. | void | setWriteDelay(int delay) | void | shutdown() Fast counterpart to close(). | void | synchLog() | void | writeCommitStatement(Session session) | void | writeDeleteStatement(Session session, Table t, Object[] row) | void | writeInsertStatement(Session session, Table t, Object[] row) | void | writeSequenceStatement(Session session, NumberSequence s) | void | writeStatement(Session session, String s) Various writeXXX() methods are used for logging statements. |
checkpoint | void checkpoint(boolean defrag) throws HsqlException(Code) | | Performs checkpoint including pre and post operations. Returns to the
same state as before the checkpoint.
|
close | void close(boolean script) throws HsqlException(Code) | | Close all the database files. If script argument is true, no .data
or .backup file will remain and the .script file will contain all the
data of the cached tables as well as memory tables.
This is not used for filesReadOnly databases which use shutdown.
|
deleteBackup | void deleteBackup()(Code) | | |
deleteData | void deleteData()(Code) | | |
deleteLog | void deleteLog()(Code) | | |
deleteNewAndOldFiles | void deleteNewAndOldFiles()(Code) | | Deletes the leftovers from any previous unfinished operations.
|
deleteNewBackup | void deleteNewBackup()(Code) | | |
deleteNewScript | void deleteNewScript()(Code) | | |
forceDefrag | boolean forceDefrag()(Code) | | Returns true if lost space is above the threshold
|
getLogSize | int getLogSize()(Code) | | |
getScriptType | int getScriptType()(Code) | | |
getWriteDelay | int getWriteDelay()(Code) | | Write delay specifies the frequency of FileDescriptor.sync() calls.
|
hasCache | boolean hasCache()(Code) | | |
initParams | void initParams()(Code) | | |
isAnyCacheModified | boolean isAnyCacheModified()(Code) | | Checks all the caches and returns true if the modified flag is set for any
|
open | void open() throws HsqlException(Code) | | 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.
throws: HsqlException - |
renameNewBackup | void renameNewBackup()(Code) | | |
renameNewScript | void renameNewScript()(Code) | | |
setLogSize | void setLogSize(int megas)(Code) | | |
setScriptType | void setScriptType(int type) throws HsqlException(Code) | | Changing the script format results in a checkpoint, with the .script
file written in the new format.
|
setWriteDelay | void setWriteDelay(int delay)(Code) | | |
shutdown | void shutdown() throws HsqlException(Code) | | Fast counterpart to close(). Does not perform a checkpoint or a backup
of the .data file.
|
synchLog | void synchLog()(Code) | | |
|
|