public abstract class ScheduledBatchPollingConsumer extends ScheduledPollConsumer implements org.apache.camel.BatchConsumer, org.apache.camel.spi.ShutdownAware
| Modifier and Type | Field and Description |
|---|---|
protected int |
maxMessagesPerPoll |
protected int |
pendingExchanges |
protected org.apache.camel.ShutdownRunningTask |
shutdownRunningTask |
| Constructor and Description |
|---|
ScheduledBatchPollingConsumer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Processor processor) |
ScheduledBatchPollingConsumer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Processor processor,
ScheduledExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deferShutdown(org.apache.camel.ShutdownRunningTask shutdownRunningTask) |
int |
getMaxMessagesPerPoll()
Gets the maximum number of messages as a limit to poll at each polling.
|
int |
getPendingExchangesSize() |
boolean |
isBatchAllowed() |
void |
prepareShutdown(boolean suspendOnly,
boolean forced) |
protected void |
processEmptyMessage()
No messages to poll so send an empty message instead.
|
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll) |
addLastErrorDetail, afterConfigureScheduler, afterPoll, beforePoll, doBuild, doInit, doShutdown, doStart, doStop, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getCounter, getDelay, getErrorCounter, getInitialDelay, getLastError, getLastErrorDetails, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getSuccessCounter, getTimeUnit, isFirstPollDone, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, poll, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startSchedulercreateExchange, createUoW, defaultConsumerCallback, doneUoW, getAsyncProcessor, getEndpoint, getExceptionHandler, getHealthCheck, getProcessor, getRoute, getRouteId, handleException, handleException, releaseExchange, setExceptionHandler, setHealthCheck, setRoute, setRouteId, toStringbuild, doFail, doLifecycleChange, doResume, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateExchange, defaultConsumerCallback, getProcessor, releaseExchangegetHealthCheck, setHealthCheckprotected volatile org.apache.camel.ShutdownRunningTask shutdownRunningTask
protected volatile int pendingExchanges
protected int maxMessagesPerPoll
public ScheduledBatchPollingConsumer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Processor processor)
public ScheduledBatchPollingConsumer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Processor processor,
ScheduledExecutorService executor)
public boolean deferShutdown(org.apache.camel.ShutdownRunningTask shutdownRunningTask)
deferShutdown in interface org.apache.camel.spi.ShutdownAwarepublic int getPendingExchangesSize()
getPendingExchangesSize in interface org.apache.camel.spi.ShutdownAwarepublic void prepareShutdown(boolean suspendOnly,
boolean forced)
prepareShutdown in interface org.apache.camel.spi.ShutdownPreparedpublic void setMaxMessagesPerPoll(int maxMessagesPerPoll)
setMaxMessagesPerPoll in interface org.apache.camel.BatchConsumerpublic int getMaxMessagesPerPoll()
public boolean isBatchAllowed()
isBatchAllowed in interface org.apache.camel.BatchConsumerprotected void processEmptyMessage()
throws Exception
ScheduledPollConsumerprocessEmptyMessage in class ScheduledPollConsumerException - is thrown if error processing the empty message.Apache Camel