org.springframework.integration.file.locking
Interface FileLocker

All Known Implementing Classes:
BaseLockingFilter, NioFileLocker

public interface FileLocker

A FileLocker is a strategy that can ensure that files are only processed a single time. Implementations are free to implement any relation between locking and unlocking. This means that there are no safety guarantees in the contract, defining these guarantees is up to the implementation.

Since:
2.0
Author:
Iwein Fuld

Method Summary
 boolean lock(java.io.File fileToLock)
          Tries to lock the given file and returns true if it was successful, false otherwise.
 void unlock(java.io.File fileToUnlock)
          Unlocks the given file.
 

Method Detail

lock

boolean lock(java.io.File fileToLock)
Tries to lock the given file and returns true if it was successful, false otherwise.


unlock

void unlock(java.io.File fileToUnlock)
Unlocks the given file.