| org.apache.derby.iapi.store.access.AccessFactory
All known Subclasses: org.apache.derby.impl.store.access.RAMAccessManager,
AccessFactory | public interface AccessFactory (Code) | | 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 | |
final public static String | MODULE Used to identify this interface when finding it with the Monitor. |
Method Summary | |
public void | backup(String backupDir, boolean wait) Backup the database to backupDir. | public void | backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) 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.
Parameters: backupDir - the directory name where the database backup should go. | public void | checkpoint() Checkpoints the database, that is, flushes all dirty data to disk. | public void | createFinished() Database creation has finished. | public 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(String impltype) Find an access method that implements an implementation type. | public void | freeze() Freeze the database temporarily so a backup can be taken. | TransactionController | getAndNameTransaction(ContextManager cm, String transName) Get a transaction. | public 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. | public TransactionInfo[] | getTransactionInfo() Return a snap shot of all transactions in the db. | public Object | getXAResourceManager() Return the XAResourceManager associated with this AccessFactory. | public boolean | isReadOnly() Is the store read-only. | void | registerAccessMethod(MethodFactory factory) Register an access method that this access manager can use. | Object | startXATransaction(ContextManager cm, int format_id, byte[] global_id, byte[] branch_id) Start a global transaction.
Get a transaction controller with which to manipulate data within
the access manager. | public void | unfreeze() Unfreeze the database after a backup has been taken. | public void | waitForPostCommitToFinishWork() |
MODULE | final public static String MODULE(Code) | | Used to identify this interface when finding it with the Monitor.
|
backup | public void backup(String backupDir, boolean wait) throws StandardException(Code) | | Backup the database to backupDir.
Please see Derby on line documentation on backup and restore.
Parameters: backupDir - the name of the directory where the backup should bestored. Parameters: wait - if true, waits for all the backup blocking operations in progress to finish. exception: StandardException - Thrown on error |
backupAndEnableLogArchiveMode | public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) throws StandardException(Code) | | 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.
Parameters: backupDir - the directory name where the database backup should go. This directory will be created if not itdoes not exist. Parameters: deleteOnlineArchivedLogFiles - If true deletes online archived logfiles that exist before this backup,delete will occur only after backupis complete. Parameters: wait - if true, waits for all thebackup blocking operations in progress to finish. exception: StandardException - Thrown on error |
checkpoint | public void checkpoint() throws StandardException(Code) | | Checkpoints the database, that is, flushes all dirty data to disk.
Records a checkpoint in the transaction log, if there is a log.
exception: StandardException - Thrown on error |
disableLogArchiveMode | public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) throws StandardException(Code) | | disables the log archival process, i.e No old log files
will be kept around for a roll-forward recovery.
Parameters: deleteOnlineArchivedLogFiles - If true deletes all online archivedlog files that exist before this call immediately; Only restore thatcan be performed after disabling logarchive mode is version recovery. exception: StandardException - Thrown on error |
findMethodFactoryByFormat | MethodFactory findMethodFactoryByFormat(UUID format)(Code) | | Find an access method that implements a format type.
|
freeze | public void freeze() throws StandardException(Code) | | Freeze the database temporarily so a backup can be taken.
Please see Derby on line documentation on backup and restore.
exception: StandardException - Thrown on error |
getLockFactory | public LockFactory getLockFactory()(Code) | | Get the LockFactory to use with this store.
The lock factory to use with this store. |
getTransactionInfo | public TransactionInfo[] getTransactionInfo()(Code) | | Return a snap shot of all transactions in the db.
Take a snap shot of all transactions currently in the database and make
a record of their information.
an array of TransactionInfo, or null if there is no transaction in the database. |
getXAResourceManager | public Object getXAResourceManager() throws StandardException(Code) | | Return the XAResourceManager associated with this AccessFactory.
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.
The XAResourceManager associated with this accessfactory. exception: StandardException - Standard exception policy. |
isReadOnly | public boolean isReadOnly()(Code) | | Is the store read-only.
|
registerAccessMethod | void registerAccessMethod(MethodFactory factory)(Code) | | Register an access method that this access manager can use.
|
startXATransaction | Object startXATransaction(ContextManager cm, int format_id, byte[] global_id, byte[] branch_id) throws StandardException(Code) | | Start a global transaction.
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.
Parameters: cm - The context manager for the current context. Parameters: format_id - the format id part of the Xid - ie. Xid.getFormatId(). Parameters: global_id - the global transaction identifier part of XID - ie.Xid.getGlobalTransactionId(). Parameters: branch_id - The branch qualifier of the Xid - ie.Xid.getBranchQaulifier() exception: StandardException - Standard exception policy. See Also: TransactionController |
unfreeze | public void unfreeze() throws StandardException(Code) | | Unfreeze the database after a backup has been taken.
Please see Derby on line documentation on backup and restore.
exception: StandardException - Thrown on error |
waitForPostCommitToFinishWork | public void waitForPostCommitToFinishWork()(Code) | | |
|
|