public class FileRenameExclusiveReadLockStrategy extends GenericFileRenameExclusiveReadLockStrategy<File>
MarkerFileExclusiveReadLockStrategy
as well, to ensure only acquiring locks on files, which is not already in progress by another process,
that have marked this using the marker file.Constructor and Description |
---|
FileRenameExclusiveReadLockStrategy() |
Modifier and Type | Method and Description |
---|---|
boolean |
acquireExclusiveReadLock(GenericFileOperations<File> operations,
GenericFile<File> file,
Exchange exchange)
Acquires exclusive read lock to the file.
|
void |
releaseExclusiveReadLock(GenericFileOperations<File> operations,
GenericFile<File> file,
Exchange exchange)
Releases the exclusive read lock granted by the acquireExclusiveReadLock method.
|
getTimeout, prepareOnStartup, setCheckInterval, setReadLockLoggingLevel, setTimeout
public FileRenameExclusiveReadLockStrategy()
public boolean acquireExclusiveReadLock(GenericFileOperations<File> operations, GenericFile<File> file, Exchange exchange) throws Exception
GenericFileExclusiveReadLockStrategy
acquireExclusiveReadLock
in interface GenericFileExclusiveReadLockStrategy<File>
acquireExclusiveReadLock
in class GenericFileRenameExclusiveReadLockStrategy<File>
operations
- generic file operationsfile
- the fileexchange
- the exchangeException
- can be thrown in case of errorspublic void releaseExclusiveReadLock(GenericFileOperations<File> operations, GenericFile<File> file, Exchange exchange) throws Exception
GenericFileExclusiveReadLockStrategy
releaseExclusiveReadLock
in interface GenericFileExclusiveReadLockStrategy<File>
releaseExclusiveReadLock
in class GenericFileRenameExclusiveReadLockStrategy<File>
operations
- generic file operationsfile
- the fileexchange
- the exchangeException
- can be thrown in case of errorsApache Camel