public class FileChangedExclusiveReadLockStrategy extends MarkerFileExclusiveReadLockStrategy
MarkerFileExclusiveReadLockStrategy.setMarkerFiler(boolean) to false allows to turn off using marker files.| Constructor and Description |
|---|
FileChangedExclusiveReadLockStrategy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireExclusiveReadLock(GenericFileOperations<File> operations,
GenericFile<File> file,
Exchange exchange)
Acquires exclusive read lock to the file.
|
long |
getCheckInterval() |
long |
getMinAge() |
long |
getMinLength() |
long |
getTimeout() |
void |
setCheckInterval(long checkInterval)
Sets the check interval period.
|
void |
setMinAge(long minAge) |
void |
setMinLength(long minLength) |
void |
setReadLockLoggingLevel(LoggingLevel readLockLoggingLevel)
Sets logging level used when a read lock could not be acquired.
|
void |
setTimeout(long timeout)
Sets an optional timeout period.
|
doReleaseExclusiveReadLock, prepareOnStartup, releaseExclusiveReadLockOnAbort, releaseExclusiveReadLockOnCommit, releaseExclusiveReadLockOnRollback, setDeleteOrphanLockFiles, setMarkerFilerpublic FileChangedExclusiveReadLockStrategy()
public boolean acquireExclusiveReadLock(GenericFileOperations<File> operations, GenericFile<File> file, Exchange exchange) throws Exception
GenericFileExclusiveReadLockStrategyacquireExclusiveReadLock in interface GenericFileExclusiveReadLockStrategy<File>acquireExclusiveReadLock in class MarkerFileExclusiveReadLockStrategyoperations - generic file operationsfile - the fileexchange - the exchangeException - can be thrown in case of errorspublic long getTimeout()
public void setTimeout(long timeout)
GenericFileExclusiveReadLockStrategysetTimeout in interface GenericFileExclusiveReadLockStrategy<File>setTimeout in class MarkerFileExclusiveReadLockStrategytimeout - period in millispublic long getCheckInterval()
public void setCheckInterval(long checkInterval)
GenericFileExclusiveReadLockStrategysetCheckInterval in interface GenericFileExclusiveReadLockStrategy<File>setCheckInterval in class MarkerFileExclusiveReadLockStrategycheckInterval - interval in millispublic void setReadLockLoggingLevel(LoggingLevel readLockLoggingLevel)
GenericFileExclusiveReadLockStrategysetReadLockLoggingLevel in interface GenericFileExclusiveReadLockStrategy<File>setReadLockLoggingLevel in class MarkerFileExclusiveReadLockStrategyreadLockLoggingLevel - LoggingLevelpublic long getMinLength()
public void setMinLength(long minLength)
public long getMinAge()
public void setMinAge(long minAge)
Apache Camel