Handles read/write operations on the table's text format data file using a compatible pair of org.hsqldb.rowio input/output class instances. fredt - This used to write rows as soon as they are inserted but now this is subject to transaction management. A memory buffer contains the rows not yet committed. Refactored for version 2.2.6.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv HsqlByteArrayOutputStream | |
| protected String | |
| protected Table | |
| pack-priv TextFileSettings | |
| private LongKeyHashMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | |
| public void | |
| public CachedObject | get(CachedObject object, PersistentStore store, boolean keep)
Overrides org. cannot use isInMemory() for text cached object |
| public CachedObject | |
| public String | |
| public long | |
| public TextFileReader | |
| public TextFileSettings | |
| protected void | |
| protected void | initParams(Database database, String settingsString, boolean defrag)
Overrides org. initial external parameters are set here. |
| public boolean | |
| public void | |
| pack-priv void | |
| public void | release()
Overrides org. Abandons changed rows and closes the .data file. |
| public void | remove(CachedObject object)
Overrides org. Used when a row is deleted as a result of some DML or DDL statement. |
| public void | |
| public void | saveRow(CachedObject row)
Overrides org. The row is always in uncommittedCache. |
| protected void | saveRows(CachedObject[] rows, int offset, int count)
Overrides org.
|
| protected void | |
| public void | |
| public void | |
| private void |
| buffer | back to summary |
|---|---|
| pack-priv HsqlByteArrayOutputStream buffer | |
| header | back to summary |
|---|---|
| protected String header | |
| table | back to summary |
|---|---|
| protected Table table | |
| textFileSettings | back to summary |
|---|---|
| pack-priv TextFileSettings textFileSettings | |
| uncommittedCache | back to summary |
|---|---|
| private LongKeyHashMap<CachedObject> uncommittedCache | |
| TextCache | back to summary |
|---|---|
| pack-priv TextCache(Table table, String name) The source string for a cached table is evaluated and the parameters are used to open the source file. Settings are used in this order: (1) settings specified in the source string for the table (2) global database settings in *.properties file (3) program defaults | |
| add | back to summary |
|---|---|
| public void add(CachedObject object, boolean keep) Overrides org. | |
| clearRowImage | back to summary |
|---|---|
| private void clearRowImage(CachedObject row) | |
| close | back to summary |
|---|---|
| public void close() Overrides org. Writes newly created rows to disk. In the current implementation, such rows have already been saved, so this method just removes a source file that has no rows. | |
| get | back to summary |
|---|---|
| public CachedObject get(CachedObject object, PersistentStore store, boolean keep) Overrides org. cannot use isInMemory() for text cached object | |
| get | back to summary |
|---|---|
| public CachedObject get(long i, PersistentStore store, boolean keep) Overrides org. | |
| getHeader | back to summary |
|---|---|
| public String getHeader() | |
| getLineNumber | back to summary |
|---|---|
| public long getLineNumber() | |
| getTextFileReader | back to summary |
|---|---|
| public TextFileReader getTextFileReader() | |
| getTextFileSettings | back to summary |
|---|---|
| public TextFileSettings getTextFileSettings() | |
| initBuffers | back to summary |
|---|---|
| protected void initBuffers() Overrides org. | |
| initParams | back to summary |
|---|---|
| protected void initParams(Database database, String settingsString, boolean defrag) Overrides org. Doc from org. initial external parameters are set here. | |
| isIgnoreFirstLine | back to summary |
|---|---|
| public boolean isIgnoreFirstLine() | |
| open | back to summary |
|---|---|
| public void open(boolean readonly) Overrides org. Opens a data source file. | |
| purge | back to summary |
|---|---|
| pack-priv void purge() Closes the source file and deletes it if it is not read-only. | |
| release | back to summary |
|---|---|
| public void release() Overrides org. Doc from org. Abandons changed rows and closes the .data file. | |
| remove | back to summary |
|---|---|
| public void remove(CachedObject object) Overrides org. Doc from org. Used when a row is deleted as a result of some DML or DDL statement. Removes the row from the cache data structures. | |
| removePersistence | back to summary |
|---|---|
| public void removePersistence(CachedObject row) Overrides org. | |
| saveRow | back to summary |
|---|---|
| public void saveRow(CachedObject row) Overrides org. The row is always in uncommittedCache. Saves the row as normal and removes it | |
| saveRows | back to summary |
|---|---|
| protected void saveRows(CachedObject[] rows, int offset, int count) Overrides org. | |
| setFileModified | back to summary |
|---|---|
| protected void setFileModified() | |
| setHeader | back to summary |
|---|---|
| public void setHeader(String header) | |
| setHeaderInitialise | back to summary |
|---|---|
| public void setHeaderInitialise(String header) | |
| writeHeader | back to summary |
|---|---|
| private void writeHeader(String header) | |