Go to the documentation of this file.
28 #ifndef TABLES_EXTERNALLOCKSYNC_H
29 #define TABLES_EXTERNALLOCKSYNC_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/TableLockData.h>
35 #include <casacore/tables/Tables/TableSyncData.h>
void release(Bool always=False)
Release the lock.
MemoryIO * doReleaseCallBack(Bool always)
The member function executing the callback functionality.
ExternalLockSync(const ExternalLockSync &that)
Copy constructor is forbidden.
Bool acquire(FileLocker::LockType=FileLocker::Write, uInt nattempts=0)
Acquire a read or write lock (when needed).
LockType
Define the possible lock types.
Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
MemoryIO & memoryIO()
Get the MemoryIO object.
static MemoryIO * releaseCallBack(void *lockSyncObject, Bool always)
The callback function when releasing a lock.
void write(uInt nrrow, uInt nrcolumn, Bool tableChanged, const Block< Bool > &dataManChanged)
Update the synchronization data and write it into the MemoryIO object.
uInt nrow() const
Get the current number of rows in this object.
@ Write
Acquire a write lock.
void makeLock(const String &tableName, Bool create, FileLocker::LockType)
Create the LockFile object and acquire a read or write lock when permanent locking is in effect.
this file contains all the compiler specific defines
ExternalLockSync & operator=(const ExternalLockSync &that)
Assignment is forbidden.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
void release(uInt nrrow)
Release the lock and synchronize the table access.
Bool hasLock(FileLocker::LockType) const
Check if the table has a read or write lock, thus if the table can be read or written safely.
ExternalLockSync(const TableLock &lockOptions)
Construct from the given TableLock object.