28 #ifndef TABLES_TABLELOCKDATA_H
29 #define TABLES_TABLELOCKDATA_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/TableLock.h>
77 void* releaseParentObject = 0);
LockType
Define the possible lock types.
Bool isMultiUsed()
Is the file associated with the LockFile object in use in another process?
Bool hasLock(FileLocker::LockType=FileLocker::Write) const
Test if the process has a lock for read or write on the file.
void putInfo(const MemoryIO &info) const
Put the info into the file (after the request id's).
Bool inspect(Bool always=False)
Inspect if another process wants to access the file (i.e.
void getInfo(MemoryIO &info)
Get the request id's and the info from the lock file.
String: the storage and methods of handling collections of characters.
void autoRelease(Bool always=False)
When the inspection interval has expired, inspect if another process needs the lock.
void release(Bool always=False)
Release the lock.
void getInfo(MemoryIO &info)
Get or put the info in the lock file.
Bool acquire(MemoryIO *info, FileLocker::LockType, uInt nattempts)
Acquire a read or write lock.
ReleaseCallBack * itsReleaseCallBack
Bool isMultiUsed() const
Is the table in use (i.e.
TableLockData(const TableLockData &that)
Copy constructor is forbidden.
void putInfo(const MemoryIO &info)
TableLockData(const TableLock &lockOptions, ReleaseCallBack *=0, void *releaseParentObject=0)
Construct from the given TableLock object.
void makeLock(const String &name, Bool create, FileLocker::LockType, uInt locknr=0)
Create the LockFile object and acquire a read or write lock when permanent locking is in effect.
TableLockData & operator=(const TableLockData &that)
Assignment is forbidden.
Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
MemoryIO * ReleaseCallBack(void *parentObject, Bool always)
Define the signature of the callback function when a lock is released.
@ AutoLocking
The system takes care of acquiring/releasing locks.
LockOption option() const
Get the locking option.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.