public class JdbcAggregationRepository
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.RecoverableAggregationRepository, org.apache.camel.spi.OptimisticLockingAggregationRepository
AggregationRepository| Constructor and Description |
|---|
JdbcAggregationRepository()
Creates an aggregation repository
|
JdbcAggregationRepository(org.springframework.transaction.PlatformTransactionManager transactionManager,
String repositoryName,
DataSource dataSource)
Creates an aggregation repository with the three mandatory parameters
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.Exchange |
add(org.apache.camel.CamelContext camelContext,
String correlationId,
org.apache.camel.Exchange exchange) |
org.apache.camel.Exchange |
add(org.apache.camel.CamelContext camelContext,
String correlationId,
org.apache.camel.Exchange oldExchange,
org.apache.camel.Exchange newExchange) |
void |
confirm(org.apache.camel.CamelContext camelContext,
String exchangeId) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.Exchange |
get(org.apache.camel.CamelContext camelContext,
String correlationId) |
String |
getDeadLetterUri() |
JdbcOptimisticLockingExceptionMapper |
getJdbcOptimisticLockingExceptionMapper() |
Set<String> |
getKeys() |
protected Set<String> |
getKeys(String repositoryName)
Returns the keys in the given repository
|
org.springframework.jdbc.support.lob.LobHandler |
getLobHandler() |
int |
getMaximumRedeliveries() |
long |
getRecoveryIntervalInMillis() |
String |
getRepositoryName() |
String |
getRepositoryNameCompleted() |
boolean |
hasHeadersToStoreAsText() |
protected void |
insert(org.apache.camel.CamelContext camelContext,
String correlationId,
org.apache.camel.Exchange exchange,
String repositoryName)
Inserts a new record into the given repository table
|
protected void |
insertAndUpdateHelper(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange,
String sql,
boolean idComesFirst) |
boolean |
isReturnOldExchange() |
boolean |
isUseRecovery() |
org.apache.camel.Exchange |
recover(org.apache.camel.CamelContext camelContext,
String exchangeId) |
void |
remove(org.apache.camel.CamelContext camelContext,
String correlationId,
org.apache.camel.Exchange exchange) |
Set<String> |
scan(org.apache.camel.CamelContext camelContext) |
void |
setDataSource(DataSource dataSource) |
void |
setDeadLetterUri(String deadLetterUri) |
void |
setHeadersToStoreAsText(List<String> headersToStoreAsText) |
void |
setJdbcCamelCodec(JdbcCamelCodec codec) |
void |
setJdbcOptimisticLockingExceptionMapper(JdbcOptimisticLockingExceptionMapper jdbcOptimisticLockingExceptionMapper) |
void |
setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler) |
void |
setMaximumRedeliveries(int maximumRedeliveries) |
void |
setRecoveryInterval(long interval) |
void |
setRecoveryInterval(long interval,
TimeUnit timeUnit) |
void |
setRepositoryName(String repositoryName) |
void |
setReturnOldExchange(boolean returnOldExchange) |
void |
setStoreBodyAsText(boolean storeBodyAsText) |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) |
void |
setUseRecovery(boolean useRecovery) |
protected void |
update(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange,
String repositoryName)
Updates the current exchange details in the given repository table
|
public JdbcAggregationRepository()
public JdbcAggregationRepository(org.springframework.transaction.PlatformTransactionManager transactionManager,
String repositoryName,
DataSource dataSource)
public final void setRepositoryName(String repositoryName)
repositoryName - the repositoryName to setpublic final void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
public final void setDataSource(DataSource dataSource)
public org.apache.camel.Exchange add(org.apache.camel.CamelContext camelContext,
String correlationId,
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 correlationId,
org.apache.camel.Exchange exchange)
add in interface org.apache.camel.spi.AggregationRepositoryprotected void update(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange,
String repositoryName)
throws Exception
camelContext - the current CamelContextkey - the correlation keyexchange - the aggregated exchangerepositoryName - The name of the tableExceptionprotected void insert(org.apache.camel.CamelContext camelContext,
String correlationId,
org.apache.camel.Exchange exchange,
String repositoryName)
throws Exception
camelContext - the current CamelContextcorrelationId - the correlation keyexchange - the aggregated exchangerepositoryName - The name of the tableExceptionprotected void insertAndUpdateHelper(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange,
String sql,
boolean idComesFirst)
throws Exception
Exceptionpublic org.apache.camel.Exchange get(org.apache.camel.CamelContext camelContext,
String correlationId)
get in interface org.apache.camel.spi.AggregationRepositorypublic void remove(org.apache.camel.CamelContext camelContext,
String correlationId,
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 Set<String> scan(org.apache.camel.CamelContext camelContext)
scan in interface org.apache.camel.spi.RecoverableAggregationRepositoryprotected Set<String> getKeys(String repositoryName)
repositoryName - The name of the tablepublic org.apache.camel.Exchange recover(org.apache.camel.CamelContext camelContext,
String exchangeId)
recover in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic 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 boolean isUseRecovery()
isUseRecovery in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setUseRecovery(boolean useRecovery)
setUseRecovery in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic int getMaximumRedeliveries()
getMaximumRedeliveries in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setMaximumRedeliveries(int maximumRedeliveries)
setMaximumRedeliveries in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic String getDeadLetterUri()
getDeadLetterUri in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic void setDeadLetterUri(String deadLetterUri)
setDeadLetterUri in interface org.apache.camel.spi.RecoverableAggregationRepositorypublic boolean isReturnOldExchange()
public void setReturnOldExchange(boolean returnOldExchange)
public void setJdbcCamelCodec(JdbcCamelCodec codec)
public boolean hasHeadersToStoreAsText()
public void setStoreBodyAsText(boolean storeBodyAsText)
public org.springframework.jdbc.support.lob.LobHandler getLobHandler()
public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
lobHandler - the lobHandler to setpublic JdbcOptimisticLockingExceptionMapper getJdbcOptimisticLockingExceptionMapper()
public void setJdbcOptimisticLockingExceptionMapper(JdbcOptimisticLockingExceptionMapper jdbcOptimisticLockingExceptionMapper)
public String getRepositoryName()
public String getRepositoryNameCompleted()
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.ServiceSupportExceptionApache Camel