Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A24F618C3A for ; Sun, 3 May 2015 09:13:37 +0000 (UTC) Received: (qmail 3388 invoked by uid 500); 3 May 2015 09:13:37 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 3329 invoked by uid 500); 3 May 2015 09:13:37 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 3320 invoked by uid 99); 3 May 2015 09:13:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2015 09:13:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3BD86DFD86; Sun, 3 May 2015 09:13:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Message-Id: <5ef9ae2bfb994152bfbf76f084347991@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: camel git commit: CAMEL-8727: File consumer - Add read lock that is based on idempotent repository Date: Sun, 3 May 2015 09:13:37 +0000 (UTC) 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 Authored: Sun May 3 11:17:02 2015 +0200 Committer: Claus Ibsen 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 extends ScheduledPollEndpoint imple *
  • 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.
  • *
  • rename - rename is for using a try to rename the file as a test if we can get exclusive read-lock.
  • + *
  • 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.
  • * * 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;