📄 transactioncontroller.java
字号:
int lock_level, int isolation_level) throws StandardException; /** * Purge all committed deleted rows from the conglomerate. * <p> * This call will purge committed deleted rows from the conglomerate, * that space will be available for future inserts into the conglomerate. * <p> * * @param conglomId Id of the conglomerate to purge. * * @exception StandardException Standard exception policy. **/ void purgeConglomerate(long conglomId) throws StandardException; /** * Return free space from the conglomerate back to the OS. * <p> * Returns free space from the conglomerate back to the OS. Currently * only the sequential free pages at the "end" of the conglomerate can * be returned to the OS. * <p> * * @param conglomId Id of the conglomerate to purge. * * @exception StandardException Standard exception policy. **/ void compressConglomerate(long conglomId) throws StandardException; /** * Retrieve the maximum value row in an ordered conglomerate. * <p> * Returns true and fetches the rightmost non-null row of an ordered * conglomerate into "fetchRow" if there is at least one non-null row in * the conglomerate. If there are no non-null rows in the conglomerate it * returns false. Any row with * a first column with a Null is considered a "null" row. * <p> * Non-ordered conglomerates will not implement this interface, calls * will generate a StandardException. * <p> * RESOLVE - this interface is temporary, long term equivalent (and more) * functionality will be provided by the openBackwardScan() interface. * <p> * ISOLATION_SERIALIZABLE and MODE_RECORD locking for btree max: * The "BTREE" implementation will at the very least get a shared row lock * on the max key row and the key previous to the max. * This will be the case where the max row exists in the rightmost page of * the btree. These locks won't be released. If the row does not exist in * the last page of the btree then a scan of the entire btree will be * performed, locks acquired in this scan will not be released. * <p> * Note that under ISOLATION_READ_COMMITTED, all locks on the table * are released before returning from this call. * * @param conglomId The identifier of the conglomerate * to open the scan for. * * @param open_mode Specifiy flags to control opening of table. * OPENMODE_FORUPDATE - if set open the table for * update otherwise open table shared. * @param lock_level One of (MODE_TABLE, MODE_RECORD). * * @param isolation_level The isolation level to lock the conglomerate at. * One of (ISOLATION_READ_COMMITTED, * ISOLATION_REPEATABLE_READ or * ISOLATION_SERIALIZABLE). * * @param scanColumnList A description of which columns to return from * every fetch in the scan. template, and * scanColumnList work together * to describe the row to be returned by the scan - * see RowUtil for description of how these three * parameters work together to describe a "row". * * @param fetchRow The row to retrieve the maximum value into. * * @return boolean indicating if a row was found and retrieved or not. * * @exception StandardException Standard exception policy. **/ boolean fetchMaxOnBtree( long conglomId, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] fetchRow) throws StandardException; /** * Return an open StoreCostController for the given conglomid. * <p> * Return an open StoreCostController which can be used to ask about * the estimated row counts and costs of ScanController and * ConglomerateController operations, on the given conglomerate. * <p> * * @return The open StoreCostController. * * @param conglomId The identifier of the conglomerate to open. * * @exception StandardException Standard exception policy. * * @see StoreCostController **/ StoreCostController openStoreCost( long conglomId) throws StandardException; /** * Report on the number of open conglomerates in the transaction. * <p> * There are 4 types of open "conglomerates" that can be tracked, those * opened by each of the following: openConglomerate(), openScan(), * createSort(), and openSort(). Scans opened by openSortScan() are * tracked the same as those opened by openScan(). This routine can be * used to either report on the number of all opens, or may be used to * track one particular type of open. * <p> * This routine is expected to be used for debugging only. An * implementation may only track this info under SanityManager.DEBUG mode. * If the implementation does not track the info it will return -1 (so * code using this call to verify that no congloms are open should check * for return <= 0 rather than == 0). * <p> * The return value depends on the "which_to_count" parameter as follows: * <UL> * <LI> * OPEN_CONGLOMERATE - return # of openConglomerate() calls not close()'d. * <LI> * OPEN_SCAN - return # of openScan() + openSortScan() calls not * close()'d. * <LI> * OPEN_CREATED_SORTS - return # of sorts created (createSort()) in * current xact. There is currently no way to get * rid of these sorts before end of transaction. * <LI> * OPEN_SORT - return # of openSort() calls not close()'d. * <LI> * OPEN_TOTAL - return total # of all above calls not close()'d. * </UL> * - note an implementation may return -1 if it does not track the * above information. * <p> * @return The nunber of open's of a type indicated by "which_to_count" * parameter. * * @param which_to_count Which kind of open to report on. * * @exception StandardException Standard exception policy. **/ public int countOpens(int which_to_count) throws StandardException; /** * Return a string with debug information about opened congloms/scans/sorts. * <p> * Return a string with debugging information about current opened * congloms/scans/sorts which have not been close()'d. * Calls to this routine are only valid under code which is conditional * on SanityManager.DEBUG. * <p> * * @return String with debugging information. * * @exception StandardException Standard exception policy. **/ public String debugOpened() throws StandardException; /** Get an object to handle non-transactional files. */ public FileResource getFileHandler(); /** Return an object that when used as the compatability space *and* group for a lock request, guarantees that the lock will be removed on a commit or an abort. */ public Object getLockObject(); /** * Return static information about the conglomerate to be included in a * a compiled plan. * <p> * The static info would be valid until any ddl was executed on the * conglomid, and would be up to the caller to throw away when that * happened. This ties in with what language already does for other * invalidation of static info. The type of info in this would be * containerid and array of format id's from which templates can be created. * The info in this object is read only and can be shared among as many * threads as necessary. * <p> * * @return The static compiled information. * * @param conglomId The identifier of the conglomerate to open. * * @exception StandardException Standard exception policy. **/ public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo( long conglomId) throws StandardException; /** * Return dynamic information about the conglomerate to be dynamically * reused in repeated execution of a statement. * <p> * The dynamic info is a set of variables to be used in a given * ScanController or ConglomerateController. It can only be used in one * controller at a time. It is up to the caller to insure the correct * thread access to this info. The type of info in this is a scratch * template for btree traversal, other scratch variables for qualifier * evaluation, ... * <p> * * @return The dynamic information. * * @param conglomId The identifier of the conglomerate to open. * * @exception StandardException Standard exception policy. **/ public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo( long conglomId) throws StandardException; /************************************************************************** * Interfaces previously defined in TcCacheStatIface: ************************************************************************** */ /** Get cache statistics for the specified cache */ public long[] getCacheStats(String cacheName); /** Reset the cache statistics for the specified cache */ public void resetCacheStats(String cacheName); /************************************************************************** * Interfaces previously defined in TcLogIface: ************************************************************************** */ /** Log an operation and then action it in the context of this transaction. <P>This simply passes the operation to the RawStore which logs and does it. @param operation the operation that is to be applied @see org.apache.derby.iapi.store.raw.Loggable @see org.apache.derby.iapi.store.raw.Transaction#logAndDo @exception StandardException Standard cloudscape exception policy **/ public void logAndDo(Loggable operation) throws StandardException; /************************************************************************** * Interfaces previously defined in TcSortIface: ************************************************************************** */ /** Create a sort. Rows are inserted into the sort with a sort controller, and subsequently retrieved with a sort scan controller. The rows come out in the order specified by the parameters. <p> Sorts also do aggregation. The input (unaggregated) rows have the same format as the aggregated rows, and the aggregate results are part of the both rows. The sorter, when it notices that a row is a duplicate of another, calls a user-supplied aggregation method (see interface Aggregator), passing it both rows. One row is known as the 'addend' and the other the 'accumulator'. The aggregation method is assumed to merge the addend into the accumulator. The sort then discards the addend row. <p> So, for the query: <pre><blockquote> select a, sum(b) from t group by a </blockquote></pre> The input row to the sorter would have one column for a and another column for sum(b). It is up to the caller to get the format of the row correct, and to initialize the aggregate values correc
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -