CernVM-FS
2.12.0
|
#include <repository_util.h>
Public Member Functions | |
ServerLockFile (const std::string &path) | |
void | Lock () |
bool | TryLock () |
void | Unlock () |
const std::string & | path () const |
Private Attributes | |
std::string | path_ |
int | fd_ |
A server lock file is a POSIX lock file used to obtain mutually exclusive access to the repository while conducting an operation that modifies the repository state.
Since the lock is implemented using a POSIX lock file, the lock will automatically be released when the creating process exits.
Definition at line 51 of file repository_util.h.
|
inlineexplicit |
Definition at line 53 of file repository_util.h.
void publish::ServerLockFile::Lock | ( | ) |
Definition at line 64 of file repository_util.cc.
Referenced by publish::ServerLockFileGuard::ServerLockFileGuard().
|
inline |
Definition at line 59 of file repository_util.h.
bool publish::ServerLockFile::TryLock | ( | ) |
Definition at line 72 of file repository_util.cc.
Referenced by Lock(), and publish::ServerLockFileCheck::ServerLockFileCheck().
void publish::ServerLockFile::Unlock | ( | ) |
Definition at line 86 of file repository_util.cc.
Referenced by publish::ServerLockFileCheck::~ServerLockFileCheck(), and publish::ServerLockFileGuard::~ServerLockFileGuard().
|
private |
Definition at line 63 of file repository_util.h.
|
private |