Repository: camel Updated Branches: refs/heads/master d58024b49 -> a30617333
CAMEL-8727: File consumer - Add read lock that is based on idempotent repository Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a3061733 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a3061733 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a3061733 Branch: refs/heads/master Commit: a3061733326ae30e4dc1572f9f2a1f87e27b8bf7 Parents: d58024b Author: Claus Ibsen <davscl...@apache.org> Authored: Sun May 3 11:17:02 2015 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sun May 3 11:17:02 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/camel/component/file/GenericFileEndpoint.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/a3061733/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java index 43acaad..d01bebb 100644 --- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java @@ -824,10 +824,13 @@ public abstract class GenericFileEndpoint<T> extends ScheduledPollEndpoint imple * <li>fileLock - is for using java.nio.channels.FileLock. This option is not avail for the FTP component. This approach should be avoided when accessing * a remote file system via a mount/share unless that file system supports distributed file locks.</li> * <li>rename - rename is for using a try to rename the file as a test if we can get exclusive read-lock.</li> + * <li>idempotent - (only for file component) idempotent is for using a idempotentRepository as the read-lock. + * This allows to use read locks that supports clustering if the idempotent repository implementation supports that.</li> * </ul> * Notice: The various read locks is not all suited to work in clustered mode, where concurrent consumers on different nodes is competing * for the same files on a shared file system. The markerFile using a close to atomic operation to create the empty marker file, * but its not guaranteed to work in a cluster. The fileLock may work better but then the file system need to support distributed file locks, and so on. + * Using the idempotent read lock can support clustering if the idempotent repository supports clustering, such as Hazelcast Component or Infinispan. */ public void setReadLock(String readLock) { this.readLock = readLock;