Class LevelDBAggregationRepository
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.leveldb.LevelDBAggregationRepository
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.AggregationRepository,org.apache.camel.spi.RecoverableAggregationRepository,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@Metadata(label="bean",
description="Aggregation repository that uses LevelDB to store exchanges.",
annotations="interfaceName=org.apache.camel.spi.AggregationRepository")
@Configurer(metadataOnly=true)
public class LevelDBAggregationRepository
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.RecoverableAggregationRepository
An instance of
AggregationRepository which is backed by a LevelDBFile.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionCreates an aggregation repositoryLevelDBAggregationRepository(String repositoryName) Creates an aggregation repositoryLevelDBAggregationRepository(String repositoryName, String persistentFileName) Creates an aggregation repository using a newLevelDBFilethat persists using the provided file.LevelDBAggregationRepository(String repositoryName, LevelDBFile levelDBFile) Creates an aggregation repository using the providedLevelDBFile. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Exchangestatic StringasString(byte[] value) codec()voidprotected voiddoStart()protected voiddoStop()org.apache.camel.ExchangegetKeys()intlongbooleanbooleanbooleanisSync()booleanstatic byte[]keyBuilder(String repo, String key) org.apache.camel.Exchangevoidscan(org.apache.camel.CamelContext camelContext) voidsetAllowSerializedHeaders(boolean allowSerializedHeaders) voidsetDeadLetterUri(String deadLetterUri) voidsetLevelDBFile(LevelDBFile levelDBFile) voidsetMaximumRedeliveries(int maximumRedeliveries) voidsetPersistentFileName(String persistentFileName) voidsetRecoveryInterval(long interval) voidsetRecoveryInterval(long interval, TimeUnit timeUnit) voidsetRepositoryName(String repositoryName) voidsetReturnOldExchange(boolean returnOldExchange) voidsetSerializer(LevelDBSerializer serializer) voidsetSync(boolean sync) voidsetUseRecovery(boolean useRecovery) Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.spi.RecoverableAggregationRepository
confirmWithResult, getRecoveryIntervalInMillisMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
LevelDBAggregationRepository
public LevelDBAggregationRepository()Creates an aggregation repository -
LevelDBAggregationRepository
Creates an aggregation repository- Parameters:
repositoryName- the repository name
-
LevelDBAggregationRepository
Creates an aggregation repository using a newLevelDBFilethat persists using the provided file.- Parameters:
repositoryName- the repository namepersistentFileName- the persistent store filename
-
LevelDBAggregationRepository
Creates an aggregation repository using the providedLevelDBFile.- Parameters:
repositoryName- the repository namelevelDBFile- the leveldb file to use as persistent store
-
-
Method Details
-
add
public org.apache.camel.Exchange add(org.apache.camel.CamelContext camelContext, String key, org.apache.camel.Exchange exchange) - Specified by:
addin interfaceorg.apache.camel.spi.AggregationRepository
-
get
- Specified by:
getin interfaceorg.apache.camel.spi.AggregationRepository
-
remove
public void remove(org.apache.camel.CamelContext camelContext, String key, org.apache.camel.Exchange exchange) - Specified by:
removein interfaceorg.apache.camel.spi.AggregationRepository
-
confirm
- Specified by:
confirmin interfaceorg.apache.camel.spi.AggregationRepository
-
getKeys
- Specified by:
getKeysin interfaceorg.apache.camel.spi.AggregationRepository
-
scan
- Specified by:
scanin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
recover
public org.apache.camel.Exchange recover(org.apache.camel.CamelContext camelContext, String exchangeId) - Specified by:
recoverin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
getLevelDBFile
-
setLevelDBFile
-
getRepositoryName
-
setRepositoryName
-
isSync
public boolean isSync() -
setSync
public void setSync(boolean sync) -
isReturnOldExchange
public boolean isReturnOldExchange() -
setReturnOldExchange
public void setReturnOldExchange(boolean returnOldExchange) -
setRecoveryInterval
- Specified by:
setRecoveryIntervalin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
getRecoveryInterval
public long getRecoveryInterval()- Specified by:
getRecoveryIntervalin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
setRecoveryInterval
public void setRecoveryInterval(long interval) - Specified by:
setRecoveryIntervalin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
isUseRecovery
public boolean isUseRecovery()- Specified by:
isUseRecoveryin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
setUseRecovery
public void setUseRecovery(boolean useRecovery) - Specified by:
setUseRecoveryin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
getMaximumRedeliveries
public int getMaximumRedeliveries()- Specified by:
getMaximumRedeliveriesin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
setMaximumRedeliveries
public void setMaximumRedeliveries(int maximumRedeliveries) - Specified by:
setMaximumRedeliveriesin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
getDeadLetterUri
- Specified by:
getDeadLetterUriin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
setDeadLetterUri
- Specified by:
setDeadLetterUriin interfaceorg.apache.camel.spi.RecoverableAggregationRepository
-
getPersistentFileName
-
setPersistentFileName
-
isAllowSerializedHeaders
public boolean isAllowSerializedHeaders() -
setAllowSerializedHeaders
public void setAllowSerializedHeaders(boolean allowSerializedHeaders) -
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
keyBuilder
-
asString
-
getSerializer
-
setSerializer
-
codec
-