You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/04 11:17:35 UTC
camel git commit: Fixed CS
Repository: camel
Updated Branches:
refs/heads/camel-2.16.x 070305832 -> 62a1a3732
Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/62a1a373
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/62a1a373
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/62a1a373
Branch: refs/heads/camel-2.16.x
Commit: 62a1a37328d89db5b31f22e452cc47c1963e04f1
Parents: 0703058
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 4 10:20:49 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 4 11:17:28 2016 +0100
----------------------------------------------------------------------
.../camel/impl/ScheduledPollEndpoint.java | 47 +++++++++++++-------
1 file changed, 30 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/62a1a373/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
index 48420a4..13335c9 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java
@@ -36,7 +36,7 @@ import org.apache.camel.util.IntrospectionSupport;
/**
* A base class for {@link org.apache.camel.Endpoint} which creates a {@link ScheduledPollConsumer}
*
- * @version
+ * @version
*/
public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
@@ -44,41 +44,54 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint {
private static final String QUARTZ_2_SCHEDULER = "org.apache.camel.pollconsumer.quartz2.QuartzScheduledPollConsumerScheduler";
// if adding more options then align with org.apache.camel.impl.ScheduledPollConsumer
- @UriParam(optionalPrefix = "consumer.", defaultValue = "true", label = "consumer,scheduler", description = "Whether the scheduler should be auto started.")
+ @UriParam(optionalPrefix = "consumer.", defaultValue = "true", label = "consumer,scheduler",
+ description = "Whether the scheduler should be auto started.")
private boolean startScheduler = true;
- @UriParam(optionalPrefix = "consumer.", defaultValue = "1000", label = "consumer,scheduler", description = "Milliseconds before the first poll starts.")
+ @UriParam(optionalPrefix = "consumer.", defaultValue = "1000", label = "consumer,scheduler",
+ description = "Milliseconds before the first poll starts.")
private long initialDelay = 1000;
- @UriParam(optionalPrefix = "consumer.", defaultValue = "500", label = "consumer,scheduler", description = "Milliseconds before the next poll.")
+ @UriParam(optionalPrefix = "consumer.", defaultValue = "500", label = "consumer,scheduler",
+ description = "Milliseconds before the next poll.")
private long delay = 500;
- @UriParam(optionalPrefix = "consumer.", defaultValue = "MILLISECONDS", label = "consumer,scheduler", description = "Time unit for initialDelay and delay options.")
+ @UriParam(optionalPrefix = "consumer.", defaultValue = "MILLISECONDS", label = "consumer,scheduler",
+ description = "Time unit for initialDelay and delay options.")
private TimeUnit timeUnit = TimeUnit.MILLISECONDS;
- @UriParam(optionalPrefix = "consumer.", defaultValue = "true", label = "consumer,scheduler", description = "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.")
+ @UriParam(optionalPrefix = "consumer.", defaultValue = "true", label = "consumer,scheduler",
+ description = "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.")
private boolean useFixedDelay = true;
- @UriParam(optionalPrefix = "consumer.", label = "consumer,advanced", description = "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation"
- + " to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer,advanced",
+ description = "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation"
+ + " to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel.")
private PollingConsumerPollStrategy pollStrategy = new DefaultPollingConsumerPollStrategy();
@UriParam(optionalPrefix = "consumer.", defaultValue = "TRACE", label = "consumer,scheduler",
description = "The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.")
private LoggingLevel runLoggingLevel = LoggingLevel.TRACE;
- @UriParam(optionalPrefix = "consumer.", label = "consumer", description = "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer",
+ description = "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead.")
private boolean sendEmptyMessageWhenIdle;
- @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler", description = "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler",
+ description = "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages.")
private boolean greedy;
- @UriParam(optionalPrefix = "consumer.", enums = "none,spring,quartz2", defaultValue = "none", label = "consumer,scheduler", description = "To use a cron scheduler from either camel-spring or camel-quartz2 component")
+ @UriParam(optionalPrefix = "consumer.", enums = "none,spring,quartz2",
+ defaultValue = "none", label = "consumer,scheduler", description = "To use a cron scheduler from either camel-spring or camel-quartz2 component")
private ScheduledPollConsumerScheduler scheduler;
private String schedulerName = "none"; // used when configuring scheduler using a string value
- @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler", description = "To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler",
+ description = "To configure additional properties when using a custom scheduler or any of the Quartz2, Spring based scheduler.")
private Map<String, Object> schedulerProperties;
@UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler",
description = "Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool.")
private ScheduledExecutorService scheduledExecutorService;
- @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler", description = "To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row."
- + " The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again."
- + " When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler",
+ description = "To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row."
+ + " The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again."
+ + " When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.")
private int backoffMultiplier;
- @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler", description = "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler",
+ description = "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.")
private int backoffIdleThreshold;
- @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler", description = "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.")
+ @UriParam(optionalPrefix = "consumer.", label = "consumer,scheduler",
+ description = "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.")
private int backoffErrorThreshold;
protected ScheduledPollEndpoint(String endpointUri, Component component) {