|
||||||||||
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 Transaction
implementation 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 Index to this database, associated with the given table. |
void |
addIndex(Index index,
Table table,
boolean doPopulate)
Add the given Index to this database, associating it with the given table
and (optionally) populating it. |
void |
addTable(Table table)
Add the given Table to this database. |
void |
apply()
Apply this committed transaction.. |
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(Object key)
|
void |
createDatabaseLink(DatabaseLink server)
|
void |
createSequence(Sequence seq)
Create a numeric sequence |
void |
dropDatabaseLink(String server)
|
void |
dropDependentExternalDBTable(List tables)
|
void |
dropDependentViews(List views)
|
void |
dropIndex(String name)
Drop the given Index from this database. |
void |
dropSequence(String name)
Drop the specified Sequence from this database. |
void |
dropTable(String name)
Drop the specified Table from this database. |
Object |
get(Object key)
|
DatabaseLink |
getDatabaseLink(String name)
|
List |
getDatabaseModificationListeners()
Returns all listeners set to receive events on this database |
DataType |
getDataType(String name)
Get the DataType currently registered for the given name, or null. |
File |
getDBDirectory()
Get the directory into which table information is stored, or null. |
List |
getDependentExternalDBTable(String name)
|
List |
getDependentViews(String tableName)
|
ConcreteFunction |
getFunction(String name)
|
Object |
getGlobalVariable(String key)
|
IndexFactory |
getIndexFactory(String name)
Get the IndexFactory currently registered for the given name, or
null. |
Set |
getModifiedTables()
Return a Set of Table s that have been modified thus far in this
transaction. |
String |
getName()
Returns the name of this Database . |
Database |
getOpenOnTransaction()
Get the Database upon which I am open (i.e., the state to which we will
return to if I am rolled back. |
Set |
getReadTables()
Return a Set of Table s that have been read thus far in this
transaction. |
Sequence |
getSequence(String name)
Get the specified Sequence , or null if no such sequence can be
found. |
int |
getState()
Return my current transaction state. |
Table |
getTable(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(String name)
Get the TableFactory currently registered for the given name, or
null. |
TransactionManager |
getTransactionManager()
Get the TransactionManager for this database. |
boolean |
hasDatabaseLink(String name)
|
boolean |
hasIndex(String name)
Returns true iff the given Index exists. |
boolean |
hasSequence(String name)
|
boolean |
hasTable(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(Object key,
Object value)
|
void |
remount(File newdir)
Notify this database that its root directory has been moved to the given location. |
void |
remove(Object key)
|
void |
renameTable(String oldName,
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
Database
Index
to this database, associated with the given table.
addIndex
in interface Database
AxionException
public void addIndex(Index index, Table table, boolean doPopulate) throws AxionException
Database
Index
to this database, associating it with the given table
and (optionally) populating it.
addIndex
in interface Database
index
- 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
Database
Table
to this database.
addTable
in interface Database
AxionException
public void apply() throws AxionException
Transactable
committed
transaction..
apply
in interface Transactable
AxionException
public void checkpoint() throws AxionException
Database
checkpoint
in interface Database
AxionException
public void columnAdded(ColumnEvent event) throws AxionException
columnAdded
in interface TableModificationListener
AxionException
public void commit() throws AxionException
Transactable
commit
in interface Transactable
AxionException
public TransactableTable commit(TableIdentifier tid) throws AxionException
AxionException
public void constraintAdded(ConstraintEvent event) throws AxionException
constraintAdded
in interface TableModificationListener
AxionException
public void constraintRemoved(ConstraintEvent event) throws AxionException
constraintRemoved
in interface TableModificationListener
AxionException
public boolean containsKey(Object key)
containsKey
in interface VariableContext
public void createDatabaseLink(DatabaseLink server) throws AxionException
createDatabaseLink
in interface Database
AxionException
public void createSequence(Sequence seq) throws AxionException
Database
createSequence
in interface Database
AxionException
public void dropDatabaseLink(String server) throws AxionException
dropDatabaseLink
in interface Database
AxionException
public void dropDependentExternalDBTable(List tables) throws AxionException
dropDependentExternalDBTable
in interface Database
AxionException
public void dropDependentViews(List views) throws AxionException
dropDependentViews
in interface Database
AxionException
public void dropIndex(String name) throws AxionException
Database
Index
from this database.
dropIndex
in interface Database
AxionException
public void dropSequence(String name) throws AxionException
Database
Sequence
from this database.
Sequence name matching is case-insensitive.
dropSequence
in interface Database
AxionException
public void dropTable(String name) throws AxionException
Database
Table
from this database.
Table name matching is case-insensitive.
dropTable
in interface Database
AxionException
public Object get(Object key)
get
in interface VariableContext
public DatabaseLink getDatabaseLink(String name)
getDatabaseLink
in interface Database
public List getDatabaseModificationListeners()
Database
getDatabaseModificationListeners
in interface Database
public DataType getDataType(String name)
Database
DataType
currently registered for the given name, or null.
getDataType
in interface Database
public File getDBDirectory()
Database
getDBDirectory
in interface Database
public List getDependentExternalDBTable(String name)
getDependentExternalDBTable
in interface Database
public List getDependentViews(String tableName)
getDependentViews
in interface Database
public ConcreteFunction getFunction(String name)
getFunction
in interface Database
public Object getGlobalVariable(String key)
getGlobalVariable
in interface Database
public IndexFactory getIndexFactory(String name)
Database
IndexFactory
currently registered for the given name, or
null.
getIndexFactory
in interface Database
public Set getModifiedTables()
Transaction
Set
of Table
s that have been modified thus far in this
transaction.
getModifiedTables
in interface Transaction
public String getName()
Database
Database
.
getName
in interface Database
public Database getOpenOnTransaction()
Transaction
Database
upon 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 Transaction
public Set getReadTables()
Transaction
Set
of Table
s that have been read thus far in this
transaction.
getReadTables
in interface Transaction
public Sequence getSequence(String name)
Database
Sequence
, or null if no such sequence can be
found.
Sequence name matching is case-insensitive.
getSequence
in interface Database
public int getState()
Transaction
Transaction.STATE_OPEN
,
Transaction.STATE_COMMITTED
,Transaction.STATE_ABORTED
,Transaction.STATE_APPLIED
.
getState
in interface Transaction
public Table getTable(String name) throws AxionException
Database
Table
, or null if no such table can be found.
Table name matching is case-insensitive.
getTable
in interface Database
AxionException
public Table getTable(TableIdentifier table) throws AxionException
Database
Table
, or null if no such table can be found.
Table name matching is case-insensitive.
getTable
in interface Database
AxionException
public TableFactory getTableFactory(String name)
Database
TableFactory
currently registered for the given name, or
null.
getTableFactory
in interface Database
public TransactionManager getTransactionManager()
Database
TransactionManager
for this database.
getTransactionManager
in interface Database
public boolean hasDatabaseLink(String name) throws AxionException
hasDatabaseLink
in interface Database
AxionException
public boolean hasIndex(String name) throws AxionException
Database
true
iff the given Index
exists.
hasIndex
in interface Database
AxionException
public boolean hasSequence(String name) throws AxionException
hasSequence
in interface Database
AxionException
public boolean hasTable(String name) throws AxionException
hasTable
in interface Database
AxionException
public boolean hasTable(TableIdentifier table) throws AxionException
hasTable
in interface Database
AxionException
public boolean isReadOnly()
Database
isReadOnly
in interface Database
public void migrate(int version) throws AxionException
Database
migrate
in interface Database
AxionException
public void put(Object key, Object value)
put
in interface VariableContext
public void remount(File newdir) throws AxionException
Database
remount
in interface Database
AxionException
public void remove(Object key)
remove
in interface VariableContext
public void renameTable(String oldName, String newName) throws AxionException
renameTable
in interface Database
AxionException
public void rollback() throws AxionException
Transactable
rollback
in interface Transactable
AxionException
public void rowDeleted(RowEvent event) throws AxionException
rowDeleted
in interface TableModificationListener
AxionException
public void rowInserted(RowEvent event) throws AxionException
rowInserted
in interface TableModificationListener
AxionException
public void rowUpdated(RowEvent event) throws AxionException
rowUpdated
in interface TableModificationListener
AxionException
public void shutdown() throws AxionException
Database
shutdown
in interface Database
AxionException
public void tableAltered(Table table) throws AxionException
Database
tableAltered
in interface Database
AxionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |