@Service(value="fileLockManager#default") public class DefaultFileLockManager extends Object implements FileLockManager
Constructor and Description |
---|
DefaultFileLockManager() |
Modifier and Type | Method and Description |
---|---|
void |
clearLockFiles() |
int |
getTimeout() |
boolean |
isSkipLocking() |
Lock |
readFileLock(Path file) |
void |
release(Lock lock) |
void |
setSkipLocking(boolean skipLocking) |
void |
setTimeout(int timeout) |
Lock |
writeFileLock(Path file) |
public DefaultFileLockManager()
public Lock readFileLock(Path file) throws FileLockException, FileLockTimeoutException
readFileLock
in interface FileLockManager
FileLockException
FileLockTimeoutException
public Lock writeFileLock(Path file) throws FileLockException, FileLockTimeoutException
writeFileLock
in interface FileLockManager
FileLockException
FileLockTimeoutException
public void release(Lock lock) throws FileLockException
release
in interface FileLockManager
FileLockException
public void clearLockFiles()
clearLockFiles
in interface FileLockManager
public int getTimeout()
getTimeout
in interface FileLockManager
public void setTimeout(int timeout)
setTimeout
in interface FileLockManager
public boolean isSkipLocking()
isSkipLocking
in interface FileLockManager
public void setSkipLocking(boolean skipLocking)
setSkipLocking
in interface FileLockManager
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.