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);
ReleaseCallBack * itsReleaseCallBack
MemoryIO * ReleaseCallBack(void *parentObject, Bool always)
Define the signature of the callback function when a lock is released.
void getInfo(MemoryIO &info)
Get the request id's and the info from the lock file.
TableLockData(const TableLock &lockOptions, ReleaseCallBack *=0, void *releaseParentObject=0)
Construct from the given TableLock object.
Bool hasLock(FileLocker::LockType=FileLocker::Write) const
Test if the process has a lock for read or write on the file.
TableLockData & operator=(const TableLockData &that)
Assignment is forbidden.
Class to hold table lock data.
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...
LockOption option() const
Get the locking option.
Bool acquire(MemoryIO *info, FileLocker::LockType, uInt nattempts)
Acquire a read or write lock.
Bool isMultiUsed()
Is the file associated with the LockFile object in use in another process?
void autoRelease(Bool always=False)
When the inspection interval has expired, inspect if another process needs the lock.
Class to handle file locking and synchronization.
The system takes care of acquiring/releasing locks.
Bool isMultiUsed() const
Is the table in use (i.e.
bool Bool
Define the standard types used by Casacore.
Class to hold table lock options.
void getInfo(MemoryIO &info)
Get or put the info in the lock file.
void release(Bool always=False)
Release the lock.
Bool inspect(Bool always=False)
Inspect if another process wants to access the file (i.e.
void putInfo(const MemoryIO &info) const
Put the info into the file (after the request id's).
void putInfo(const MemoryIO &info)
String: the storage and methods of handling collections of characters.
Class for IO to a memory buffer.
Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
LockType
Define the possible lock types.
this file contains all the compiler specific defines