T - the lock target typepublic class LocalFileLockProvider<T> extends Object implements LockProvider<T>
LockProvider using local file lock.| Constructor and Description |
|---|
LocalFileLockProvider(File baseDirectory)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
LocalFileLockObject<T> |
tryLock(T target)
Tries to acquire lock for the target.
|
public LocalFileLockProvider(File baseDirectory)
baseDirectory - the local lock file base directorypublic LocalFileLockObject<T> tryLock(T target) throws IOException
LockProvidertryLock in interface LockProvider<T>target - the lock targetnull if other program has a lock for the same targetIOException - if failed to acquire lock by I/O exceptionCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.