|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GenericFileExclusiveReadLockStrategy<T>
Strategy for acquiring exclusive read locks for files to be consumed. After granting the read lock it is realeased, we just want to make sure that when we start consuming the file its not currently in progress of being written by third party.
Camel supports out of the box the following strategies:
Method Summary | |
---|---|
boolean |
acquireExclusiveReadLock(GenericFileOperations<T> operations,
GenericFile<T> file,
Exchange exchange)
Acquires exclusive read lock to the file. |
void |
releaseExclusiveReadLock(GenericFileOperations<T> operations,
GenericFile<T> file,
Exchange exchange)
Releases the exclusive read lock granted by the acquireExclusiveReadLock method. |
void |
setTimeout(long timeout)
Sets an optional timeout period. |
Method Detail |
---|
boolean acquireExclusiveReadLock(GenericFileOperations<T> operations, GenericFile<T> file, Exchange exchange) throws Exception
operations
- generic file operationsfile
- the fileexchange
- the exchange
Exception
- can be thrown in case of errorsvoid releaseExclusiveReadLock(GenericFileOperations<T> operations, GenericFile<T> file, Exchange exchange) throws Exception
operations
- generic file operationsfile
- the fileexchange
- the exchange
Exception
- can be thrown in case of errorsvoid setTimeout(long timeout)
timeout
- period in millis
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |