|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.file.strategy.MarkerFileExclusiveReadLockStrategy
public class MarkerFileExclusiveReadLockStrategy
Acquires read lock to the given file using a marker file so other Camel consumers wont acquire the same file. This is the default behaviour in Camel 1.x.
| Constructor Summary | |
|---|---|
MarkerFileExclusiveReadLockStrategy()
|
|
| Method Summary | |
|---|---|
boolean |
acquireExclusiveReadLock(GenericFileOperations<File> fileGenericFileOperations,
GenericFile<File> file,
Exchange exchange)
Acquires exclusive read lock to the file. |
void |
releaseExclusiveReadLock(GenericFileOperations<File> fileGenericFileOperations,
GenericFile<File> fileGenericFile,
Exchange exchange)
Releases the exclusive read lock granted by the acquireExclusiveReadLock method. |
void |
setTimeout(long timeout)
Sets an optional timeout period. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MarkerFileExclusiveReadLockStrategy()
| Method Detail |
|---|
public boolean acquireExclusiveReadLock(GenericFileOperations<File> fileGenericFileOperations,
GenericFile<File> file,
Exchange exchange)
throws Exception
GenericFileExclusiveReadLockStrategy
acquireExclusiveReadLock in interface GenericFileExclusiveReadLockStrategy<File>fileGenericFileOperations - generic file operationsfile - the fileexchange - the exchange
Exception - can be thrown in case of errors
public void releaseExclusiveReadLock(GenericFileOperations<File> fileGenericFileOperations,
GenericFile<File> fileGenericFile,
Exchange exchange)
throws Exception
GenericFileExclusiveReadLockStrategy
releaseExclusiveReadLock in interface GenericFileExclusiveReadLockStrategy<File>fileGenericFileOperations - generic file operationsfileGenericFile - the fileexchange - the exchange
Exception - can be thrown in case of errorspublic void setTimeout(long timeout)
GenericFileExclusiveReadLockStrategy
setTimeout in interface GenericFileExclusiveReadLockStrategy<File>timeout - period in millis
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||