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) |
afterPoll, beforePoll, doInit, doShutdown, doStart, doStop, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, 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, startScheduler
createUoW, doneUoW, getAsyncProcessor, getEndpoint, getExceptionHandler, getProcessor, getRoute, getRouteId, handleException, handleException, setExceptionHandler, setRoute, setRouteId, toString
build, doBuild, doFail, doLifecycleChange, doResume, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected 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.ShutdownAware
public int getPendingExchangesSize()
getPendingExchangesSize
in interface org.apache.camel.spi.ShutdownAware
public void prepareShutdown(boolean suspendOnly, boolean forced)
prepareShutdown
in interface org.apache.camel.spi.ShutdownPrepared
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
setMaxMessagesPerPoll
in interface org.apache.camel.BatchConsumer
public int getMaxMessagesPerPoll()
public boolean isBatchAllowed()
isBatchAllowed
in interface org.apache.camel.BatchConsumer
protected void processEmptyMessage() throws Exception
ScheduledPollConsumer
processEmptyMessage
in class ScheduledPollConsumer
Exception
- is thrown if error processing the empty message.Apache Camel