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 ProducerServicePool |
createServicePool(org.apache.camel.CamelContext camelContext,
int cacheSize) |
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) |
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 |
doInit() |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
int |
getCapacity() |
org.apache.camel.spi.EndpointUtilizationStatistics |
getEndpointUtilizationStatistics() |
Object |
getSource() |
boolean |
isEventNotifierEnabled() |
boolean |
isExtendedStatistics() |
void |
purge() |
void |
releaseProducer(org.apache.camel.Endpoint endpoint,
org.apache.camel.AsyncProducer producer) |
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() |
build, doBuild, doFail, doLifecycleChange, doResume, doSuspend, 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
public DefaultProducerCache(Object source, org.apache.camel.CamelContext camelContext, int cacheSize)
protected ProducerServicePool createServicePool(org.apache.camel.CamelContext camelContext, int cacheSize)
public boolean isEventNotifierEnabled()
isEventNotifierEnabled
in interface org.apache.camel.spi.ProducerCache
public void setEventNotifierEnabled(boolean eventNotifierEnabled)
setEventNotifierEnabled
in interface org.apache.camel.spi.ProducerCache
public boolean isExtendedStatistics()
public void setExtendedStatistics(boolean extendedStatistics)
EndpointUtilizationStatistics
public org.apache.camel.CamelContext getCamelContext()
public Object getSource()
getSource
in interface org.apache.camel.spi.ProducerCache
public org.apache.camel.AsyncProducer acquireProducer(org.apache.camel.Endpoint endpoint)
acquireProducer
in interface org.apache.camel.spi.ProducerCache
public void releaseProducer(org.apache.camel.Endpoint endpoint, org.apache.camel.AsyncProducer producer)
releaseProducer
in interface org.apache.camel.spi.ProducerCache
public 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.InOut
processor
- 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.ProducerCache
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)
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.ProducerCache
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)
protected void doInit() throws Exception
doInit
in class org.apache.camel.support.service.BaseService
Exception
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.BaseService
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.BaseService
Exception
protected void doShutdown() throws Exception
doShutdown
in class org.apache.camel.support.service.BaseService
Exception
public int size()
size
in interface org.apache.camel.spi.ProducerCache
public int getCapacity()
getCapacity
in interface org.apache.camel.spi.ProducerCache
public void purge()
purge
in interface org.apache.camel.spi.ProducerCache
public void cleanUp()
cleanUp
in interface org.apache.camel.spi.ProducerCache
public org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
getEndpointUtilizationStatistics
in interface org.apache.camel.spi.ProducerCache
Apache Camel