|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Module interface for an access manager. An access manager provides transactional access via access methods to data in a single storage manager.
An AccessFactory is typically obtained from the Monitor:
// Get the current transaction controller. AccessFactory af; af = (AccessFactory) Monitor.findServiceModule(this, AccessFactory.MODULE);
Field Summary | |
static java.lang.String |
MODULE
Used to identify this interface when finding it with the Monitor. |
Method Summary | |
void |
backup(java.io.File backupDir)
Backup the database to backupDir. |
void |
backup(java.lang.String backupDir)
Backup the database to backupDir. |
void |
backupAndEnableLogArchiveMode(java.io.File backupDir,
boolean deleteOnlineArchivedLogFiles)
Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup. |
void |
backupAndEnableLogArchiveMode(java.lang.String backupDir,
boolean deleteOnlineArchivedLogFiles)
Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup. |
void |
checkpoint()
Checkpoints the database, that is, flushes all dirty data to disk. |
void |
createFinished()
Database creation has finished. |
void |
disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery. |
MethodFactory |
findMethodFactoryByFormat(UUID format)
Find an access method that implements a format type. |
MethodFactory |
findMethodFactoryByImpl(java.lang.String impltype)
Find an access method that implements an implementation type. |
void |
freeze()
Freeze the database temporarily so a backup can be taken. |
TransactionController |
getAndNameTransaction(ContextManager cm,
java.lang.String transName)
Get a transaction. |
LockFactory |
getLockFactory()
Get the LockFactory to use with this store. |
TransactionController |
getTransaction(ContextManager cm)
Get a transaction controller with which to manipulate data within the access manager. |
TransactionInfo[] |
getTransactionInfo()
Return a snap shot of all transactions in the db. |
java.lang.Object |
getXAResourceManager()
Return the XAResourceManager associated with this AccessFactory. |
boolean |
isReadOnly()
Is the store read-only. |
void |
registerAccessMethod(MethodFactory factory)
Register an access method that this access manager can use. |
java.lang.Object |
startXATransaction(ContextManager cm,
int format_id,
byte[] global_id,
byte[] branch_id)
Start a global transaction. |
void |
unfreeze()
Unfreeze the database after a backup has been taken. |
void |
waitForPostCommitToFinishWork()
|
Field Detail |
public static final java.lang.String MODULE
Method Detail |
public void registerAccessMethod(MethodFactory factory)
public void createFinished() throws StandardException
StandardException
- Standard exception policy.public MethodFactory findMethodFactoryByImpl(java.lang.String impltype) throws StandardException
StandardException
- Standard exception policy.public MethodFactory findMethodFactoryByFormat(UUID format)
public LockFactory getLockFactory()
public java.lang.Object getXAResourceManager() throws StandardException
Returns an object which can be used to implement the "offline" 2 phase commit interaction between the accessfactory and outstanding transaction managers taking care of in-doubt transactions.
StandardException
- Standard exception policy.public boolean isReadOnly()
public TransactionController getTransaction(ContextManager cm) throws StandardException
cm
- The context manager for the current context.
StandardException
- Standard exception policy.TransactionController
public TransactionController getAndNameTransaction(ContextManager cm, java.lang.String transName) throws StandardException
cm
- The context manager for the current context.transName
- If a new transaction is started, it will be given
this name. The name is displayed in the
transactiontable VTI.
StandardException
- Standard exception policy.TransactionController
,
getTransaction(org.apache.derby.iapi.services.context.ContextManager)
public TransactionInfo[] getTransactionInfo()
Take a snap shot of all transactions currently in the database and make a record of their information.
public java.lang.Object startXATransaction(ContextManager cm, int format_id, byte[] global_id, byte[] branch_id) throws StandardException
Get a transaction controller with which to manipulate data within the access manager. Implicitly creates an access context.
Must only be called if no other transaction context exists in the current context manager. If another transaction exists in the context an exception will be thrown.
The (format_id, global_id, branch_id) triplet is meant to come exactly from a javax.transaction.xa.Xid. We don't use Xid so that the system can be delivered on a non-1.2 vm system and not require the javax classes in the path.
If the global transaction id given matches an existing in-doubt global transaction in the current system, then a StandardException will be thrown with a state of SQLState.STORE_XA_XAER_DUPID.
cm
- The context manager for the current context.format_id
- the format id part of the Xid - ie. Xid.getFormatId().global_id
- the global transaction identifier part of XID - ie.
Xid.getGlobalTransactionId().branch_id
- The branch qualifier of the Xid - ie.
Xid.getBranchQaulifier()
StandardException
- Standard exception policy.TransactionController
public void freeze() throws StandardException
Please see cloudscape on line documentation on backup and restore.
StandardException
- Thrown on errorpublic void unfreeze() throws StandardException
Please see cloudscape on line documentation on backup and restore.
StandardException
- Thrown on errorpublic void backup(java.lang.String backupDir) throws StandardException
Please see cloudscape on line documentation on backup and restore.
backupDir
- the name of the directory where the backup should be
stored.
StandardException
- Thrown on errorpublic void backup(java.io.File backupDir) throws StandardException
Please see cloudscape on line documentation on backup and restore.
backupDir
- the directory where the backup should be stored.
StandardException
- Thrown on errorpublic void backupAndEnableLogArchiveMode(java.lang.String backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException
backupDir
- the directory name where the database backup should
go. This directory will be created if not it does not exist.deleteOnlineArchivedLogFiles
- If true deletes online archived log files
that exist before this backup, delete will occur only after backup is complete.
StandardException
- Thrown on errorpublic void backupAndEnableLogArchiveMode(java.io.File backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException
backupDir
- the directory name where the database backup should
go. This directory will be created if not it does not exist.deleteOnlineArchivedLogFiles
- If true deletes online archived log files
that exist before this backup, delete will occur only after backup is complete.
StandardException
- Thrown on errorpublic void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) throws StandardException
deleteOnlineArchivedLogFiles
- If true deletes all online archived log files
that exist before this call immediately; Only restore that can be performed
after disabling log archive mode is version recovery.
StandardException
- Thrown on errorpublic void checkpoint() throws StandardException
StandardException
- Thrown on errorpublic void waitForPostCommitToFinishWork()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |