public class RedisAggregationRepository
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.RecoverableAggregationRepository, org.apache.camel.spi.OptimisticLockingAggregationRepository
AggregationRepository using Redis as store.| Constructor and Description |
|---|
RedisAggregationRepository() |
RedisAggregationRepository(String mapName,
String endpoint) |
RedisAggregationRepository(String mapName,
String endpoint,
boolean optimistic) |
RedisAggregationRepository(String mapName,
String persistenceMapName,
String endpoint) |
RedisAggregationRepository(String mapName,
String persistenceMapName,
String endpoint,
boolean optimistic) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.Exchange |
add(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange) |
org.apache.camel.Exchange |
add(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange oldExchange,
org.apache.camel.Exchange newExchange) |
void |
confirm(org.apache.camel.CamelContext camelContext,
String exchangeId) |
boolean |
containsKey(Object key)
Checks if the key in question is in the repository.
|
protected void |
doInit() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.Exchange |
get(org.apache.camel.CamelContext camelContext,
String key) |
String |
getDeadLetterUri() |
String |
getEndpoint() |
Set<String> |
getKeys() |
String |
getMapName() |
int |
getMaximumRedeliveries() |
String |
getPersistenceMapName() |
String |
getPersistentRepositoryName() |
long |
getRecoveryIntervalInMillis() |
org.redisson.api.RedissonClient |
getRedisson() |
boolean |
isAllowSerializedHeaders() |
boolean |
isOptimistic() |
boolean |
isUseRecovery() |
org.apache.camel.Exchange |
recover(org.apache.camel.CamelContext camelContext,
String exchangeId) |
void |
remove(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange) |
Set<String> |
scan(org.apache.camel.CamelContext camelContext) |
void |
setAllowSerializedHeaders(boolean allowSerializedHeaders) |
void |
setDeadLetterUri(String deadLetterUri) |
void |
setEndpoint(String endpoint) |
void |
setMapName(String mapName) |
void |
setMaximumRedeliveries(int maximumRedeliveries) |
void |
setOptimistic(boolean optimistic) |
void |
setPersistenceMapName(String persistenceMapName) |
void |
setRecoveryInterval(long interval) |
void |
setRecoveryInterval(long interval,
TimeUnit timeUnit) |
void |
setRedisson(org.redisson.api.RedissonClient redisson) |
void |
setUseRecovery(boolean useRecovery) |
protected org.apache.camel.Exchange |
unmarshallExchange(org.apache.camel.CamelContext camelContext,
org.apache.camel.support.DefaultExchangeHolder holder) |
build, doBuild, doFail, 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, toString, wait, wait, waitpublic RedisAggregationRepository()
public RedisAggregationRepository(String mapName, String persistenceMapName, String endpoint)
public RedisAggregationRepository(String mapName, String endpoint, boolean optimistic)
public org.apache.camel.Exchange add(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange oldExchange,
org.apache.camel.Exchange newExchange)
throws org.apache.camel.spi.OptimisticLockingAggregationRepository.OptimisticLockingException
add in interface org.apache.camel.spi.OptimisticLockingAggregationRepositoryorg.apache.camel.spi.OptimisticLockingAggregationRepository.OptimisticLockingExceptionpublic org.apache.camel.Exchange add(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange)
add in interface org.apache.camel.spi.AggregationRepositorypublic Set<String> scan(org.apache.camel.CamelContext camelContext)
scan in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic org.apache.camel.Exchange recover(org.apache.camel.CamelContext camelContext,
String exchangeId)
recover in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic boolean isOptimistic()
public void setOptimistic(boolean optimistic)
public String getEndpoint()
public void setEndpoint(String endpoint)
public String getMapName()
public void setMapName(String mapName)
public String getPersistenceMapName()
public void setPersistenceMapName(String persistenceMapName)
public org.redisson.api.RedissonClient getRedisson()
public void setRedisson(org.redisson.api.RedissonClient redisson)
public void setRecoveryInterval(long interval,
TimeUnit timeUnit)
setRecoveryInterval in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setRecoveryInterval(long interval)
setRecoveryInterval in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic long getRecoveryIntervalInMillis()
getRecoveryIntervalInMillis in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setUseRecovery(boolean useRecovery)
setUseRecovery in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic boolean isUseRecovery()
isUseRecovery in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setDeadLetterUri(String deadLetterUri)
setDeadLetterUri in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic String getDeadLetterUri()
getDeadLetterUri in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setMaximumRedeliveries(int maximumRedeliveries)
setMaximumRedeliveries in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic int getMaximumRedeliveries()
getMaximumRedeliveries in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic org.apache.camel.Exchange get(org.apache.camel.CamelContext camelContext,
String key)
get in interface org.apache.camel.spi.AggregationRepositorypublic boolean containsKey(Object key)
key - Object - key in questionpublic boolean isAllowSerializedHeaders()
public void setAllowSerializedHeaders(boolean allowSerializedHeaders)
public void remove(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange)
remove in interface org.apache.camel.spi.AggregationRepositoryremove in interface org.apache.camel.spi.OptimisticLockingAggregationRepositorypublic void confirm(org.apache.camel.CamelContext camelContext,
String exchangeId)
confirm in interface org.apache.camel.spi.AggregationRepositorypublic Set<String> getKeys()
getKeys in interface org.apache.camel.spi.AggregationRepositorypublic String getPersistentRepositoryName()
protected void doInit()
throws Exception
doInit in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionprotected org.apache.camel.Exchange unmarshallExchange(org.apache.camel.CamelContext camelContext,
org.apache.camel.support.DefaultExchangeHolder holder)
Apache Camel