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
MkStoragexml in interface MkStorageIOException - 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
MkStorageapply in interface MkStoragedirs - DirectivesIOException - If there is any I/O problem, or if the current
storage is locked by another thread.public void lock()
MkStorageIf 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()
MkStorageLocking 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.