MkStorage.InFile, MkStorage.Synced
Constructor and Description |
---|
MkStorage.InFile()
Public ctor.
|
MkStorage.InFile(File file)
Public ctor.
|
public MkStorage.InFile() throws IOException
IOException
- If there is any I/O problempublic MkStorage.InFile(@NotNull(message="file can\'t be NULL") File file) throws IOException
file
- File to useIOException
- If there is any I/O problem@NotNull(message="XML is never NULL") public 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(@NotNull(message="dirs cannot be NULL") 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.