#include <flint_lock.h>
Collaboration diagram for FlintLock:
Public Types | |
enum | reason { SUCCESS, INUSE, UNSUPPORTED, UNKNOWN } |
Public Member Functions | |
FlintLock (const std::string &filename_) | |
operator bool () | |
~FlintLock () | |
reason | lock (bool exclusive) |
void | release () |
Private Attributes | |
std::string | filename |
int | fd |
pid_t | pid |
Definition at line 36 of file flint_lock.h.
enum FlintLock::reason |
FlintLock::FlintLock | ( | const std::string & | filename_ | ) | [inline] |
Definition at line 63 of file flint_lock.h.
FlintLock::~FlintLock | ( | ) | [inline] |
FlintLock::operator bool | ( | ) | [inline] |
FlintLock::reason FlintLock::lock | ( | bool | exclusive | ) |
Definition at line 55 of file flint_lock.cc.
References Assert, fd, filename, INUSE, Xapian::Remote::open(), pid, SUCCESS, UNKNOWN, and UNSUPPORTED.
Referenced by FlintDatabase::get_database_write_lock().
void FlintLock::release | ( | ) |
std::string FlintLock::filename [private] |
int FlintLock::fd [private] |
pid_t FlintLock::pid [private] |