public class MyBatisConsumer
extends org.apache.camel.impl.ScheduledBatchPollingConsumer
| Modifier and Type | Field and Description |
|---|---|
protected int |
pendingExchanges |
protected org.apache.camel.ShutdownRunningTask |
shutdownRunningTask |
| Constructor and Description |
|---|
MyBatisConsumer(MyBatisEndpoint endpoint,
org.apache.camel.Processor processor) |
| Modifier and Type | Method and Description |
|---|---|
MyBatisEndpoint |
getEndpoint() |
String |
getOnConsume()
Gets the statement(s) to run after successful processing.
|
boolean |
isRouteEmptyResultSet()
Indicates whether empty resultset should be allowed to be sent to the next hop or not
|
boolean |
isUseIterator()
Indicates how resultset should be delivered to the route
|
protected int |
poll()
Polls the database
|
int |
processBatch(Queue<Object> exchanges) |
void |
setOnConsume(String onConsume)
Sets the statement to run after successful processing.
|
void |
setRouteEmptyResultSet(boolean routeEmptyResultSet)
Sets whether empty resultset should be allowed to be sent to the next hop.
|
void |
setUseIterator(boolean useIterator)
Sets how resultset should be delivered to route.
|
deferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPollafterPoll, beforePoll, doShutdown, doStart, doStop, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startSchedulercreateUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toStringdoResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendprotected volatile org.apache.camel.ShutdownRunningTask shutdownRunningTask
protected volatile int pendingExchanges
public MyBatisConsumer(MyBatisEndpoint endpoint, org.apache.camel.Processor processor)
public MyBatisEndpoint getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.impl.DefaultConsumerprotected int poll()
throws Exception
poll in class org.apache.camel.impl.ScheduledPollConsumerExceptionpublic String getOnConsume()
public void setOnConsume(String onConsume)
public boolean isUseIterator()
public void setUseIterator(boolean useIterator)
public boolean isRouteEmptyResultSet()
public void setRouteEmptyResultSet(boolean routeEmptyResultSet)
Apache Camel