Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1958B200CFC for ; Thu, 28 Sep 2017 10:54:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 17B7C1609EC; Thu, 28 Sep 2017 08:54:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3730E1609C2 for ; Thu, 28 Sep 2017 10:54:01 +0200 (CEST) Received: (qmail 38165 invoked by uid 500); 28 Sep 2017 08:54:00 -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 38098 invoked by uid 99); 28 Sep 2017 08:54:00 -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; Thu, 28 Sep 2017 08:54:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4CA4CF5750; Thu, 28 Sep 2017 08:54:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lburgazzoli@apache.org To: commits@camel.apache.org Date: Thu, 28 Sep 2017 08:54:00 -0000 Message-Id: <200b5c82e6f34a05b3add5c7d264be26@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] camel git commit: camel-master: add some javadoc archived-at: Thu, 28 Sep 2017 08:54:02 -0000 Repository: camel Updated Branches: refs/heads/master 894ab4d75 -> 27c02551b camel-master: add some javadoc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a7a867fc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a7a867fc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a7a867fc Branch: refs/heads/master Commit: a7a867fce5197800488395c86aef2d730fb2841f Parents: 894ab4d Author: lburgazzoli Authored: Thu Sep 28 10:53:24 2017 +0200 Committer: lburgazzoli Committed: Thu Sep 28 10:53:42 2017 +0200 ---------------------------------------------------------------------- .../apache/camel/component/master/MasterComponent.java | 10 ++++++---- .../org/apache/camel/component/master/MasterConsumer.java | 4 ++++ .../org/apache/camel/component/master/MasterEndpoint.java | 5 +++++ .../master/springboot/MasterComponentConfiguration.java | 3 ++- 4 files changed, 17 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/a7a867fc/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java ---------------------------------------------------------------------- diff --git a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java index 6d2b3dc..5b8a6f6 100644 --- a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java +++ b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterComponent.java @@ -29,10 +29,12 @@ import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.StringHelper; /** - * The master camel component ensures that only a single endpoint in a cluster is - * active at any point in time with all other JVMs being hot standbys which wait - * until the master JVM dies before taking over to provide high availability of - * a single consumer. + * The master camel component provides a way to ensures that only a single endpoint + * in a cluster is active at any point in time with automatic failover if the + * JVM dies or the leadership is lot for any reason. + *

+ * This feature is useful if you need to consume from a backend that does not + * support concurrent consumption. */ public class MasterComponent extends DefaultComponent { @Metadata(label = "advanced") http://git-wip-us.apache.org/repos/asf/camel/blob/a7a867fc/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java ---------------------------------------------------------------------- diff --git a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java index 999ac71..c7edd91 100644 --- a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java +++ b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterConsumer.java @@ -35,6 +35,10 @@ import org.apache.camel.util.ServiceHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * A consumer which is only really active when the {@link CamelClusterView} has + * the leadership. + */ @ManagedResource(description = "Managed Master Consumer") public class MasterConsumer extends DefaultConsumer { private static final transient Logger LOGGER = LoggerFactory.getLogger(MasterConsumer.class); http://git-wip-us.apache.org/repos/asf/camel/blob/a7a867fc/components/camel-master/src/main/java/org/apache/camel/component/master/MasterEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterEndpoint.java b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterEndpoint.java index 10547a5..abeb601 100644 --- a/components/camel-master/src/main/java/org/apache/camel/component/master/MasterEndpoint.java +++ b/components/camel-master/src/main/java/org/apache/camel/component/master/MasterEndpoint.java @@ -24,11 +24,16 @@ import org.apache.camel.Producer; import org.apache.camel.api.management.ManagedAttribute; import org.apache.camel.api.management.ManagedResource; import org.apache.camel.ha.CamelClusterService; +import org.apache.camel.ha.CamelClusterView; import org.apache.camel.impl.DefaultEndpoint; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriPath; +/** + * Represents an endpoint which only becomes active when the {@link CamelClusterView} + * has the leadership. + */ @ManagedResource(description = "Managed Master Endpoint") @UriEndpoint( firstVersion = "2.20.0", http://git-wip-us.apache.org/repos/asf/camel/blob/a7a867fc/platforms/spring-boot/components-starter/camel-master-starter/src/main/java/org/apache/camel/component/master/springboot/MasterComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/platforms/spring-boot/components-starter/camel-master-starter/src/main/java/org/apache/camel/component/master/springboot/MasterComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-master-starter/src/main/java/org/apache/camel/component/master/springboot/MasterComponentConfiguration.java index 3a1de95..cce155e 100644 --- a/platforms/spring-boot/components-starter/camel-master-starter/src/main/java/org/apache/camel/component/master/springboot/MasterComponentConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-master-starter/src/main/java/org/apache/camel/component/master/springboot/MasterComponentConfiguration.java @@ -24,7 +24,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.NestedConfigurationProperty; /** - * Camel Master Support + * Represents an endpoint which only becomes active when the CamelClusterView + * has the leadership. * * Generated by camel-package-maven-plugin - do not edit this file! */