Report on the number of open conglomerates in the transaction.
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.
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).
The return value depends on the "which_to_count" parameter as follows:
- OPEN_CONGLOMERATE - return # of openConglomerate() calls not close()'d.
- OPEN_SCAN - return # of openScan() + openSortScan() calls not close()'d.
- 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.
- OPEN_SORT - return # of openSort() calls not close()'d.
- OPEN_TOTAL - return total # of all above calls not close()'d.
- note an implementation may return -1 if it does not track the above information.
@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.