DDL BLOCK: definition of DB objects, users and rights at startup time
DATA BLOCK: all data for MEMORY tables at startup time
LOG BLOCK: SQL statements logged since startup or the last CHECKPOINT
The implementation of this class and its subclasses support the formats
used for writing the data. Since 1.7.2 the data can also be
written as binary in order to speed up shutdown and startup.
From 1.7.2, two separate files are used, one for the DDL + DATA BLOCK and the other for the LOG BLOCK.
A related use for this class is for saving a current snapshot of the database data to a user-defined file. This happens in the SHUTDOWN COMPACT process or done as a result of the SCRIPT command. In this case, the DATA block contains the CACHED table data as well.
DatabaseScriptReader and its subclasses read back the data at startup time.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| pack-priv Session | currentSession
the last schema for last sessionId |
| pack-priv Database | |
| pack-priv OutputStream | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | isUserScript
this determines if the script is the normal script (false) used internally by the engine or a user-initiated snapshot of the DB (true) |
| pack-priv long | |
| public static final String[] | |
| pack-priv volatile boolean | |
| pack-priv FileAccess. | |
| pack-priv String | |
| pack-priv HsqlNameManager. | |
| private int | |
| pack-priv int | |
| private Object | |
| protected volatile int |
| Access | Constructor and Description |
|---|---|
| pack-priv | ScriptWriterBase(Database db, OutputStream outputStream, FileAccess.
|
| pack-priv | ScriptWriterBase(Database db, String file, boolean includeCachedData, boolean isNewFile, boolean isUserScript)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | |
| public void | |
| public int | |
| protected abstract void | |
| protected void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public long | |
| public void | |
| public void | |
| public void | |
| public void | |
| public abstract void | |
| protected abstract void | |
| public void | |
| public abstract void | |
| public void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| public abstract void | |
| protected abstract void | |
| protected void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| byteCount | back to summary |
|---|---|
| pack-priv long byteCount | |
| currentSession | back to summary |
|---|---|
| pack-priv Session currentSession the last schema for last sessionId | |
| database | back to summary |
|---|---|
| pack-priv Database database | |
| fileStreamOut | back to summary |
|---|---|
| pack-priv OutputStream fileStreamOut | |
| includeCachedData | back to summary |
|---|---|
| pack-priv boolean includeCachedData | |
| includeIndexRoots | back to summary |
|---|---|
| pack-priv boolean includeIndexRoots | |
| includeTableInit | back to summary |
|---|---|
| pack-priv boolean includeTableInit | |
| INSERT | back to summary |
|---|---|
| pack-priv static final int INSERT | |
| INSERT_WITH_SCHEMA | back to summary |
|---|---|
| pack-priv static final int INSERT_WITH_SCHEMA | |
| isClosed | back to summary |
|---|---|
| pack-priv boolean isClosed | |
| isCompressed | back to summary |
|---|---|
| pack-priv boolean isCompressed | |
| isCrypt | back to summary |
|---|---|
| pack-priv boolean isCrypt | |
| isUserScript | back to summary |
|---|---|
| pack-priv boolean isUserScript this determines if the script is the normal script (false) used internally by the engine or a user-initiated snapshot of the DB (true) | |
| lineCount | back to summary |
|---|---|
| pack-priv long lineCount | |
| LIST_SCRIPT_FORMATS | back to summary |
|---|---|
| public static final String[] LIST_SCRIPT_FORMATS | |
| needsSync | back to summary |
|---|---|
| pack-priv volatile boolean needsSync | |
| outDescriptor | back to summary |
|---|---|
| pack-priv FileAccess. | |
| outFile | back to summary |
|---|---|
| pack-priv String outFile | |
| schemaToLog | back to summary |
|---|---|
| pack-priv HsqlNameManager. | |
| syncCount | back to summary |
|---|---|
| private int syncCount | |
| tableRowCount | back to summary |
|---|---|
| pack-priv int tableRowCount | |
| timerTask | back to summary |
|---|---|
| private Object timerTask | |
| writeDelay | back to summary |
|---|---|
| protected volatile int writeDelay | |
| ScriptWriterBase | back to summary |
|---|---|
| pack-priv ScriptWriterBase(Database db, OutputStream outputStream, FileAccess. | |
| ScriptWriterBase | back to summary |
|---|---|
| pack-priv ScriptWriterBase(Database db, String file, boolean includeCachedData, boolean isNewFile, boolean isUserScript) | |
| close | back to summary |
|---|---|
| public void close() | |
| finishStream | back to summary |
|---|---|
| protected void finishStream() | |
| forceSync | back to summary |
|---|---|
| public void forceSync() | |
| getWriteDelay | back to summary |
|---|---|
| public int getWriteDelay() | |
| initBuffers | back to summary |
|---|---|
| protected abstract void initBuffers() | |
| openFile | back to summary |
|---|---|
| protected void openFile() File is opened in append mode although in current usage the file never pre-exists | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| setIncludeCachedData | back to summary |
|---|---|
| public void setIncludeCachedData(boolean include) | |
| setIncludeIndexRoots | back to summary |
|---|---|
| public void setIncludeIndexRoots(boolean include) | |
| setIncludeTableInit | back to summary |
|---|---|
| public void setIncludeTableInit(boolean include) | |
| setWriteDelay | back to summary |
|---|---|
| public void setWriteDelay(int delay) | |
| size | back to summary |
|---|---|
| public long size() | |
| start | back to summary |
|---|---|
| public void start() | |
| stop | back to summary |
|---|---|
| public void stop() | |
| sync | back to summary |
|---|---|
| public void sync() Called internally or externally in write delay intervals. | |
| writeAll | back to summary |
|---|---|
| public void writeAll() | |
| writeCommitStatement | back to summary |
|---|---|
| public abstract void writeCommitStatement(Session session) | |
| writeDataTerm | back to summary |
|---|---|
| protected abstract void writeDataTerm() | |
| writeDDL | back to summary |
|---|---|
| public void writeDDL() | |
| writeDeleteStatement | back to summary |
|---|---|
| public abstract void writeDeleteStatement(Session session, Table table, Object[] data) | |
| writeExistingData | back to summary |
|---|---|
| public void writeExistingData(boolean lobSchema) | |
| writeInsertStatement | back to summary |
|---|---|
| public abstract void writeInsertStatement(Session session, Row row, Table table) | |
| writeLogStatement | back to summary |
|---|---|
| public abstract void writeLogStatement(Session session, String s) | |
| writeOtherStatement | back to summary |
|---|---|
| public abstract void writeOtherStatement(Session session, String s) | |
| writeRow | back to summary |
|---|---|
| public abstract void writeRow(Session session, Row row, Table table) | |
| writeSequenceStatement | back to summary |
|---|---|
| public abstract void writeSequenceStatement(Session session, NumberSequence seq) | |
| writeSessionIdAndSchema | back to summary |
|---|---|
| protected abstract void writeSessionIdAndSchema(Session session) | |
| writeSingleColumnResult | back to summary |
|---|---|
| protected void writeSingleColumnResult(Result r) | |
| writeTableData | back to summary |
|---|---|
| public void writeTableData(Table t) | |
| writeTableInit | back to summary |
|---|---|
| public void writeTableInit(Table t) | |
| writeTableTerm | back to summary |
|---|---|
| public void writeTableTerm(Table t) | |
| writeTableVersionData | back to summary |
|---|---|
| public void writeTableVersionData(Table t, TimestampData from) | |
| writeVersioningData | back to summary |
|---|---|
| public void writeVersioningData(TimestampData from) | |