public class DefaultProducerCache
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.ProducerCache
ProducerCache.| Constructor and Description |
|---|
DefaultProducerCache(Object source,
org.apache.camel.CamelContext camelContext,
int cacheSize) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.AsyncProducer |
acquireProducer(org.apache.camel.Endpoint endpoint) |
protected boolean |
asyncDispatchExchange(org.apache.camel.Endpoint endpoint,
org.apache.camel.AsyncProducer producer,
org.apache.camel.Processor resultProcessor,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
CompletableFuture<org.apache.camel.Exchange> |
asyncSend(org.apache.camel.Endpoint endpoint,
org.apache.camel.ExchangePattern pattern,
org.apache.camel.Processor processor,
org.apache.camel.Processor resultProcessor,
CompletableFuture<org.apache.camel.Exchange> future)
Deprecated.
|
CompletableFuture<org.apache.camel.Exchange> |
asyncSendExchange(org.apache.camel.Endpoint endpoint,
org.apache.camel.ExchangePattern pattern,
org.apache.camel.Processor processor,
org.apache.camel.Processor resultProcessor,
org.apache.camel.Exchange exchange,
CompletableFuture<org.apache.camel.Exchange> future) |
void |
cleanUp() |
protected CompletableFuture<org.apache.camel.Exchange> |
doAsyncSendExchange(org.apache.camel.Endpoint endpoint,
org.apache.camel.Processor processor,
org.apache.camel.Processor resultProcessor,
org.apache.camel.Exchange exchange,
CompletableFuture<org.apache.camel.Exchange> f) |
protected org.apache.camel.AsyncProducer |
doGetProducer(org.apache.camel.Endpoint endpoint) |
boolean |
doInAsyncProducer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback,
org.apache.camel.spi.ProducerCache.AsyncProducerCallback producerCallback) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
int |
getCapacity() |
org.apache.camel.spi.EndpointUtilizationStatistics |
getEndpointUtilizationStatistics() |
long |
getEvicted() |
long |
getHits() |
long |
getMisses() |
Object |
getSource() |
boolean |
isEventNotifierEnabled() |
boolean |
isExtendedStatistics() |
void |
purge() |
void |
releaseProducer(org.apache.camel.Endpoint endpoint,
org.apache.camel.AsyncProducer producer) |
void |
resetCacheStatistics() |
org.apache.camel.Exchange |
send(org.apache.camel.Endpoint endpoint,
org.apache.camel.Exchange exchange,
org.apache.camel.Processor resultProcessor) |
void |
setEventNotifierEnabled(boolean eventNotifierEnabled) |
void |
setExtendedStatistics(boolean extendedStatistics)
Whether extended JMX statistics is enabled for
EndpointUtilizationStatistics |
int |
size() |
String |
toString() |
doInit, doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic DefaultProducerCache(Object source, org.apache.camel.CamelContext camelContext, int cacheSize)
public boolean isEventNotifierEnabled()
isEventNotifierEnabled in interface org.apache.camel.spi.ProducerCachepublic void setEventNotifierEnabled(boolean eventNotifierEnabled)
setEventNotifierEnabled in interface org.apache.camel.spi.ProducerCachepublic boolean isExtendedStatistics()
public void setExtendedStatistics(boolean extendedStatistics)
EndpointUtilizationStatisticspublic org.apache.camel.CamelContext getCamelContext()
public Object getSource()
getSource in interface org.apache.camel.spi.ProducerCachepublic org.apache.camel.AsyncProducer acquireProducer(org.apache.camel.Endpoint endpoint)
acquireProducer in interface org.apache.camel.spi.ProducerCachepublic void releaseProducer(org.apache.camel.Endpoint endpoint,
org.apache.camel.AsyncProducer producer)
releaseProducer in interface org.apache.camel.spi.ProducerCachepublic org.apache.camel.Exchange send(org.apache.camel.Endpoint endpoint,
org.apache.camel.Exchange exchange,
org.apache.camel.Processor resultProcessor)
send in interface org.apache.camel.spi.ProducerCache@Deprecated public CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor, CompletableFuture<org.apache.camel.Exchange> future)
Processor to populate the exchange
This method will neither throw an exception nor complete future exceptionally. If processing of the given Exchange failed then the exception is stored on the return Exchange
endpoint - the endpoint to send the exchange topattern - the message ExchangePattern such as
ExchangePattern.InOnly or ExchangePattern.InOutprocessor - the transformer used to populate the new exchangeresultProcessor - a processor to process the exchange when the send is complete.future - the preexisting future to complete when processing is done or null if to create new onepublic CompletableFuture<org.apache.camel.Exchange> asyncSendExchange(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor, org.apache.camel.Exchange exchange, CompletableFuture<org.apache.camel.Exchange> future)
asyncSendExchange in interface org.apache.camel.spi.ProducerCacheprotected CompletableFuture<org.apache.camel.Exchange> doAsyncSendExchange(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor, org.apache.camel.Exchange exchange, CompletableFuture<org.apache.camel.Exchange> f)
public boolean doInAsyncProducer(org.apache.camel.Endpoint endpoint,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback,
org.apache.camel.spi.ProducerCache.AsyncProducerCallback producerCallback)
doInAsyncProducer in interface org.apache.camel.spi.ProducerCacheprotected boolean asyncDispatchExchange(org.apache.camel.Endpoint endpoint,
org.apache.camel.AsyncProducer producer,
org.apache.camel.Processor resultProcessor,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
protected org.apache.camel.AsyncProducer doGetProducer(org.apache.camel.Endpoint endpoint)
throws Exception
Exceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.ServiceSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.ServiceSupportExceptionpublic int size()
size in interface org.apache.camel.spi.ProducerCachepublic int getCapacity()
getCapacity in interface org.apache.camel.spi.ProducerCachepublic long getHits()
getHits in interface org.apache.camel.spi.ProducerCachepublic long getMisses()
getMisses in interface org.apache.camel.spi.ProducerCachepublic long getEvicted()
getEvicted in interface org.apache.camel.spi.ProducerCachepublic void resetCacheStatistics()
resetCacheStatistics in interface org.apache.camel.spi.ProducerCachepublic void purge()
purge in interface org.apache.camel.spi.ProducerCachepublic void cleanUp()
cleanUp in interface org.apache.camel.spi.ProducerCachepublic org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
getEndpointUtilizationStatistics in interface org.apache.camel.spi.ProducerCacheApache Camel