28 #ifndef TABLES_ISMBASE_H
29 #define TABLES_ISMBASE_H
234 rownr_t& offendingBucketStartRow,
235 uInt& offendingBucketNrow,
236 uInt& offendingBucketNr,
309 const String& dataTypeID);
313 const String& dataTypeID);
317 const String& dataTypeID);
virtual rownr_t resync64(rownr_t nrrow)
Resync the storage manager with the new file contents.
File object for BucketCache.
Bool dataChanged_p
Has the data changed since the last flush?
virtual void deleteManager()
The data manager will be deleted (because all its columns are requested to be deleted).
virtual void removeColumn(DataManagerColumn *)
Remove a column from the data file and the colSet_p.
void showBucketLayout(ostream &os)
Show the layout of the buckets.
virtual Bool hasMultiFileSupport() const
The data manager supports use of MultiFile.
uInt persCacheSize_p
The persistent cache size.
Cache for buckets in a part of a file.
void makeIndex()
Construct the index object (if not constructed yet) and read it.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Make the object from the type name string.
uInt cacheSize() const
Get the current cache size (in buckets).
void makeCache()
Construct the cache object (if not constructed yet).
void addBucket(rownr_t rownr, ISMBucket *bucket)
Add a bucket to the storage manager (i.e.
AipsIO is the object persistency mechanism of Casacore.
The Index of the Incremental Storage Manager.
uInt version_p
The version of the class.
Abstract base class for a column in a data manager.
virtual Bool canRemoveRow() const
Can the storage manager delete rows? (yes)
ISMIndex * index_p
The ISM bucket index.
uInt bucketSize_p
The bucket size.
virtual Bool canAddColumn() const
Can the storage manager add columns? (not yet)
virtual void addRow64(rownr_t nrrow)
Add rows to the storage manager.
uInt rownrSize_p
The size of a rownr in external format (local or canonical).
uInt nFreeBucket_p
The nr of free buckets.
void readIndex()
Read the index (at the end of the file).
rownr_t nrow() const
Get the number of rows in this storage manager.
void recreate()
(Re)create the index, file, and cache object.
Bool checkBucketLayout(uInt &offendingCursor, rownr_t &offendingBucketStartRow, uInt &offendingBucketNrow, uInt &offendingBucketNr, uInt &offendingCol, uInt &ffendingIndex, rownr_t &offendingRow, rownr_t &offendingPrevRow)
Check that there are no repeated rowIds in the buckets comprising this ISM.
void writeIndex()
Write the index (at the end of the file).
Bool checkBucketSize_p
Check a positive bucketsize?
uInt version() const
Get the version of the class.
virtual String dataManagerType() const
Get the type name of the data manager (i.e.
void init()
Let the storage manager initialize itself.
virtual String dataManagerName() const
Get the name given to the storage manager (in the constructor).
virtual void reopenRW()
Reopen the storage manager files for read/write.
Base class of the Incremental Storage Manager.
uInt nbucketInit_p
The initial number of buckets in the cache.
StManArrayFile * openArrayFile(ByteIO::OpenOption opt)
Open (if needed) the file for indirect arrays with the given mode.
ISMIndex & getIndex()
Get the index object.
virtual void create64(rownr_t nrrow)
Let the storage manager create files as needed for a new table.
ISMBase & operator=(const ISMBase &that)
Assignment cannot be used.
virtual void showCacheStatistics(ostream &os) const
Show the statistics of all caches used.
void setBucketDirty()
Make the current bucket in the cache dirty (i.e.
void showIndexStatistics(ostream &os)
Show the index statistics.
uInt rownrSize() const
Get the size of a rownr in external format (can be canonical or local).
uInt uIntSize_p
The size of a uInt in external format (local or canonical).
virtual DataManagerColumn * makeDirArrColumn(const String &name, int dataType, const String &dataTypeID)
Create a direct array column.
char * tempBuffer() const
Get access to the temporary buffer.
String dataManName_p
Name of data manager.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
virtual Bool canAddRow() const
Can the storage manager add rows? (yes)
virtual DataManagerColumn * makeIndArrColumn(const String &name, int dataType, const String &dataTypeID)
Create an indirect array column.
char * tempBuffer_p
A temporary read/write buffer (also for other classes).
ISMColumn & getColumn(uInt colnr)
Get access to the given column.
rownr_t nrrow_p
The number of rows in the columns.
A drop-in replacement for Block<T*>.
virtual rownr_t open64(rownr_t nrrow, AipsIO &)
Open the storage manager file for an existing table, read in the data, and let the ISMColumn objects ...
A Column in the Incremental Storage Manager.
virtual void setProperties(const Record &spec)
Modify data manager properties.
virtual DataManagerColumn * makeScalarColumn(const String &name, int dataType, const String &dataTypeID)
Create a column in the storage manager on behalf of a table column.
void setCacheSize(uInt cacheSize, Bool canExceedNrBuckets)
Set the cache size (in buckets).
virtual void removeRow64(rownr_t rownr)
Delete a row from all columns.
A bucket in the Incremental Storage Manager.
uInt64 rownr_t
Define the type of a row number in a table.
OpenOption
Define the possible ByteIO open options.
uInt uniqnr_p
Unique nr for column in this storage manager.
PtrBlock< ISMColumn * > colSet_p
The assembly of all columns.
Abstract base class for a data manager.
BucketCache & getCache()
Get the cache object.
uInt cacheSize_p
The actual cache size.
virtual DataManager * clone() const
Clone this object.
ISMBucket * getBucket(rownr_t rownr, rownr_t &bucketStartRow, rownr_t &bucketNrrow)
Get the bucket containing the given row.
StManArrayFile * iosfile_p
The file containing the indirect arrays.
String: the storage and methods of handling collections of characters.
BucketFile * file_p
The file containing all data.
uInt uniqueNr()
Get a unique column number for the column (it is only unique for this storage manager).
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
virtual Bool canRemoveColumn() const
Can the storage manager delete columns? (not yet)
uInt uIntSize() const
Get the size of a uInt in external format (can be canonical or local).
ISMBucket * nextBucket(uInt &cursor, rownr_t &bucketStartRow, rownr_t &bucketNrrow)
Get the next bucket.
virtual Record getProperties() const
Get data manager properties that can be modified.
ISMBase(uInt bucketSize=0, Bool checkBucketSize=True, uInt cacheSize=1)
Create an incremental storage manager without a name.
virtual void addColumn(DataManagerColumn *)
Do the final addition of a column.
uInt bucketSize() const
Get the bucket size (in bytes).
BucketCache * cache_p
The cache with the ISM buckets.
Int firstFree_p
The first free bucket.
Read/write array in external format for a storage manager.
void clearCache()
Clear the cache used by this storage manager.
virtual Bool flush(AipsIO &, Bool fsync)
Flush and optionally fsync the data.