public class TableDataConglomerate
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static TableName |
CHECK_INFO_TABLE |
|
static TableName |
FOREIGN_COLS_TABLE |
|
static TableName |
FOREIGN_INFO_TABLE |
|
static TableName |
PERSISTENT_VAR_TABLE |
|
static TableName |
PRIMARY_COLS_TABLE |
|
static TableName |
PRIMARY_INFO_TABLE |
|
static TableName |
SCHEMA_INFO_TABLE |
The schema info table.
|
static java.lang.String |
STATE_POST |
The postfix on the name of the state file for the database store name.
|
static TableName |
SYS_SEQUENCE |
|
static TableName |
SYS_SEQUENCE_INFO |
|
static java.lang.String |
SYSTEM_SCHEMA |
The name of the system schema where persistant conglomerate state is
stored.
|
static TableName |
UNIQUE_COLS_TABLE |
|
static TableName |
UNIQUE_INFO_TABLE |
Constructor | Description |
---|---|
TableDataConglomerate(TransactionSystem system,
com.mckoi.database.StoreSystem store_system) |
Constructs the conglomerate.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addTransactionModificationListener(TableName table_name,
TransactionModificationListener listener) |
Adds a listener for transactional modification events that occur on the
given table in this conglomerate.
|
void |
checkVisibleTables(UserTerminal terminal) |
Checks the list of committed tables in this conglomerate.
|
void |
close() |
Closes this conglomerate.
|
void |
create(java.lang.String name) |
Creates a new conglomerate at the given path in the file system.
|
Transaction |
createTransaction() |
Starts a new transaction.
|
DebugLogger |
Debug() |
Returns the DebugLogger object that we use to log debug messages to.
|
void |
delete() |
Deletes and closes the conglomerate.
|
boolean |
exists(java.lang.String name) |
Returns true if the conglomerate exists in the file system and can
be opened.
|
void |
finalize() |
|
void |
fix(java.lang.String name,
UserTerminal terminal) |
Checks the conglomerate state file.
|
java.lang.String[] |
getAllTableFileNames() |
Returns the list of file names for all tables in this conglomerate.
|
RawDiagnosticTable |
getDiagnosticTable(java.lang.String table_file_name) |
Returns a RawDiagnosticTable object that is used for diagnostics of the
table with the given file name.
|
TransactionSystem |
getSystem() |
Returns the TransactionSystem that this conglomerate is part of.
|
boolean |
isClosed() |
Returns true if the conglomerate is closed.
|
void |
liveCopyTo(TableDataConglomerate dest_conglomerate) |
Makes a complete copy of this database to the position represented by the
given TableDataConglomerate object.
|
void |
open(java.lang.String name) |
Opens a conglomerate.
|
void |
removeTransactionModificationListener(TableName table_name,
TransactionModificationListener listener) |
Removes a listener for transaction modification events on the given table
in this conglomerate as previously set by the
'addTransactionModificationListener' method.
|
com.mckoi.database.StoreSystem |
storeSystem() |
Returns the StoreSystem used by this conglomerate to manage the
persistent state of the database.
|
public static final java.lang.String STATE_POST
public static final java.lang.String SYSTEM_SCHEMA
public static final TableName SCHEMA_INFO_TABLE
public static final TableName PERSISTENT_VAR_TABLE
public static final TableName FOREIGN_COLS_TABLE
public static final TableName UNIQUE_COLS_TABLE
public static final TableName PRIMARY_COLS_TABLE
public static final TableName CHECK_INFO_TABLE
public static final TableName UNIQUE_INFO_TABLE
public static final TableName FOREIGN_INFO_TABLE
public static final TableName PRIMARY_INFO_TABLE
public static final TableName SYS_SEQUENCE_INFO
public static final TableName SYS_SEQUENCE
public TableDataConglomerate(TransactionSystem system, com.mckoi.database.StoreSystem store_system)
public final TransactionSystem getSystem()
public final com.mckoi.database.StoreSystem storeSystem()
public final DebugLogger Debug()
public void checkVisibleTables(UserTerminal terminal) throws java.io.IOException
java.io.IOException
public void create(java.lang.String name) throws java.io.IOException
java.io.IOException
public void open(java.lang.String name) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void delete() throws java.io.IOException
WARNING: Will result in total loss of all data stored in the conglomerate.
java.io.IOException
public boolean isClosed()
public boolean exists(java.lang.String name) throws java.io.IOException
java.io.IOException
public void liveCopyTo(TableDataConglomerate dest_conglomerate) throws java.io.IOException
The conglomerate must be open before this method is called.
java.io.IOException
public RawDiagnosticTable getDiagnosticTable(java.lang.String table_file_name)
public java.lang.String[] getAllTableFileNames()
public void addTransactionModificationListener(TableName table_name, TransactionModificationListener listener)
The BEFORE_* type triggers are given the opportunity to modify the contents of the RowData before the update or insert occurs. All triggers may generate an exception which will cause the transaction to rollback.
The event carries with it the event type, the transaction that the event occurred in, and any information regarding the modification itself.
This event/listener mechanism is intended to be used to implement higher layer database triggering systems. Note that care must be taken with the commit level events because they occur inside a commit lock on this conglomerate and so synchronization and deadlock issues need to be carefully considered.
NOTE: A listener on the given table will be notified of ALL table modification events by all transactions at the time they happen.
table_name
- the name of the table in the conglomerate to listen for
events from.listener
- the listener to be notified of events.public void removeTransactionModificationListener(TableName table_name, TransactionModificationListener listener)
table_name
- the name of the table in the conglomerate to remove from
the listener list.listener
- the listener to be removed.public Transaction createTransaction()
public void fix(java.lang.String name, UserTerminal terminal)
public void finalize()
finalize
in class java.lang.Object
Copyright © 2018. All rights reserved.