MkStorage.InFile, MkStorage.Synced| Constructor and Description |
|---|
InFile()
Public ctor.
|
InFile(File file)
Public ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Iterable<org.xembly.Directive> dirs)
Update XML with this directives.
|
void |
lock()
Locks storage to the current thread.
|
String |
toString() |
void |
unlock()
Unlock storage.
|
com.jcabi.xml.XML |
xml()
Get full XML.
|
public InFile()
throws IOException
IOException - If there is any I/O problempublic InFile(File file) throws IOException
file - File to useIOException - If there is any I/O problempublic 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–2018 jcabi.com. All rights reserved.