casa
$Rev:20696$
|
Abstract base class for a data manager. More...
#include <DataManager.h>
Public Member Functions | |
DataManager () | |
Default constructor. | |
virtual | ~DataManager () |
virtual DataManager * | clone () const =0 |
Make a clone of the derived object. | |
virtual String | dataManagerName () const |
Return the name of the data manager. | |
virtual String | dataManagerType () const =0 |
Return the type name of the data manager (in fact its class name). | |
void | dataManagerInfo (Record &info) const |
Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info. | |
virtual Record | dataManagerSpec () const |
Return a record containing data manager specifications. | |
virtual Record | getProperties () const |
Get data manager properties that can be modified. | |
virtual void | setProperties (const Record &spec) |
Modify data manager properties given in record fields. | |
virtual Bool | isStorageManager () const |
Is the data manager a storage manager? The default is yes. | |
virtual Bool | canReallocateColumns () const |
Tell if the data manager wants to reallocate the data manager column objects. | |
virtual DataManagerColumn * | reallocateColumn (DataManagerColumn *column) |
Reallocate the column object if it is part of this data manager. | |
uInt | sequenceNr () const |
Get the (unique) sequence nr of this data manager. | |
uInt | ncolumn () const |
Get the nr of columns in this data manager (can be zero). | |
Bool | asBigEndian () const |
Have the data to be stored in big or little endian canonical format? | |
const TSMOption & | tsmOption () const |
Get the TSM option. | |
String | keywordName (const String &keyword) const |
Compose a keyword name from the given keyword appended with the sequence number (e.g. | |
String | fileName () const |
Compose a unique filename from the table name and sequence number. | |
ByteIO::OpenOption | fileOption () const |
Get the AipsIO option of the underlying file. | |
virtual Bool | isRegular () const |
Is this a regular storage manager? It is regular if it allows addition of rows and writing dara in them. | |
Table & | table () const |
Get the table this object is associated with. | |
virtual void | reopenRW () |
Reopen the data manager for read/write access. | |
virtual Bool | canAddRow () const |
Does the data manager allow to add rows? (default no) | |
virtual Bool | canRemoveRow () const |
Does the data manager allow to delete rows? (default no) | |
virtual Bool | canAddColumn () const |
Does the data manager allow to add columns? (default no) | |
virtual Bool | canRemoveColumn () const |
Does the data manager allow to delete columns? (default no) | |
virtual void | setMaximumCacheSize (uInt nbytes) |
Set the maximum cache size (in bytes) to be used by a storage manager. | |
virtual void | showCacheStatistics (std::ostream &) const |
Show the data manager's IO statistics. | |
DataManagerColumn * | createScalarColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create a column in the data manager on behalf of a table column. | |
DataManagerColumn * | createDirArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create a direct array column. | |
DataManagerColumn * | createIndArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create an indirect array column. | |
virtual void | deleteManager ()=0 |
The data manager will be deleted (because all its columns are requested to be deleted). | |
DataManager * | getClone () const |
Has the object already been cloned? | |
void | setClone (DataManager *clone) const |
Set the pointer to the clone. | |
Static Public Member Functions | |
static void | registerCtor (const String &type, DataManagerCtor func) |
Register a mapping of a data manager type to its static construction function. | |
static DataManagerCtor | getCtor (const String &dataManagerType) |
Get the "constructor" of a data manager (thread-safe). | |
static Bool | isRegistered (const String &dataManagerType) |
Test if a data manager is registered (thread-safe). | |
static void | registerMainCtor () |
Register the main data managers (if not done yet). | |
static DataManager * | unknownDataManager (const String &dataManagerType, const Record &spec) |
Serve as default function for theirRegisterMap, which catches all unknown data manager types. | |
Protected Member Functions | |
void | decrementNcolumn () |
Decrement number of columns (in case a column is deleted). | |
void | setEndian (Bool bigEndian) |
Tell the data manager if big or little endian format is needed. | |
void | setTsmOption (const TSMOption &tsmOption) |
Tell the data manager which TSM option to use. | |
void | throwDataTypeOther (const String &columnName, int dataType) const |
Throw an exception in case data type is TpOther, because the storage managers (and maybe other data managers) do not support such columns. | |
Private Member Functions | |
DataManager (const DataManager &) | |
The copy constructor cannot be used for this base class. | |
DataManager & | operator= (const DataManager &) |
Assignment cannot be used for this base class. | |
virtual DataManagerColumn * | makeScalarColumn (const String &columnName, int dataType, const String &dataTypeId)=0 |
Create a column in the data manager on behalf of a table column. | |
virtual DataManagerColumn * | makeDirArrColumn (const String &columnName, int dataType, const String &dataTypeId)=0 |
Create a direct array column. | |
virtual DataManagerColumn * | makeIndArrColumn (const String &columnName, int dataType, const String &dataTypeId)=0 |
Create an indirect array column. | |
void | checkDataType (const DataManagerColumn *colPtr, const String &columnName, int dataType, const String &dataTypeId) const |
Check if the data type of the created data manager column is correct. | |
virtual void | addRow (uInt nrrow) |
Add rows to all columns. | |
virtual void | removeRow (uInt rownr) |
Delete a row from all columns. | |
virtual void | addColumn (DataManagerColumn *) |
Add a column. | |
virtual void | removeColumn (DataManagerColumn *) |
Delete a column. | |
void | setSeqnr (uInt nr) |
Set the sequence number of this data manager. | |
void | linkToTable (Table &tab) |
Link the data manager to the Table object. | |
virtual Bool | flush (AipsIO &ios, Bool fsync)=0 |
Flush and optionally fsync the data. | |
virtual void | create (uInt nrrow)=0 |
Let the data manager initialize itself for a new table. | |
virtual void | open (uInt nrrow, AipsIO &ios)=0 |
Let the data manager initialize itself for an existing table. | |
virtual uInt | open1 (uInt nrrow, AipsIO &ios) |
Open as above. | |
virtual void | resync (uInt nrrow)=0 |
Resync the data by rereading cached data from the file. | |
virtual uInt | resync1 (uInt nrrow) |
Resync as above. | |
virtual void | prepare () |
Let the data manager initialize itself further. | |
Static Private Member Functions | |
static void | unlockedRegisterCtor (const String &type, DataManagerCtor func) |
Register a data manager constructor. | |
static void | doRegisterMainCtor (void *) |
Do the actual (thread-safe) registration of the main data managers. | |
Private Attributes | |
uInt | nrcol_p |
uInt | seqnr_p |
Bool | asBigEndian_p |
TSMOption | tsmOption_p |
Table * | table_p |
DataManager * | clone_p |
Static Private Attributes | |
static SimpleOrderedMap < String, DataManagerCtor > | theirRegisterMap |
Declare the mapping of the data manager type name to a static "makeObject" function. | |
static MutexedInit | theirMutexedInit |
Friends | |
class | SetupNewTable |
class | ColumnSet |
Abstract base class for a data manager.
Internal
DataManager is the abstract base class for all kind of table data managers. There are currently 2 classes of data managers:
DataManager contains some common data and defines several virtual functions, which usually have to be implemented in the derived classes. It also contains some helper functions for the derived classes (like fileName().
The actual handling of a column by the data manager is defined in the abstract base class DataManagerColumn . Each data manager must have an associated class (derived from DataManagerColumn) to handle the columns.
There is a protocol defined how a data manager is created and initialized. For a new table it is:
SetupNewTable newtab("name.data", Table::New); // set up new table StManAipsIO stman; // define storage manager newtab.bindColumn ("column1", stman); // bind column to st.man. newtab.bindColumn ("column2", stman); // bind column to st.man. Table tab(newtab); // actually create table
For an existing table the procedure is slightly different:
Table tab("name.data");
will create a table object for an existing table. This has the effect that the given table file will be read to reconstruct the Table object and the data managers. bitflagsengine
for data manager BitFlagsEngine<Int>
). It can be preceeded by lib or libcasa_ and followed by .so or .dylib. The shared library has to have a function with a name like register_bitflagsengine
that must register the data manager(s). The function must be declared as extern "C"
, otherwise its name gets mangled. An abstract base class is needed to support data managers and virtual column engines in the table system in a transparant way.
Definition at line 219 of file DataManager.h.
Default constructor.
virtual casa::DataManager::~DataManager | ( | ) | [virtual] |
casa::DataManager::DataManager | ( | const DataManager & | ) | [private] |
The copy constructor cannot be used for this base class.
The clone function should be used instead. The private declaration of this constructor makes it unusable.
virtual void casa::DataManager::addColumn | ( | DataManagerColumn * | ) | [private, virtual] |
Add a column.
The default implementation throws a "not possible" exception.
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ISMBase, and casa::MSMBase.
virtual void casa::DataManager::addRow | ( | uInt | nrrow | ) | [private, virtual] |
Add rows to all columns.
The default implementation throws a "not possible" exception.
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::TiledDataStMan, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::SSMBase, casa::ISMBase, casa::TiledShapeStMan, casa::TiledCellStMan, casa::TiledColumnStMan, casa::MSMBase, and casa::VirtualColumnEngine.
Bool casa::DataManager::asBigEndian | ( | ) | const [inline] |
Have the data to be stored in big or little endian canonical format?
Definition at line 288 of file DataManager.h.
References asBigEndian_p.
virtual Bool casa::DataManager::canAddColumn | ( | ) | const [virtual] |
Does the data manager allow to add columns? (default no)
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ISMBase, and casa::MSMBase.
virtual Bool casa::DataManager::canAddRow | ( | ) | const [virtual] |
Does the data manager allow to add rows? (default no)
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::TiledStMan, casa::SSMBase, casa::ISMBase, casa::VirtualColumnEngine, and casa::MSMBase.
virtual Bool casa::DataManager::canReallocateColumns | ( | ) | const [virtual] |
Tell if the data manager wants to reallocate the data manager column objects.
This is used by the tiling storage manager. By default it returns False.
Reimplemented in casa::TiledStMan, and casa::MSMBase.
virtual Bool casa::DataManager::canRemoveColumn | ( | ) | const [virtual] |
Does the data manager allow to delete columns? (default no)
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ISMBase, and casa::MSMBase.
virtual Bool casa::DataManager::canRemoveRow | ( | ) | const [virtual] |
Does the data manager allow to delete rows? (default no)
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ISMBase, casa::VirtualColumnEngine, and casa::MSMBase.
void casa::DataManager::checkDataType | ( | const DataManagerColumn * | colPtr, |
const String & | columnName, | ||
int | dataType, | ||
const String & | dataTypeId | ||
) | const [private] |
Check if the data type of the created data manager column is correct.
virtual DataManager* casa::DataManager::clone | ( | ) | const [pure virtual] |
Make a clone of the derived object.
Implemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::CompressComplexSD, casa::ForwardColumnEngine, casa::StManAipsIO, casa::TiledDataStMan, casa::ForwardColumnIndexedRowEngine, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::TiledShapeStMan, casa::CompressComplex, casa::CompressFloat, casa::TiledCellStMan, casa::TiledColumnStMan, casa::SSMBase, casa::MappedArrayEngine< VirtualType, StoredType >, casa::ISMBase, casa::VirtualTaQLColumn, casa::TiledFileHelper, and casa::MSMBase.
Referenced by setClone().
virtual void casa::DataManager::create | ( | uInt | nrrow | ) | [private, pure virtual] |
Let the data manager initialize itself for a new table.
Implemented in casa::ForwardColumnEngine, casa::RetypedArrayEngine< VirtualType, StoredType >, casa::CompressComplexSD, casa::StManAipsIO, casa::TiledDataStMan, casa::ForwardColumnIndexedRowEngine, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::SSMBase, casa::TiledShapeStMan, casa::BitFlagsEngine< StoredType >, casa::ISMBase, casa::TiledCellStMan, casa::ScaledComplexData< VirtualType, StoredType >, casa::TiledColumnStMan, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, casa::CompressFloat, casa::VirtualColumnEngine, casa::VirtualTaQLColumn, casa::MSMBase, and casa::TiledFileHelper.
DataManagerColumn* casa::DataManager::createDirArrColumn | ( | const String & | columnName, |
int | dataType, | ||
const String & | dataTypeId | ||
) |
Create a direct array column.
DataManagerColumn* casa::DataManager::createIndArrColumn | ( | const String & | columnName, |
int | dataType, | ||
const String & | dataTypeId | ||
) |
Create an indirect array column.
DataManagerColumn* casa::DataManager::createScalarColumn | ( | const String & | columnName, |
int | dataType, | ||
const String & | dataTypeId | ||
) |
Create a column in the data manager on behalf of a table column.
It calls makeXColumn and checks the data type.
Create a scalar column. The dataTypeId
argument is gives the id (i.e. name) of the data type of the column. It is only used for virtual columns of a non-standard data type to be able to check if the correctness of the column data type.
Storage managers only handle standard data types and can readily ignore this argument.
void casa::DataManager::dataManagerInfo | ( | Record & | info | ) | const |
Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info.
virtual String casa::DataManager::dataManagerName | ( | ) | const [virtual] |
Return the name of the data manager.
This is the name of this instantiation of the data manager, thus not its type name. By default it returns an empty string.
Reimplemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::ForwardColumnEngine, casa::StManAipsIO, casa::BitFlagsEngine< StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::SSMBase, casa::CompressComplex, casa::CompressFloat, casa::MappedArrayEngine< VirtualType, StoredType >, casa::TiledStMan, casa::ISMBase, and casa::MSMBase.
Referenced by casa::RODataManAccessor::dataManagerName().
virtual Record casa::DataManager::dataManagerSpec | ( | ) | const [virtual] |
Return a record containing data manager specifications.
The default implementation returns an empty record.
Reimplemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::ForwardColumnEngine, casa::ForwardColumnIndexedRowEngine, casa::BitFlagsEngine< StoredType >, casa::TiledShapeStMan, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::SSMBase, casa::CompressComplex, casa::CompressFloat, casa::MappedArrayEngine< VirtualType, StoredType >, casa::TiledStMan, casa::ISMBase, and casa::VirtualTaQLColumn.
virtual String casa::DataManager::dataManagerType | ( | ) | const [pure virtual] |
Return the type name of the data manager (in fact its class name).
It has to be a unique name, thus if the class is templated the template parameter has to be part of the name. This is used by the open/flush mechanism to be able to reconstruct the correct data manager.
Implemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::CompressComplexSD, casa::ForwardColumnEngine, casa::StManAipsIO, casa::TiledDataStMan, casa::ForwardColumnIndexedRowEngine, casa::VSCEngine< T >, casa::BitFlagsEngine< StoredType >, casa::TiledShapeStMan, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::TiledCellStMan, casa::TiledColumnStMan, casa::SSMBase, casa::CompressComplex, casa::CompressFloat, casa::MappedArrayEngine< VirtualType, StoredType >, casa::ISMBase, casa::VirtualTaQLColumn, casa::MSMBase, and casa::TiledFileHelper.
Referenced by casa::RODataManAccessor::dataManagerType().
void casa::DataManager::decrementNcolumn | ( | ) | [inline, protected] |
Decrement number of columns (in case a column is deleted).
Definition at line 371 of file DataManager.h.
References nrcol_p.
virtual void casa::DataManager::deleteManager | ( | ) | [pure virtual] |
The data manager will be deleted (because all its columns are requested to be deleted).
So clean up the things needed (e.g. delete files).
Implemented in casa::StManAipsIO, casa::SSMBase, casa::TiledStMan, casa::ISMBase, casa::VirtualColumnEngine, and casa::MSMBase.
static void casa::DataManager::doRegisterMainCtor | ( | void * | ) | [static, private] |
Do the actual (thread-safe) registration of the main data managers.
String casa::DataManager::fileName | ( | ) | const |
Compose a unique filename from the table name and sequence number.
Get the AipsIO option of the underlying file.
virtual Bool casa::DataManager::flush | ( | AipsIO & | ios, |
Bool | fsync | ||
) | [private, pure virtual] |
Flush and optionally fsync the data.
The AipsIO stream represents the main table file and can be used by virtual column engines to store SMALL amounts of data. It returns a True status if it had to flush (i.e. if data have changed).
Implemented in casa::StManAipsIO, casa::TiledDataStMan, casa::SSMBase, casa::TiledShapeStMan, casa::ISMBase, casa::TiledCellStMan, casa::TiledColumnStMan, casa::VirtualColumnEngine, casa::MSMBase, and casa::TiledFileHelper.
DataManager* casa::DataManager::getClone | ( | ) | const [inline] |
Has the object already been cloned?
Definition at line 502 of file DataManager.h.
References clone_p.
static DataManagerCtor casa::DataManager::getCtor | ( | const String & | dataManagerType | ) | [static] |
Get the "constructor" of a data manager (thread-safe).
virtual Record casa::DataManager::getProperties | ( | ) | const [virtual] |
Get data manager properties that can be modified.
It is a subset of the data manager specification. The default implementation returns an empty record.
Reimplemented in casa::BitFlagsEngine< StoredType >, casa::SSMBase, casa::TiledStMan, and casa::ISMBase.
static Bool casa::DataManager::isRegistered | ( | const String & | dataManagerType | ) | [static] |
Test if a data manager is registered (thread-safe).
virtual Bool casa::DataManager::isRegular | ( | ) | const [virtual] |
Is this a regular storage manager? It is regular if it allows addition of rows and writing dara in them.
The default implementation returns True.
virtual Bool casa::DataManager::isStorageManager | ( | ) | const [virtual] |
Is the data manager a storage manager? The default is yes.
Reimplemented in casa::VirtualColumnEngine.
String casa::DataManager::keywordName | ( | const String & | keyword | ) | const |
Compose a keyword name from the given keyword appended with the sequence number (e.g.
key_0). This makes the keyword name unique if multiple data managers are used with the same type.
void casa::DataManager::linkToTable | ( | Table & | tab | ) | [private] |
virtual DataManagerColumn* casa::DataManager::makeDirArrColumn | ( | const String & | columnName, |
int | dataType, | ||
const String & | dataTypeId | ||
) | [private, pure virtual] |
Create a direct array column.
Implemented in casa::StManAipsIO, casa::SSMBase, casa::TiledStMan, casa::ISMBase, casa::VirtualColumnEngine, and casa::MSMBase.
virtual DataManagerColumn* casa::DataManager::makeIndArrColumn | ( | const String & | columnName, |
int | dataType, | ||
const String & | dataTypeId | ||
) | [private, pure virtual] |
Create an indirect array column.
Implemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ForwardColumnIndexedRowEngine, casa::TiledStMan, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::ISMBase, casa::VirtualColumnEngine, casa::MSMBase, and casa::VirtualTaQLColumn.
virtual DataManagerColumn* casa::DataManager::makeScalarColumn | ( | const String & | columnName, |
int | dataType, | ||
const String & | dataTypeId | ||
) | [private, pure virtual] |
Create a column in the data manager on behalf of a table column.
Create a scalar column.
Implemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ForwardColumnIndexedRowEngine, casa::VSCEngine< T >, casa::TiledStMan, casa::ISMBase, casa::VirtualColumnEngine, casa::MSMBase, and casa::VirtualTaQLColumn.
uInt casa::DataManager::ncolumn | ( | ) | const [inline] |
Get the nr of columns in this data manager (can be zero).
Definition at line 284 of file DataManager.h.
References nrcol_p.
virtual void casa::DataManager::open | ( | uInt | nrrow, |
AipsIO & | ios | ||
) | [private, pure virtual] |
Let the data manager initialize itself for an existing table.
The AipsIO stream represents the main table file and must be used by virtual column engines to retrieve the data stored in the flush function.
Implemented in casa::StManAipsIO, casa::SSMBase, casa::TiledStMan, casa::ISMBase, casa::VirtualColumnEngine, and casa::MSMBase.
virtual uInt casa::DataManager::open1 | ( | uInt | nrrow, |
AipsIO & | ios | ||
) | [private, virtual] |
Open as above.
The data manager can return the number of rows it thinks there are. This is particularly useful for data managers like LofarStMan whose data are written outside the table system, thus for which no rows have been added.
By default it calls open and returns nrrow
.
DataManager& casa::DataManager::operator= | ( | const DataManager & | ) | [private] |
Assignment cannot be used for this base class.
The private declaration of this operator makes it unusable.
virtual void casa::DataManager::prepare | ( | ) | [private, virtual] |
Let the data manager initialize itself further.
Prepare is called after create/open has been called for all columns. In this way one can be sure that referenced columns are read back and partly initialized. The default implementation does nothing.
Reimplemented in casa::ForwardColumnEngine, casa::RetypedArrayEngine< VirtualType, StoredType >, casa::ForwardColumnIndexedRowEngine, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, casa::CompressFloat, casa::VirtualColumnEngine, casa::VirtualTaQLColumn, and casa::MSMBase.
virtual DataManagerColumn* casa::DataManager::reallocateColumn | ( | DataManagerColumn * | column | ) | [virtual] |
Reallocate the column object if it is part of this data manager.
It returns a pointer to the new column object. This function is used by the tiling storage manager. By default it does nothing and returns the input pointer.
Reimplemented in casa::TiledStMan, and casa::MSMBase.
static void casa::DataManager::registerCtor | ( | const String & | type, |
DataManagerCtor | func | ||
) | [static] |
Register a mapping of a data manager type to its static construction function.
It is fully thread-safe.
static void casa::DataManager::registerMainCtor | ( | ) | [inline, static] |
Register the main data managers (if not done yet).
It is fully thread-safe.
Definition at line 521 of file DataManager.h.
References casa::MutexedInit::exec(), and theirMutexedInit.
virtual void casa::DataManager::removeColumn | ( | DataManagerColumn * | ) | [private, virtual] |
Delete a column.
The default implementation throws a "not possible" exception.
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ISMBase, and casa::MSMBase.
virtual void casa::DataManager::removeRow | ( | uInt | rownr | ) | [private, virtual] |
Delete a row from all columns.
The default implementation throws a "not possible" exception.
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::SSMBase, casa::ISMBase, casa::MSMBase, and casa::VirtualColumnEngine.
virtual void casa::DataManager::reopenRW | ( | ) | [virtual] |
Reopen the data manager for read/write access.
By default it is assumed that a reopen for read/write does not have to do anything.
Reimplemented in casa::ForwardColumnEngine, casa::StManAipsIO, casa::ForwardColumnIndexedRowEngine, casa::SSMBase, casa::TiledStMan, casa::ISMBase, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::DataManager::resync | ( | uInt | nrrow | ) | [private, pure virtual] |
Resync the data by rereading cached data from the file.
This is called when a lock is acquired on the file and it appears that data in this data manager has been changed by another process.
Implemented in casa::StManAipsIO, casa::SSMBase, casa::TiledStMan, casa::ISMBase, casa::VirtualColumnEngine, and casa::MSMBase.
virtual uInt casa::DataManager::resync1 | ( | uInt | nrrow | ) | [private, virtual] |
Resync as above.
The data manager can return the number of rows it thinks there are. This is particularly useful for data managers like LofarStMan whose data are written outside the table system, thus for which no rows have been added.
By default it calls resync and returns nrrow
.
uInt casa::DataManager::sequenceNr | ( | ) | const [inline] |
Get the (unique) sequence nr of this data manager.
Definition at line 280 of file DataManager.h.
References seqnr_p.
Referenced by casa::RODataManAccessor::dataManagerSeqNr().
void casa::DataManager::setClone | ( | DataManager * | clone | ) | const [inline] |
Set the pointer to the clone.
Definition at line 506 of file DataManager.h.
void casa::DataManager::setEndian | ( | Bool | bigEndian | ) | [inline, protected] |
Tell the data manager if big or little endian format is needed.
Definition at line 375 of file DataManager.h.
References asBigEndian_p.
virtual void casa::DataManager::setMaximumCacheSize | ( | uInt | nbytes | ) | [virtual] |
Set the maximum cache size (in bytes) to be used by a storage manager.
The default implementation does nothing.
Reimplemented in casa::TiledStMan.
virtual void casa::DataManager::setProperties | ( | const Record & | spec | ) | [virtual] |
Modify data manager properties given in record fields.
Only the properties as returned by getProperties are used, others are ignored. The default implementation does nothing.
Reimplemented in casa::BitFlagsEngine< StoredType >, casa::SSMBase, casa::TiledStMan, and casa::ISMBase.
void casa::DataManager::setSeqnr | ( | uInt | nr | ) | [inline, private] |
Set the sequence number of this data manager.
Definition at line 446 of file DataManager.h.
References seqnr_p.
void casa::DataManager::setTsmOption | ( | const TSMOption & | tsmOption | ) | [inline, protected] |
Tell the data manager which TSM option to use.
Definition at line 379 of file DataManager.h.
References tsmOption(), and tsmOption_p.
virtual void casa::DataManager::showCacheStatistics | ( | std::ostream & | ) | const [virtual] |
Show the data manager's IO statistics.
By default it does nothing.
Referenced by casa::RODataManAccessor::showCacheStatistics().
Table& casa::DataManager::table | ( | ) | const [inline] |
Get the table this object is associated with.
Definition at line 313 of file DataManager.h.
References table_p.
void casa::DataManager::throwDataTypeOther | ( | const String & | columnName, |
int | dataType | ||
) | const [protected] |
Throw an exception in case data type is TpOther, because the storage managers (and maybe other data managers) do not support such columns.
const TSMOption& casa::DataManager::tsmOption | ( | ) | const [inline] |
Get the TSM option.
Definition at line 292 of file DataManager.h.
References tsmOption_p.
Referenced by setTsmOption().
static DataManager* casa::DataManager::unknownDataManager | ( | const String & | dataManagerType, |
const Record & | spec | ||
) | [static] |
Serve as default function for theirRegisterMap, which catches all unknown data manager types.
static void casa::DataManager::unlockedRegisterCtor | ( | const String & | type, |
DataManagerCtor | func | ||
) | [inline, static, private] |
Register a data manager constructor.
Definition at line 534 of file DataManager.h.
References casa::SimpleOrderedMap< K, V >::define(), and theirRegisterMap.
friend class ColumnSet [friend] |
Definition at line 222 of file DataManager.h.
friend class SetupNewTable [friend] |
Definition at line 221 of file DataManager.h.
Bool casa::DataManager::asBigEndian_p [private] |
Definition at line 391 of file DataManager.h.
Referenced by asBigEndian(), and setEndian().
DataManager* casa::DataManager::clone_p [mutable, private] |
Definition at line 394 of file DataManager.h.
Referenced by getClone(), and setClone().
uInt casa::DataManager::nrcol_p [private] |
Definition at line 389 of file DataManager.h.
Referenced by decrementNcolumn(), and ncolumn().
uInt casa::DataManager::seqnr_p [private] |
Definition at line 390 of file DataManager.h.
Referenced by sequenceNr(), and setSeqnr().
Table* casa::DataManager::table_p [private] |
Definition at line 393 of file DataManager.h.
Referenced by table().
MutexedInit casa::DataManager::theirMutexedInit [static, private] |
Definition at line 498 of file DataManager.h.
Referenced by registerMainCtor().
SimpleOrderedMap<String,DataManagerCtor> casa::DataManager::theirRegisterMap [static, private] |
Declare the mapping of the data manager type name to a static "makeObject" function.
Definition at line 497 of file DataManager.h.
Referenced by unlockedRegisterCtor().
TSMOption casa::DataManager::tsmOption_p [private] |
Definition at line 392 of file DataManager.h.
Referenced by setTsmOption(), and tsmOption().