casacore
|
Give access to some IncrementalStMan functions. More...
#include <IncrStManAccessor.h>
Public Member Functions | |
ROIncrementalStManAccessor (const Table &table, const String &name, Bool byColumn=False) | |
Construct the object for a data manager in the table given the name of the data manager or the column. More... | |
virtual | ~ROIncrementalStManAccessor () |
ROIncrementalStManAccessor (const ROIncrementalStManAccessor &that) | |
Copy constructor (reference semantics). More... | |
ROIncrementalStManAccessor & | operator= (const ROIncrementalStManAccessor &that) |
Assignment (reference semantics). More... | |
void | setCacheSize (uInt aSize, Bool canExceedNrBuckets=True) |
Set the cache size (in buckets) to be used by the storage manager. More... | |
uInt | cacheSize () const |
Get the cache size (in buckets). More... | |
void | clearCache () |
Clear the caches used by the hypercubes in this storage manager. More... | |
void | showIndexStatistics (ostream &os) const |
Show the index used by this storage manager. More... | |
void | showBucketLayout (ostream &os) const |
Show the layout of the buckets used by this storage manager. More... | |
Bool | checkBucketLayout (uInt &offendingCursor, rownr_t &offendingBucketStartRow, uInt &offendingBucketNrow, uInt &offendingBucketNr, uInt &offendingCol, uInt &offendingIndex, rownr_t &offendingRow, rownr_t &offendingPrevRow) const |
Check that there are no repeated rowIds in the buckets comprising this ISM. More... | |
Public Member Functions inherited from casacore::RODataManAccessor | |
RODataManAccessor () | |
Construct an empty object. More... | |
RODataManAccessor (const Table &table, const String &name, Bool byColumn) | |
Construct the accessor object for a data manager in the table. More... | |
virtual | ~RODataManAccessor () |
void | setProperties (const Record &) const |
Set data manager properties using the fields in the record. More... | |
Record | getProperties () const |
Get data manager properties as a record. More... | |
String | dataManagerType () const |
Get the data manager type. More... | |
String | dataManagerName () const |
Get the data manager name. More... | |
uInt | dataManagerSeqNr () const |
Get the data manager sequence nr. More... | |
void | showCacheStatistics (ostream &os) const |
Show IO statistics. More... | |
Private Attributes | |
ISMBase * | dataManPtr_p |
Additional Inherited Members | |
Protected Member Functions inherited from casacore::RODataManAccessor | |
DataManager * | baseDataManager () const |
Get the data manager for the given data manager or column name. More... | |
Give access to some IncrementalStMan functions.
Public interface
The Table system has one or more storage managers underneath. One of these possible storage managers is the IncrementalStMan. This storage manager uses a cache of buckets. The default cache size is defined when the IncrementalStMan object was constructed at the time the table was created.
Sometimes it can be useful to change the cache size. E.g. when the table is accessed in a random way, the hit rate may drop when the cache is too small. The class ROIncrStManAccessor makes it possible to change the cache size in a temporary way.
Furthermore this class makes it possible to show the cache size and to show the cache statistics.
In principle a pointer to IncrementalStMan could be used. However, that would give access to all public functions. Furthermore it could not distinguish between read/write and readonly tables.
This example shows how to set the cache size for the incremental storage manager with the name "ISMExample". The cache size is not persistent, i.e. when the same table is reopened at a later time, this cache size is not remembered.
Definition at line 100 of file IncrStManAccessor.h.
casacore::ROIncrementalStManAccessor::ROIncrementalStManAccessor | ( | const Table & | table, |
const String & | name, | ||
Bool | byColumn = False |
||
) |
Construct the object for a data manager in the table given the name of the data manager or the column.
An exception is thrown if the data manager type is not the incremental storage manager.
|
virtual |
casacore::ROIncrementalStManAccessor::ROIncrementalStManAccessor | ( | const ROIncrementalStManAccessor & | that | ) |
Copy constructor (reference semantics).
uInt casacore::ROIncrementalStManAccessor::cacheSize | ( | ) | const |
Get the cache size (in buckets).
Bool casacore::ROIncrementalStManAccessor::checkBucketLayout | ( | uInt & | offendingCursor, |
rownr_t & | offendingBucketStartRow, | ||
uInt & | offendingBucketNrow, | ||
uInt & | offendingBucketNr, | ||
uInt & | offendingCol, | ||
uInt & | offendingIndex, | ||
rownr_t & | offendingRow, | ||
rownr_t & | offendingPrevRow | ||
) | const |
Check that there are no repeated rowIds in the buckets comprising this ISM.
void casacore::ROIncrementalStManAccessor::clearCache | ( | ) |
Clear the caches used by the hypercubes in this storage manager.
It will flush the caches as needed and remove all buckets from them resulting in a possibly large drop in memory used.
ROIncrementalStManAccessor& casacore::ROIncrementalStManAccessor::operator= | ( | const ROIncrementalStManAccessor & | that | ) |
Assignment (reference semantics).
void casacore::ROIncrementalStManAccessor::setCacheSize | ( | uInt | aSize, |
Bool | canExceedNrBuckets = True |
||
) |
Set the cache size (in buckets) to be used by the storage manager.
The cache size given in this way is not persistent. Only the cache size given to the constructors of the incremental storage managers, is persistent. If canExceedNrBuckets=True
, the given cache size can be larger than the nr of buckets in the file. In this way the cache can be made large enough for a future file extnsion. Otherwise, it is limited to the actual number of buckets. This is useful if one wants the entire file to be cached.
void casacore::ROIncrementalStManAccessor::showBucketLayout | ( | ostream & | os | ) | const |
Show the layout of the buckets used by this storage manager.
void casacore::ROIncrementalStManAccessor::showIndexStatistics | ( | ostream & | os | ) | const |
Show the index used by this storage manager.
|
private |
Definition at line 158 of file IncrStManAccessor.h.