public class LevelDBAggregationRepository
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.RecoverableAggregationRepository
AggregationRepository
which is backed by a LevelDBFile
.Constructor and Description |
---|
LevelDBAggregationRepository()
Creates an aggregation repository
|
LevelDBAggregationRepository(String repositoryName)
Creates an aggregation repository
|
LevelDBAggregationRepository(String repositoryName,
LevelDBFile levelDBFile)
Creates an aggregation repository using the provided
LevelDBFile . |
LevelDBAggregationRepository(String repositoryName,
String persistentFileName)
Creates an aggregation repository using a new
LevelDBFile
that persists using the provided file. |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Exchange |
add(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange) |
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 key) |
String |
getDeadLetterUri() |
Set<String> |
getKeys() |
LevelDBFile |
getLevelDBFile() |
int |
getMaximumRedeliveries() |
String |
getPersistentFileName() |
long |
getRecoveryIntervalInMillis() |
String |
getRepositoryName() |
boolean |
isAllowSerializedHeaders() |
boolean |
isReturnOldExchange() |
boolean |
isSync() |
boolean |
isUseRecovery() |
static byte[] |
keyBuilder(String repo,
String key) |
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 |
setLevelDBFile(LevelDBFile levelDBFile) |
void |
setMaximumRedeliveries(int maximumRedeliveries) |
void |
setPersistentFileName(String persistentFileName) |
void |
setRecoveryInterval(long interval) |
void |
setRecoveryInterval(long interval,
TimeUnit timeUnit) |
void |
setRepositoryName(String repositoryName) |
void |
setReturnOldExchange(boolean returnOldExchange) |
void |
setSync(boolean sync) |
void |
setUseRecovery(boolean useRecovery) |
public LevelDBAggregationRepository()
public LevelDBAggregationRepository(String repositoryName)
repositoryName
- the repository namepublic LevelDBAggregationRepository(String repositoryName, String persistentFileName)
LevelDBFile
that persists using the provided file.repositoryName
- the repository namepersistentFileName
- the persistent store filenamepublic LevelDBAggregationRepository(String repositoryName, LevelDBFile levelDBFile)
LevelDBFile
.repositoryName
- the repository namelevelDBFile
- the leveldb file to use as persistent storepublic org.apache.camel.Exchange add(org.apache.camel.CamelContext camelContext, String key, org.apache.camel.Exchange exchange)
add
in interface org.apache.camel.spi.AggregationRepository
public org.apache.camel.Exchange get(org.apache.camel.CamelContext camelContext, String key)
get
in interface org.apache.camel.spi.AggregationRepository
public void remove(org.apache.camel.CamelContext camelContext, String key, org.apache.camel.Exchange exchange)
remove
in interface org.apache.camel.spi.AggregationRepository
public void confirm(org.apache.camel.CamelContext camelContext, String exchangeId)
confirm
in interface org.apache.camel.spi.AggregationRepository
public Set<String> getKeys()
getKeys
in interface org.apache.camel.spi.AggregationRepository
public Set<String> scan(org.apache.camel.CamelContext camelContext)
scan
in interface org.apache.camel.spi.RecoverableAggregationRepository
public org.apache.camel.Exchange recover(org.apache.camel.CamelContext camelContext, String exchangeId)
recover
in interface org.apache.camel.spi.RecoverableAggregationRepository
public LevelDBFile getLevelDBFile()
public void setLevelDBFile(LevelDBFile levelDBFile)
public String getRepositoryName()
public void setRepositoryName(String repositoryName)
public boolean isSync()
public void setSync(boolean sync)
public boolean isReturnOldExchange()
public void setReturnOldExchange(boolean returnOldExchange)
public void setRecoveryInterval(long interval, TimeUnit timeUnit)
setRecoveryInterval
in interface org.apache.camel.spi.RecoverableAggregationRepository
public void setRecoveryInterval(long interval)
setRecoveryInterval
in interface org.apache.camel.spi.RecoverableAggregationRepository
public long getRecoveryIntervalInMillis()
getRecoveryIntervalInMillis
in interface org.apache.camel.spi.RecoverableAggregationRepository
public boolean isUseRecovery()
isUseRecovery
in interface org.apache.camel.spi.RecoverableAggregationRepository
public void setUseRecovery(boolean useRecovery)
setUseRecovery
in interface org.apache.camel.spi.RecoverableAggregationRepository
public int getMaximumRedeliveries()
getMaximumRedeliveries
in interface org.apache.camel.spi.RecoverableAggregationRepository
public void setMaximumRedeliveries(int maximumRedeliveries)
setMaximumRedeliveries
in interface org.apache.camel.spi.RecoverableAggregationRepository
public String getDeadLetterUri()
getDeadLetterUri
in interface org.apache.camel.spi.RecoverableAggregationRepository
public void setDeadLetterUri(String deadLetterUri)
setDeadLetterUri
in interface org.apache.camel.spi.RecoverableAggregationRepository
public String getPersistentFileName()
public void setPersistentFileName(String persistentFileName)
public boolean isAllowSerializedHeaders()
public void setAllowSerializedHeaders(boolean allowSerializedHeaders)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
Apache Camel