|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axiondb.engine.SnapshotIsolationTransaction
public class SnapshotIsolationTransaction
A Transactionimplementation that provides "snapshot isolation", which supports
TRANSACTION_SERIALIZABLE isolation without locking.
| Field Summary |
|---|
| Fields inherited from interface org.axiondb.Transaction |
|---|
STATE_ABORTED, STATE_APPLIED, STATE_COMMITTED, STATE_OPEN |
| Fields inherited from interface org.axiondb.Database |
|---|
COMMIT_SIZE |
| Constructor Summary | |
|---|---|
SnapshotIsolationTransaction(Database db)
|
|
| Method Summary | |
|---|---|
void |
addDatabaseModificationListener(DatabaseModificationListener l)
Adds a listener to receive events on this database |
void |
addIndex(Index index,
Table table)
Add the given Indexto this database, associated with the given table. |
void |
addIndex(Index index,
Table table,
boolean doPopulate)
Add the given Indexto this database, associating it with the given table
and (optionally) populating it. |
void |
addTable(Table table)
Add the given Tableto this database. |
void |
apply()
Apply this committedtransaction.. |
void |
checkpoint()
Make sure any modified state or data has been written to disk. |
void |
columnAdded(ColumnEvent event)
|
void |
commit()
This transaction has been committed. |
TransactableTable |
commit(TableIdentifier tid)
|
void |
constraintAdded(ConstraintEvent event)
|
void |
constraintRemoved(ConstraintEvent event)
|
boolean |
containsKey(java.lang.Object key)
|
void |
createDatabaseLink(DatabaseLink server)
|
void |
createSequence(Sequence seq)
Create a numeric sequence |
void |
dropDatabaseLink(java.lang.String server)
|
void |
dropDependentExternalDBTable(java.util.List tables)
|
void |
dropDependentViews(java.util.List views)
|
void |
dropIndex(java.lang.String name)
Drop the given Indexfrom this database. |
void |
dropSequence(java.lang.String name)
Drop the specified Sequencefrom this database. |
void |
dropTable(java.lang.String name)
Drop the specified Tablefrom this database. |
java.lang.Object |
get(java.lang.Object key)
|
DatabaseLink |
getDatabaseLink(java.lang.String name)
|
java.util.List |
getDatabaseModificationListeners()
Returns all listeners set to receive events on this database |
DataType |
getDataType(java.lang.String name)
Get the DataTypecurrently registered for the given name, or null. |
java.io.File |
getDBDirectory()
Get the directory into which table information is stored, or null. |
java.util.List |
getDependentExternalDBTable(java.lang.String name)
|
java.util.List |
getDependentViews(java.lang.String tableName)
|
ConcreteFunction |
getFunction(java.lang.String name)
|
java.lang.Object |
getGlobalVariable(java.lang.String key)
|
IndexFactory |
getIndexFactory(java.lang.String name)
Get the IndexFactorycurrently registered for the given name, or
null. |
java.util.Set |
getModifiedTables()
Return a Setof Tables that have been modified thus far in this
transaction. |
java.lang.String |
getName()
Returns the name of this Database. |
Database |
getOpenOnTransaction()
Get the Databaseupon which I am open (i.e., the state to which we will
return to if I am rolled back. |
java.util.Set |
getReadTables()
Return a Setof Tables that have been read thus far in this
transaction. |
Sequence |
getSequence(java.lang.String name)
Get the specified Sequence, or null if no such sequence can be
found. |
int |
getState()
Return my current transaction state. |
Table |
getTable(java.lang.String name)
Get the specified Table, or null if no such table can be found. |
Table |
getTable(TableIdentifier table)
Get the specified Table, or null if no such table can be found. |
TableFactory |
getTableFactory(java.lang.String name)
Get the TableFactorycurrently registered for the given name, or
null. |
TransactionManager |
getTransactionManager()
Get the TransactionManagerfor this database. |
boolean |
hasDatabaseLink(java.lang.String name)
|
boolean |
hasIndex(java.lang.String name)
Returns true iff the given Indexexists. |
boolean |
hasSequence(java.lang.String name)
|
boolean |
hasTable(java.lang.String name)
|
boolean |
hasTable(TableIdentifier table)
|
boolean |
isReadOnly()
Is this database read-only? |
void |
migrate(int version)
Migrate from older version to newer version for this database |
void |
put(java.lang.Object key,
java.lang.Object value)
|
void |
remount(java.io.File newdir)
Notify this database that its root directory has been moved to the given location. |
void |
remove(java.lang.Object key)
|
void |
renameTable(java.lang.String oldName,
java.lang.String newName)
|
void |
rollback()
This transaction has been aborted. |
void |
rowDeleted(RowEvent event)
|
void |
rowInserted(RowEvent event)
|
void |
rowUpdated(RowEvent event)
|
void |
shutdown()
Close this database and free any resources associated with it. |
void |
tableAltered(Table table)
Update metadata tables since this table has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SnapshotIsolationTransaction(Database db)
| Method Detail |
|---|
public void addDatabaseModificationListener(DatabaseModificationListener l)
Database
addDatabaseModificationListener in interface Database
public void addIndex(Index index,
Table table)
throws AxionException
DatabaseIndexto this database, associated with the given table.
addIndex in interface DatabaseAxionException
public void addIndex(Index index,
Table table,
boolean doPopulate)
throws AxionException
DatabaseIndexto this database, associating it with the given table
and (optionally) populating it.
addIndex in interface Databaseindex - Index to be added and (optionally) populatedtable - Table to be indexeddoPopulate - true if index should be populated by the
appropriate column in table; false if index
should be left as-is.
AxionException - if error occurs during addition and/or population of
index
public void addTable(Table table)
throws AxionException
DatabaseTableto this database.
addTable in interface DatabaseAxionException
public void apply()
throws AxionException
Transactablecommittedtransaction..
apply in interface TransactableAxionException
public void checkpoint()
throws AxionException
Database
checkpoint in interface DatabaseAxionException
public void columnAdded(ColumnEvent event)
throws AxionException
columnAdded in interface TableModificationListenerAxionException
public void commit()
throws AxionException
Transactable
commit in interface TransactableAxionException
public TransactableTable commit(TableIdentifier tid)
throws AxionException
AxionException
public void constraintAdded(ConstraintEvent event)
throws AxionException
constraintAdded in interface TableModificationListenerAxionException
public void constraintRemoved(ConstraintEvent event)
throws AxionException
constraintRemoved in interface TableModificationListenerAxionExceptionpublic boolean containsKey(java.lang.Object key)
containsKey in interface VariableContext
public void createDatabaseLink(DatabaseLink server)
throws AxionException
createDatabaseLink in interface DatabaseAxionException
public void createSequence(Sequence seq)
throws AxionException
Database
createSequence in interface DatabaseAxionException
public void dropDatabaseLink(java.lang.String server)
throws AxionException
dropDatabaseLink in interface DatabaseAxionException
public void dropDependentExternalDBTable(java.util.List tables)
throws AxionException
dropDependentExternalDBTable in interface DatabaseAxionException
public void dropDependentViews(java.util.List views)
throws AxionException
dropDependentViews in interface DatabaseAxionException
public void dropIndex(java.lang.String name)
throws AxionException
DatabaseIndexfrom this database.
dropIndex in interface DatabaseAxionException
public void dropSequence(java.lang.String name)
throws AxionException
DatabaseSequencefrom this database.
Sequence name matching is case-insensitive.
dropSequence in interface DatabaseAxionException
public void dropTable(java.lang.String name)
throws AxionException
DatabaseTablefrom this database.
Table name matching is case-insensitive.
dropTable in interface DatabaseAxionExceptionpublic java.lang.Object get(java.lang.Object key)
get in interface VariableContextpublic DatabaseLink getDatabaseLink(java.lang.String name)
getDatabaseLink in interface Databasepublic java.util.List getDatabaseModificationListeners()
Database
getDatabaseModificationListeners in interface Databasepublic DataType getDataType(java.lang.String name)
DatabaseDataTypecurrently registered for the given name, or null.
getDataType in interface Databasepublic java.io.File getDBDirectory()
Database
getDBDirectory in interface Databasepublic java.util.List getDependentExternalDBTable(java.lang.String name)
getDependentExternalDBTable in interface Databasepublic java.util.List getDependentViews(java.lang.String tableName)
getDependentViews in interface Databasepublic ConcreteFunction getFunction(java.lang.String name)
getFunction in interface Databasepublic java.lang.Object getGlobalVariable(java.lang.String key)
getGlobalVariable in interface Databasepublic IndexFactory getIndexFactory(java.lang.String name)
DatabaseIndexFactorycurrently registered for the given name, or
null.
getIndexFactory in interface Databasepublic java.util.Set getModifiedTables()
TransactionSetof Tables that have been modified thus far in this
transaction.
getModifiedTables in interface Transactionpublic java.lang.String getName()
DatabaseDatabase.
getName in interface Databasepublic Database getOpenOnTransaction()
TransactionDatabaseupon which I am open (i.e., the state to which we will
return to if I am rolled back. Note that this may be another
Transaction.
getOpenOnTransaction in interface Transactionpublic java.util.Set getReadTables()
TransactionSetof Tables that have been read thus far in this
transaction.
getReadTables in interface Transactionpublic Sequence getSequence(java.lang.String name)
DatabaseSequence, or null if no such sequence can be
found.
Sequence name matching is case-insensitive.
getSequence in interface Databasepublic int getState()
TransactionTransaction.STATE_OPEN,
Transaction.STATE_COMMITTED,Transaction.STATE_ABORTED,Transaction.STATE_APPLIED.
getState in interface Transaction
public Table getTable(java.lang.String name)
throws AxionException
DatabaseTable, or null if no such table can be found.
Table name matching is case-insensitive.
getTable in interface DatabaseAxionException
public Table getTable(TableIdentifier table)
throws AxionException
DatabaseTable, or null if no such table can be found.
Table name matching is case-insensitive.
getTable in interface DatabaseAxionExceptionpublic TableFactory getTableFactory(java.lang.String name)
DatabaseTableFactorycurrently registered for the given name, or
null.
getTableFactory in interface Databasepublic TransactionManager getTransactionManager()
DatabaseTransactionManagerfor this database.
getTransactionManager in interface Database
public boolean hasDatabaseLink(java.lang.String name)
throws AxionException
hasDatabaseLink in interface DatabaseAxionException
public boolean hasIndex(java.lang.String name)
throws AxionException
Databasetrue iff the given Indexexists.
hasIndex in interface DatabaseAxionException
public boolean hasSequence(java.lang.String name)
throws AxionException
hasSequence in interface DatabaseAxionException
public boolean hasTable(java.lang.String name)
throws AxionException
hasTable in interface DatabaseAxionException
public boolean hasTable(TableIdentifier table)
throws AxionException
hasTable in interface DatabaseAxionExceptionpublic boolean isReadOnly()
Database
isReadOnly in interface Database
public void migrate(int version)
throws AxionException
Database
migrate in interface DatabaseAxionException
public void put(java.lang.Object key,
java.lang.Object value)
put in interface VariableContext
public void remount(java.io.File newdir)
throws AxionException
Database
remount in interface DatabaseAxionExceptionpublic void remove(java.lang.Object key)
remove in interface VariableContext
public void renameTable(java.lang.String oldName,
java.lang.String newName)
throws AxionException
renameTable in interface DatabaseAxionException
public void rollback()
throws AxionException
Transactable
rollback in interface TransactableAxionException
public void rowDeleted(RowEvent event)
throws AxionException
rowDeleted in interface TableModificationListenerAxionException
public void rowInserted(RowEvent event)
throws AxionException
rowInserted in interface TableModificationListenerAxionException
public void rowUpdated(RowEvent event)
throws AxionException
rowUpdated in interface TableModificationListenerAxionException
public void shutdown()
throws AxionException
Database
shutdown in interface DatabaseAxionException
public void tableAltered(Table table)
throws AxionException
Database
tableAltered in interface DatabaseAxionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||