static ZConfig & instance()
Singleton ctor.
void removeEmpty()
Call callback for each empty lock.
const_iterator begin() const
Access to the sat-pools string space.
LockList::size_type size() const
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
void addLock(const PoolQuery &query)
TODO add: toBeAdded{Begin,End,Size,Empty} toBeRemoved{Begin,End,Size,Empty}.
Singleton class which manipulate with locks file and apply locks on pool.
void apply() const
Applies locks in stable list (locks which is not changed during session).
std::list< PoolQuery > LockList
void removeDuplicates()
Delete all query duplicate in loaded locks.
static Locks & instance()
Gets instance of this class.
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string...
void merge()
Merges toAdd and ToRemove list to stable list.
const_iterator end() const
void save(const Pathname &file=ZConfig::instance().locksFile())
Merges toAdd and ToRemove list to stable list and save that stable list to file.
void readAndApply(const Pathname &file=ZConfig::instance().locksFile())
Optimalized version of read and apply.
Wrapper for const correct access via Smart pointer types.
LockList::size_type size_type
void read(const Pathname &file=ZConfig::instance().locksFile())
Read locks from file to list of stable locks (locks which is not changed during session) ...
void removeLock(const PoolQuery &query)
unlocks by result of query and add to toRemove.
LockList::const_iterator const_iterator
bool existEmpty() const
Gets true if some lock doesn't lock any object in pool This can happen e.g.