public abstract class AbstractFileAccess extends Object implements FileAccess
| Constructor and Description |
|---|
AbstractFileAccess() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
readFromFile(Callable<? extends T> action)
Runs the given action under a shared or exclusive lock on the target file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadFromFile, writeToFilepublic <T> T readFromFile(Callable<? extends T> action) throws LockTimeoutException
FileAccessIf an exclusive or shared lock is already held, the lock level is not changed and the action is executed. If no lock is already held, a shared lock is acquired, the action executed, and the lock released. This method blocks until the lock can be acquired.
readFromFile in interface FileAccessLockTimeoutException - On timeout acquiring lock, if required.Copyright © 2013. All rights reserved