Search in sources :

Example 1 with EmptyProducerCache

use of org.apache.camel.impl.EmptyProducerCache in project camel by apache.

the class Enricher method doStart.

protected void doStart() throws Exception {
    if (aggregationStrategy == null) {
        aggregationStrategy = defaultAggregationStrategy();
    }
    if (producerCache == null) {
        if (cacheSize < 0) {
            producerCache = new EmptyProducerCache(this, camelContext);
            LOG.debug("Enricher {} is not using ProducerCache", this);
        } else if (cacheSize == 0) {
            producerCache = new ProducerCache(this, camelContext);
            LOG.debug("Enricher {} using ProducerCache with default cache size", this);
        } else {
            producerCache = new ProducerCache(this, camelContext, cacheSize);
            LOG.debug("Enricher {} using ProducerCache with cacheSize={}", this, cacheSize);
        }
    }
    ServiceHelper.startServices(producerCache, aggregationStrategy);
}
Also used : EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache) ProducerCache(org.apache.camel.impl.ProducerCache) EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache)

Example 2 with EmptyProducerCache

use of org.apache.camel.impl.EmptyProducerCache in project camel by apache.

the class RecipientList method doStart.

protected void doStart() throws Exception {
    if (producerCache == null) {
        if (cacheSize < 0) {
            producerCache = new EmptyProducerCache(this, camelContext);
            LOG.debug("RecipientList {} is not using ProducerCache", this);
        } else if (cacheSize == 0) {
            producerCache = new ProducerCache(this, camelContext);
            LOG.debug("RecipientList {} using ProducerCache with default cache size", this);
        } else {
            producerCache = new ProducerCache(this, camelContext, cacheSize);
            LOG.debug("RecipientList {} using ProducerCache with cacheSize={}", this, cacheSize);
        }
    }
    ServiceHelper.startServices(aggregationStrategy, producerCache);
}
Also used : EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache) ProducerCache(org.apache.camel.impl.ProducerCache) EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache)

Example 3 with EmptyProducerCache

use of org.apache.camel.impl.EmptyProducerCache in project camel by apache.

the class RoutingSlip method doStart.

protected void doStart() throws Exception {
    if (producerCache == null) {
        if (cacheSize < 0) {
            producerCache = new EmptyProducerCache(this, camelContext);
            log.debug("RoutingSlip {} is not using ProducerCache", this);
        } else if (cacheSize == 0) {
            producerCache = new ProducerCache(this, camelContext);
            log.debug("RoutingSlip {} using ProducerCache with default cache size", this);
        } else {
            producerCache = new ProducerCache(this, camelContext, cacheSize);
            log.debug("RoutingSlip {} using ProducerCache with cacheSize={}", this, cacheSize);
        }
    }
    ServiceHelper.startService(producerCache);
}
Also used : EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache) ProducerCache(org.apache.camel.impl.ProducerCache) EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache)

Example 4 with EmptyProducerCache

use of org.apache.camel.impl.EmptyProducerCache in project camel by apache.

the class SendDynamicProcessor method doStart.

protected void doStart() throws Exception {
    if (producerCache == null) {
        if (cacheSize < 0) {
            producerCache = new EmptyProducerCache(this, camelContext);
            LOG.debug("DynamicSendTo {} is not using ProducerCache", this);
        } else if (cacheSize == 0) {
            producerCache = new ProducerCache(this, camelContext);
            LOG.debug("DynamicSendTo {} using ProducerCache with default cache size", this);
        } else {
            producerCache = new ProducerCache(this, camelContext, cacheSize);
            LOG.debug("DynamicSendTo {} using ProducerCache with cacheSize={}", this, cacheSize);
        }
    }
    ServiceHelper.startService(producerCache);
}
Also used : EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache) ProducerCache(org.apache.camel.impl.ProducerCache) EmptyProducerCache(org.apache.camel.impl.EmptyProducerCache)

Aggregations

EmptyProducerCache (org.apache.camel.impl.EmptyProducerCache)4 ProducerCache (org.apache.camel.impl.ProducerCache)4