public class Resequencer
extends org.apache.camel.support.AsyncProcessorSupport
implements org.apache.camel.Navigate<org.apache.camel.Processor>, org.apache.camel.spi.IdAware, org.apache.camel.spi.RouteIdAware, org.apache.camel.Traceable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCH_SIZE |
static long |
DEFAULT_BATCH_TIMEOUT |
| Constructor and Description |
|---|
Resequencer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
org.apache.camel.Expression expression) |
Resequencer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
org.apache.camel.Expression expression,
boolean allowDuplicates,
boolean reverse) |
Resequencer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
Set<org.apache.camel.Exchange> collection,
org.apache.camel.Expression expression) |
| Modifier and Type | Method and Description |
|---|---|
protected static Set<org.apache.camel.Exchange> |
createSet(Comparator<? super org.apache.camel.Exchange> comparator,
boolean allowDuplicates,
boolean reverse) |
protected static Set<org.apache.camel.Exchange> |
createSet(org.apache.camel.Expression expression,
boolean allowDuplicates,
boolean reverse) |
protected void |
doStart() |
protected void |
doStop() |
int |
getBatchSize() |
long |
getBatchTimeout() |
org.apache.camel.Predicate |
getCompletionPredicate() |
org.apache.camel.spi.ExceptionHandler |
getExceptionHandler() |
org.apache.camel.Expression |
getExpression() |
String |
getId() |
int |
getOutBatchSize() |
org.apache.camel.Processor |
getProcessor() |
String |
getRouteId() |
String |
getTraceLabel() |
boolean |
hasNext() |
boolean |
isAllowDuplicates() |
boolean |
isBatchConsumer() |
boolean |
isGroupExchanges() |
boolean |
isIgnoreInvalidExchanges() |
boolean |
isReverse() |
List<org.apache.camel.Processor> |
next() |
protected void |
postProcess(org.apache.camel.Exchange exchange) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
Enqueues an exchange for later batch processing.
|
protected void |
processExchange(org.apache.camel.Exchange exchange)
Strategy Method to process an exchange in the batch.
|
void |
setAllowDuplicates(boolean allowDuplicates) |
void |
setBatchConsumer(boolean batchConsumer) |
void |
setBatchSize(int batchSize)
Sets the in batch size.
|
void |
setBatchTimeout(long batchTimeout) |
void |
setCompletionPredicate(org.apache.camel.Predicate completionPredicate) |
void |
setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler) |
void |
setGroupExchanges(boolean groupExchanges) |
void |
setId(String id) |
void |
setIgnoreInvalidExchanges(boolean ignoreInvalidExchanges) |
void |
setOutBatchSize(int outBatchSize)
Sets the out batch size.
|
void |
setReverse(boolean reverse) |
void |
setRouteId(String routeId) |
String |
toString() |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, 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, waitpublic static final long DEFAULT_BATCH_TIMEOUT
public static final int DEFAULT_BATCH_SIZE
public Resequencer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
org.apache.camel.Expression expression)
public Resequencer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
org.apache.camel.Expression expression,
boolean allowDuplicates,
boolean reverse)
public Resequencer(org.apache.camel.CamelContext camelContext,
org.apache.camel.Processor processor,
Set<org.apache.camel.Exchange> collection,
org.apache.camel.Expression expression)
public String getTraceLabel()
getTraceLabel in interface org.apache.camel.Traceablepublic org.apache.camel.Expression getExpression()
public org.apache.camel.spi.ExceptionHandler getExceptionHandler()
public void setExceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler)
public int getBatchSize()
public void setBatchSize(int batchSize)
DEFAULT_BATCH_SIZE.batchSize - the sizepublic int getOutBatchSize()
public void setOutBatchSize(int outBatchSize)
outBatchSize - the sizepublic long getBatchTimeout()
public void setBatchTimeout(long batchTimeout)
public boolean isGroupExchanges()
public void setGroupExchanges(boolean groupExchanges)
public boolean isBatchConsumer()
public void setBatchConsumer(boolean batchConsumer)
public boolean isIgnoreInvalidExchanges()
public void setIgnoreInvalidExchanges(boolean ignoreInvalidExchanges)
public boolean isReverse()
public void setReverse(boolean reverse)
public boolean isAllowDuplicates()
public void setAllowDuplicates(boolean allowDuplicates)
public org.apache.camel.Predicate getCompletionPredicate()
public void setCompletionPredicate(org.apache.camel.Predicate completionPredicate)
public org.apache.camel.Processor getProcessor()
public List<org.apache.camel.Processor> next()
next in interface org.apache.camel.Navigate<org.apache.camel.Processor>public boolean hasNext()
hasNext in interface org.apache.camel.Navigate<org.apache.camel.Processor>public String getId()
getId in interface org.apache.camel.spi.HasIdpublic void setId(String id)
setId in interface org.apache.camel.spi.IdAwarepublic String getRouteId()
getRouteId in interface org.apache.camel.spi.RouteIdAwarepublic void setRouteId(String routeId)
setRouteId in interface org.apache.camel.spi.RouteIdAwareprotected static Set<org.apache.camel.Exchange> createSet(org.apache.camel.Expression expression, boolean allowDuplicates, boolean reverse)
protected static Set<org.apache.camel.Exchange> createSet(Comparator<? super org.apache.camel.Exchange> comparator, boolean allowDuplicates, boolean reverse)
protected void processExchange(org.apache.camel.Exchange exchange)
protected void postProcess(org.apache.camel.Exchange exchange)
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.AsyncProcessorSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.AsyncProcessorSupportExceptionpublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
process in interface org.apache.camel.AsyncProcessorApache Camel