casacore
|
Class to hold table synchronization data. More...
#include <TableSyncData.h>
Public Member Functions | |
TableSyncData () | |
~TableSyncData () | |
void | write (rownr_t nrrow, uInt nrcolumn, Bool tableChanged, const Block< Bool > &dataManChanged) |
Update the synchronization data and write it into the MemoryIO object. More... | |
void | write (rownr_t nrrow) |
Update the synchronization data and write it into the MemoryIO object. More... | |
Bool | read (rownr_t &nrrow, uInt &nrcolumn, Bool &tableChanged, Block< Bool > &dataManChanged) |
Read the synchronization data from the MemoryIO object. More... | |
MemoryIO & | memoryIO () |
Get the MemoryIO object. More... | |
uInt | getModifyCounter () const |
Get the modify counter. More... | |
Private Member Functions | |
TableSyncData (const TableSyncData &that) | |
Copy constructor is forbidden. More... | |
TableSyncData & | operator= (const TableSyncData &that) |
Assignment is forbidden. More... | |
Private Attributes | |
rownr_t | itsNrrow |
Int | itsNrcolumn |
uInt | itsModifyCounter |
uInt | itsTableChangeCounter |
Block< uInt > | itsDataManChangeCounter |
MemoryIO | itsMemIO |
AipsIO | itsAipsIO |
Class to hold table synchronization data.
Internal
This class keeps counters to synchronize the table data when a table is locked or unlocked.
A few counters are kept by this class:
When a lock on the table is acquired, it reads the sync data from the lock file and determines if anything has changed. If so, the necessary steps are taken to reread the table data when needed.
When a lock on the table is released, it updates and writes the sync data which tells if table data have changed.
This class can also be used for the synchronization of tables and external fillers (see class ExternalLockSync). For this purpose it is sufficient to store the number of rows.
Definition at line 78 of file TableSyncData.h.
casacore::TableSyncData::TableSyncData | ( | ) |
casacore::TableSyncData::~TableSyncData | ( | ) |
|
private |
Copy constructor is forbidden.
|
inline |
Get the modify counter.
Definition at line 136 of file TableSyncData.h.
References itsModifyCounter.
|
inline |
Get the MemoryIO object.
This is used to let LockFile
read or write the synchronization data into it.
Definition at line 132 of file TableSyncData.h.
References itsMemIO.
Referenced by casacore::ExternalLockSync::doReleaseCallBack().
|
private |
Assignment is forbidden.
void casacore::TableSyncData::write | ( | rownr_t | nrrow, |
uInt | nrcolumn, | ||
Bool | tableChanged, | ||
const Block< Bool > & | dataManChanged | ||
) |
Update the synchronization data and write it into the MemoryIO object.
This function is called when a table flush is done to reflect if anything has changed compared to the previous flush.
Referenced by casacore::ExternalLockSync::doReleaseCallBack().
void casacore::TableSyncData::write | ( | rownr_t | nrrow | ) |
Update the synchronization data and write it into the MemoryIO object.
This function should be used by an external filler when it flushes its data.
|
private |
Definition at line 127 of file TableSyncData.h.
Definition at line 125 of file TableSyncData.h.
|
private |
Definition at line 126 of file TableSyncData.h.
Referenced by memoryIO().
|
private |
Definition at line 123 of file TableSyncData.h.
Referenced by getModifyCounter().
|
private |
Definition at line 122 of file TableSyncData.h.
|
private |
Definition at line 121 of file TableSyncData.h.
|
private |
Definition at line 124 of file TableSyncData.h.