org.apache.camel.spi
Interface RecoverableAggregationRepository

All Superinterfaces:
AggregationRepository

public interface RecoverableAggregationRepository
extends AggregationRepository

A specialized AggregationRepository which also supports recovery. This usually requires a repository which is persisted.

Version:

Method Summary
 String getDeadLetterUri()
          Gets the dead letter channel
 int getMaximumRedeliveries()
          Gets the maximum redelivery attempts to do before a recovered Exchange is doomed as exhausted and moved to the dead letter channel.
 long getRecoveryIntervalInMillis()
          Gets the interval between recovery scans in millis.
 boolean isUseRecovery()
          Whether or not recovery is enabled or not
 Exchange recover(CamelContext camelContext, String exchangeId)
          Recovers the exchange with the given exchange id
 Set<String> scan(CamelContext camelContext)
          Scans the repository for Exchanges to be recovered
 void setDeadLetterUri(String deadLetterUri)
          Sets an optional dead letter channel which exhausted recovered Exchange should be send to.
 void setMaximumRedeliveries(int maximumRedeliveries)
          Sets an optional limit of the number of redelivery attempt of recovered Exchange should be attempted, before its exhausted.
 void setRecoveryInterval(long interval)
          Sets the interval between recovery scans
 void setRecoveryInterval(long interval, TimeUnit timeUnit)
          Sets the interval between recovery scans
 void setUseRecovery(boolean useRecovery)
          Sets whether or not recovery is enabled
 
Methods inherited from interface org.apache.camel.spi.AggregationRepository
add, confirm, get, getKeys, remove
 

Method Detail

scan

Set<String> scan(CamelContext camelContext)
Scans the repository for Exchanges to be recovered

Parameters:
camelContext - the current CamelContext
Returns:
the exchange ids for to be recovered

recover

Exchange recover(CamelContext camelContext,
                 String exchangeId)
Recovers the exchange with the given exchange id

Parameters:
camelContext - the current CamelContext
exchangeId - exchange id
Returns:
the recovered exchange or null if not found

setRecoveryInterval

void setRecoveryInterval(long interval,
                         TimeUnit timeUnit)
Sets the interval between recovery scans

Parameters:
interval - the interval
timeUnit - the time unit

setRecoveryInterval

void setRecoveryInterval(long interval)
Sets the interval between recovery scans

Parameters:
interval - the interval in millis

getRecoveryIntervalInMillis

long getRecoveryIntervalInMillis()
Gets the interval between recovery scans in millis.

Returns:
the interval in millis

setUseRecovery

void setUseRecovery(boolean useRecovery)
Sets whether or not recovery is enabled

Parameters:
useRecovery - whether or not recovery is enabled

isUseRecovery

boolean isUseRecovery()
Whether or not recovery is enabled or not

Returns:
true to use recovery, false otherwise.

setDeadLetterUri

void setDeadLetterUri(String deadLetterUri)
Sets an optional dead letter channel which exhausted recovered Exchange should be send to.

By default this option is disabled

Parameters:
deadLetterUri - the uri of the dead letter channel

getDeadLetterUri

String getDeadLetterUri()
Gets the dead letter channel

Returns:
the uri of the dead letter channel

setMaximumRedeliveries

void setMaximumRedeliveries(int maximumRedeliveries)
Sets an optional limit of the number of redelivery attempt of recovered Exchange should be attempted, before its exhausted.

When this limit is hit, then the Exchange is moved to the dead letter channel.

By default this option is disabled

Parameters:
maximumRedeliveries - the maximum redeliveries

getMaximumRedeliveries

int getMaximumRedeliveries()
Gets the maximum redelivery attempts to do before a recovered Exchange is doomed as exhausted and moved to the dead letter channel.

Returns:
the maximum redeliveries


Apache CAMEL