26#ifndef TABLES_EXTERNALLOCKSYNC_H
27#define TABLES_EXTERNALLOCKSYNC_H
30#include <casacore/casa/aips.h>
31#include <casacore/tables/Tables/TableLockData.h>
32#include <casacore/tables/Tables/TableSyncData.h>
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.
void release(rownr_t nrrow)
Release the lock and synchronize the table access.
Bool acquire(FileLocker::LockType=FileLocker::Write, uInt nattempts=0)
Acquire a read or write lock (when needed).
MemoryIO * doReleaseCallBack(Bool always)
The member function executing the callback functionality.
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.
rownr_t nrow() const
Get the current number of rows in this object.
static MemoryIO * releaseCallBack(void *lockSyncObject, Bool always)
The callback function when releasing a lock.
ExternalLockSync(const ExternalLockSync &that)=delete
Copy constructor is forbidden.
ExternalLockSync(const TableLock &lockOptions)
Construct from the given TableLock object.
ExternalLockSync & operator=(const ExternalLockSync &that)=delete
Assignment is forbidden.
LockType
Define the possible lock types.
@ Write
Acquire a write lock.
String: the storage and methods of handling collections of characters.
For temporary backward namespace compatibility, use casa as alias for casacore.
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.