rawstorefactory.java

来自「derby database source code.good for you.」· Java 代码 · 共 856 行 · 第 1/2 页

JAVA
856
字号
    byte[]         local_id)        throws StandardException;	/**		Find a user transaction in the context manager, which must be the		current context manager.  If a user transaction does not already exist,		then create one @see #startTransaction		@param contextMgr the context manager to use.  An exception will be                           thrown if context is not the current context.        @param transName  If a new transaction is started, it will be given                           this name.        The name is displayed in the transactiontable VTI.		@exception StandardException Standard Cloudscape error policy		@see #startTransaction	*/	public Transaction findUserTransaction(        ContextManager contextMgr,        String transName) throws StandardException;	/**		Create an internal transaction.		<P>		Starting an internal transaction always performs the following steps.		<OL>		<LI>Create an raw store internal transaction context		<LI>Create a new idle internal transaction and then link it to the             context.		</UL>		<P>		AN internal transaction is identical to a user transaction with the         exception that		<UL>		<LI> Logical operations are not supported		<LI> Savepoints are not supported		<LI> Containers are not closed when commit() is called.		<LI> Pages are not unlatched (since containers are not closed) when              commit() is called.		<LI> During recovery time internal transactions are rolled back before              user transactions.		</UL>		Only one internal transaction can be active in a context at any one time.		After a commit the transaction may be re-used.		<P>		<B>Raw Store Internal Transaction Context Behaviour</B>		<BR>		The cleanupOnError() method of this context behaves as follows:		<UL>		<LI>		If error is an instance of StandardException that		has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then		the internal transaction is aborted, the internal transaction is closed,        the context is popped off the stack, and an exception of severity         Transaction exception is re-thrown.		<LI>		If error is an instance of StandardException that has a severity         greater than or equal to ExceptionSeverity.TRANSACTION_SEVERITY then        the context's internal transaction is aborted, the internal         transaction is closed and the context is popped off the stack.		<LI>		If error is not an instance of StandardException then the context's		internal transaction is aborted, the internal transaction is closed         and the context is popped off the stack.		</UL>		@exception StandardException Standard Cloudscape error policy		@see Transaction		@see org.apache.derby.iapi.services.context.Context		@see StandardException	*/	public Transaction startInternalTransaction(ContextManager contextMgr) throws StandardException;	/**		Create a nested user transaction, almost all work within the raw store         is performed in the context of a transaction.		<P>        A nested user transaction is exactly the same as a user transaction,        except that one can specify a compatibility space to associate with        the transaction.		Starting a transaction always performs the following steps.		<OL>		<LI>Create an raw store transaction context		<LI>Create a new idle transaction and then link it to the context.		</UL>		Only one user transaction and one nested user transaction can be active        in a context at any one time.		After a commit the transaction may be re-used.		<P>		<B>Raw Store Transaction Context Behaviour</B>		<BR>		The cleanupOnError() method of this context behaves as follows:		<UL>		<LI>		If error is an instance of StandardException that		has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then        no action is taken.		<LI>		If error is an instance of StandardException that		has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then        the context's transaction is aborted, and the transaction returned to        the idle state.  If a user transaction exists on the context stack        then that transaction is aborted also.		<LI>		If error is an instance of StandardException that		has a severity greater than  ExceptionSeverity.TRANSACTION_SEVERITY        then the context's transaction is aborted, the transaction closed, and        the context is popped off the stack.		<LI>		If error is not an instance of StandardException then the context's		transaction is aborted, the transaction closed, and the		context is popped off the stack.		</UL>		@param compatibilitySpace compatibility space to use for locks.		@param contextMgr is the context manager to use.  An exception will be		thrown if context is not the current context.        @param transName is the name of the transaction. This name will be         displayed by the transactiontable VTI.		@exception StandardException Standard Cloudscape error policy		@see Transaction		@see org.apache.derby.iapi.services.context.Context		@see StandardException	*/	public Transaction startNestedReadOnlyUserTransaction(    Object         compatibilitySpace,    ContextManager contextMgr,    String         transName)        throws StandardException;	/**		Create a nested user transaction, almost all work within the raw store         is performed in the context of a transaction.		<P>        A nested user transaction is exactly the same as a user transaction,        except that one can specify a compatibility space to associate with        the transaction.		Starting a transaction always performs the following steps.		<OL>		<LI>Create an raw store transaction context		<LI>Create a new idle transaction and then link it to the context.		</UL>		Only one user transaction and one nested user transaction can be active        in a context at any one time.		After a commit the transaction may be re-used.		<P>		<B>Raw Store Transaction Context Behaviour</B>		<BR>		The cleanupOnError() method of this context behaves as follows:		<UL>		<LI>		If error is an instance of StandardException that		has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then        no action is taken.		<LI>		If error is an instance of StandardException that		has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then        the context's transaction is aborted, and the transaction returned to        the idle state.  If a user transaction exists on the context stack        then that transaction is aborted also.		<LI>		If error is an instance of StandardException that		has a severity greater than  ExceptionSeverity.TRANSACTION_SEVERITY        then the context's transaction is aborted, the transaction closed, and        the context is popped off the stack.		<LI>		If error is not an instance of StandardException then the context's		transaction is aborted, the transaction closed, and the		context is popped off the stack.		</UL>		@param contextMgr is the context manager to use.  An exception will be		thrown if context is not the current context.        @param transName is the name of the transaction. This name will be         displayed by the transactiontable VTI.		@exception StandardException Standard Cloudscape error policy		@see Transaction		@see org.apache.derby.iapi.services.context.Context		@see StandardException	*/	public Transaction startNestedUpdateUserTransaction(    ContextManager contextMgr,    String         transName)        throws StandardException;	/**	  @see org.apache.derby.iapi.store.access.AccessFactory#getTransactionInfo	 */	public TransactionInfo[] getTransactionInfo();	/**	  * Freeze the database temporarily so a backup can be taken.	  * <P>Please see cloudscape on line documentation on backup and restore.	  *	  * @exception StandardException Thrown on error	  */	public void freeze() throws StandardException;	/**	  * Unfreeze the database after a backup has been taken.	  * <P>Please see cloudscape on line documentation on backup and restore.	  *	  * @exception StandardException Thrown on error	  */	public void unfreeze() throws StandardException;	/**	  * Backup the database to backupDir.  	  * <P>Please see cloudscape on line documentation on backup and restore.	  *	  * @param backupDir the name of the directory where the backup should be	  *		stored.	  *	  * @exception StandardException Thrown on error	  */	public void backup(String backupDir) throws StandardException;	/**	  * Backup the database to backupDir.  	  * <P>Please see cloudscape on line documentation on backup and restore.	  *	  * @param backupDir the directory where the backup should be stored.	  *	  * @exception StandardException Thrown on error	  */	public void backup(File backupDir) throws StandardException;			/**	 * 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.	 * @param backupDir the directory name where the database backup should	 *   go.  This directory will be created if not it does not exist.	 * @param deleteOnlineArchivedLogFiles  If true deletes online archived log files	 * that exist before this backup, delete will occur only after backup is complete.	 * @exception StandardException Thrown on error	 */	public void backupAndEnableLogArchiveMode(String backupDir, 											  boolean											  deleteOnlineArchivedLogFiles) 		throws StandardException;			/**	 * 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.	 * @param backupDir the directory name where the database backup should	 *   go.  This directory will be created if not it does not exist.	 * @param deleteOnlineArchivedLogFiles  If true deletes online archived log files	 * that exist before this backup, delete will occur only after backup is complete.	 * @exception StandardException Thrown on error	 */	public void backupAndEnableLogArchiveMode(File backupDir, 											  boolean											  deleteOnlineArchivedLogFiles) 		throws StandardException;		/**	 * disables the log archival process, i.e No old log files	 * will be kept around for a roll-forward recovery.	 * @param 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.	 * @exception StandardException Thrown on error	 */	public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)		throws StandardException;	/**		Try to checkpoint the database to minimize recovery time.		The raw store does not guarentee that a checkpoint will indeed have		happened by the time this routine returns.		@exception StandardException Standard Cloudscape error policy	*/	public void checkpoint() throws StandardException;	/**		Idle the raw store as much as possible. 		@exception StandardException Standard Cloudscape error policy	*/	public void idle() throws StandardException;	/**	    Get a flushed scan.		@param start The instant for the beginning of the scan.		@param groupsIWant log record groups the caller wants to scan.		@exception StandardException StandardCloudscape error policy		*/	ScanHandle openFlushedScan(DatabaseInstant start, int groupsIWant) 		 throws StandardException;		/**		If this raw store has a daemon that services its need, return the		daemon.  If not, return null	*/	public DaemonService getDaemon();	/*	 * return the transaction factory module 	 */	public String getTransactionFactoryModule();	/*	 * return the data factory module 	 */	public String getDataFactoryModule();	/*	 * return the Log factory module 	 */	public String getLogFactoryModule();	/*	 * Return the module providing XAresource interface to the transaction      * table.      *	 * @exception StandardException Standard cloudscape exception policy.	 */	public /* XAResourceManager */ Object getXAResourceManager()        throws StandardException;	/*	 * the database creation phase is finished	 * @exception StandardException Standard cloudscape exception policy.	 */	public void createFinished() throws StandardException;	/**	 * Get JBMS properties relavent to raw store	 *	 * @exception StandardException Standard cloudscape exception policy.	 */	public void getRawStoreProperties(PersistentSet tc) 		 throws StandardException; 	/**	 *  Backup / restore support	 */	/**	 * Freeze the database from altering any persistent storage.	 *	 * @exception StandardException Standard cloudscape exception policy.	 */	public void freezePersistentStore() throws StandardException;	/**	 * Unfreeze the database, persistent storage can now be altered.	 *	 * @exception StandardException Standard cloudscape exception policy.	 */	public void unfreezePersistentStore() throws StandardException;	/**		Encrypt cleartext into ciphertext.		@see org.apache.derby.iapi.services.crypto.CipherProvider#encrypt		@exception StandardException Standard Cloudscape Error Policy	 */	public int encrypt(byte[] cleartext, int offset, int length, 					   byte[] ciphertext, int outputOffset) 		 throws StandardException ;	/**		Decrypt cleartext from ciphertext.		@see org.apache.derby.iapi.services.crypto.CipherProvider#decrypt		@exception StandardException Standard Cloudscape Error Policy	 */	public int decrypt(byte[] ciphertext, int offset, int length, 					   byte[] cleartext, int outputOffset) 		 throws StandardException ;	/**	 	Returns the encryption block size used during creation of the encrypted database	 */	public int getEncryptionBlockSize();	/**		Returns a secure random number for this raw store - if database is not		encrypted, returns 0.	 */	public int random();	/**		Change the boot password.  Return the encrypted form of the secret key.		The new value must be a String of the form: oldBootPassword, newBootPassword		@exception StandardException Standard Cloudscape Error Policy	 */	public Serializable changeBootPassword(Properties properties, Serializable changePassword)		 throws StandardException ;    /**     * Return an id which can be used to create a container.     * <p>     * Return an id number with is greater than any existing container     * in the current database.  Caller will use this to allocate future     * container numbers - most likely caching the value and then incrementing     * it as it is used.     * <p>     *	 * @return The an id which can be used to create a container.     *	 * @exception  StandardException  Standard exception policy.     **/    long getMaxContainerId()		throws StandardException;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?