MkStorage.InFile, MkStorage.Synced
Constructor and Description |
---|
MkStorage.Synced(MkStorage storage)
Public ctor.
|
public MkStorage.Synced(MkStorage storage)
storage
- Originalpublic com.jcabi.xml.XML xml() throws IOException
MkStorage
xml
in interface MkStorage
IOException
- If there is any I/O problem, or if the current
storage is locked by another thread.public void apply(Iterable<org.xembly.Directive> dirs) throws IOException
MkStorage
apply
in interface MkStorage
dirs
- DirectivesIOException
- If there is any I/O problem, or if the current
storage is locked by another thread.public void lock()
MkStorage
If the lock is available, grant it
to the calling thread and block all operations from other threads.
If not available, wait for the holder of the lock to release it with
MkStorage.unlock()
before any other operations can be performed.
Locking behavior is reentrant, which means a thread can invoke
MkStorage.lock()
multiple times, where a hold count is maintained.
public void unlock()
MkStorage
Locking behavior is reentrant, thus if the thread invoked
MkStorage.lock()
multiple times, the hold count is decremented. If the
hold count reaches 0, the lock is released.
If the current thread does not hold the lock, an
IllegalMonitorStateException
will be thrown.
Copyright © 2012–2014 jcabi.com. All rights reserved.