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, setMaxMessagesPerPoll
afterPoll, 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, startScheduler
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toString
doResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
protected 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.EndpointAware
getEndpoint
in class org.apache.camel.impl.DefaultConsumer
protected int poll() throws Exception
poll
in class org.apache.camel.impl.ScheduledPollConsumer
Exception
public 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