org.apache.camel.component.hawtdb
Class HawtDBAggregationRepository
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.component.hawtdb.HawtDBAggregationRepository
- All Implemented Interfaces:
- org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.AggregationRepository, org.apache.camel.spi.OptimisticLockingAggregationRepository, org.apache.camel.spi.RecoverableAggregationRepository, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class HawtDBAggregationRepository
- extends org.apache.camel.support.ServiceSupport
- implements org.apache.camel.spi.RecoverableAggregationRepository, org.apache.camel.spi.OptimisticLockingAggregationRepository
An instance of AggregationRepository which is backed by a HawtDB.
Nested classes/interfaces inherited from interface org.apache.camel.spi.OptimisticLockingAggregationRepository |
org.apache.camel.spi.OptimisticLockingAggregationRepository.OptimisticLockingException |
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Method Summary |
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)
|
protected org.apache.camel.Exchange |
doAdd(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange,
boolean handleOptimisticLockingException)
|
protected void |
doStart()
|
protected void |
doStop()
|
org.apache.camel.Exchange |
get(org.apache.camel.CamelContext camelContext,
String key)
|
Integer |
getBufferSize()
|
String |
getDeadLetterUri()
|
HawtDBFile |
getHawtDBFile()
|
Set<String> |
getKeys()
|
int |
getMaximumRedeliveries()
|
short |
getPageSize()
|
String |
getPersistentFileName()
|
long |
getRecoveryIntervalInMillis()
|
String |
getRepositoryName()
|
boolean |
isReturnOldExchange()
|
boolean |
isSync()
|
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 |
setBufferSize(Integer bufferSize)
|
void |
setDeadLetterUri(String deadLetterUri)
|
void |
setHawtDBFile(HawtDBFile hawtDBFile)
|
void |
setMaximumRedeliveries(int maximumRedeliveries)
|
void |
setPageSize(short pageSize)
|
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)
|
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HawtDBAggregationRepository
public HawtDBAggregationRepository()
- Creates an aggregation repository
HawtDBAggregationRepository
public HawtDBAggregationRepository(String repositoryName)
- Creates an aggregation repository
- Parameters:
repositoryName
- the repository name
HawtDBAggregationRepository
public HawtDBAggregationRepository(String repositoryName,
String persistentFileName)
- Creates an aggregation repository using a new
HawtDBFile
that persists using the provided file.
- Parameters:
repositoryName
- the repository namepersistentFileName
- the persistent store filename
HawtDBAggregationRepository
public HawtDBAggregationRepository(String repositoryName,
HawtDBFile hawtDBFile)
- Creates an aggregation repository using the provided
HawtDBFile
.
- Parameters:
repositoryName
- the repository namehawtDBFile
- the hawtdb file to use as persistent store
add
public org.apache.camel.Exchange add(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange)
- Specified by:
add
in interface org.apache.camel.spi.AggregationRepository
add
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
- Specified by:
add
in interface org.apache.camel.spi.OptimisticLockingAggregationRepository
- Throws:
org.apache.camel.spi.OptimisticLockingAggregationRepository.OptimisticLockingException
doAdd
protected org.apache.camel.Exchange doAdd(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange,
boolean handleOptimisticLockingException)
get
public org.apache.camel.Exchange get(org.apache.camel.CamelContext camelContext,
String key)
- Specified by:
get
in interface org.apache.camel.spi.AggregationRepository
remove
public void remove(org.apache.camel.CamelContext camelContext,
String key,
org.apache.camel.Exchange exchange)
- Specified by:
remove
in interface org.apache.camel.spi.AggregationRepository
- Specified by:
remove
in interface org.apache.camel.spi.OptimisticLockingAggregationRepository
confirm
public void confirm(org.apache.camel.CamelContext camelContext,
String exchangeId)
- Specified by:
confirm
in interface org.apache.camel.spi.AggregationRepository
getKeys
public Set<String> getKeys()
- Specified by:
getKeys
in interface org.apache.camel.spi.AggregationRepository
scan
public Set<String> scan(org.apache.camel.CamelContext camelContext)
- Specified by:
scan
in interface org.apache.camel.spi.RecoverableAggregationRepository
recover
public org.apache.camel.Exchange recover(org.apache.camel.CamelContext camelContext,
String exchangeId)
- Specified by:
recover
in interface org.apache.camel.spi.RecoverableAggregationRepository
getHawtDBFile
public HawtDBFile getHawtDBFile()
setHawtDBFile
public void setHawtDBFile(HawtDBFile hawtDBFile)
getRepositoryName
public String getRepositoryName()
setRepositoryName
public void setRepositoryName(String repositoryName)
getPersistentFileName
public String getPersistentFileName()
setPersistentFileName
public void setPersistentFileName(String persistentFileName)
isSync
public boolean isSync()
setSync
public void setSync(boolean sync)
getBufferSize
public Integer getBufferSize()
setBufferSize
public void setBufferSize(Integer bufferSize)
isReturnOldExchange
public boolean isReturnOldExchange()
setReturnOldExchange
public void setReturnOldExchange(boolean returnOldExchange)
setRecoveryInterval
public void setRecoveryInterval(long interval,
TimeUnit timeUnit)
- Specified by:
setRecoveryInterval
in interface org.apache.camel.spi.RecoverableAggregationRepository
setRecoveryInterval
public void setRecoveryInterval(long interval)
- Specified by:
setRecoveryInterval
in interface org.apache.camel.spi.RecoverableAggregationRepository
getRecoveryIntervalInMillis
public long getRecoveryIntervalInMillis()
- Specified by:
getRecoveryIntervalInMillis
in interface org.apache.camel.spi.RecoverableAggregationRepository
isUseRecovery
public boolean isUseRecovery()
- Specified by:
isUseRecovery
in interface org.apache.camel.spi.RecoverableAggregationRepository
setUseRecovery
public void setUseRecovery(boolean useRecovery)
- Specified by:
setUseRecovery
in interface org.apache.camel.spi.RecoverableAggregationRepository
getMaximumRedeliveries
public int getMaximumRedeliveries()
- Specified by:
getMaximumRedeliveries
in interface org.apache.camel.spi.RecoverableAggregationRepository
setMaximumRedeliveries
public void setMaximumRedeliveries(int maximumRedeliveries)
- Specified by:
setMaximumRedeliveries
in interface org.apache.camel.spi.RecoverableAggregationRepository
getDeadLetterUri
public String getDeadLetterUri()
- Specified by:
getDeadLetterUri
in interface org.apache.camel.spi.RecoverableAggregationRepository
setDeadLetterUri
public void setDeadLetterUri(String deadLetterUri)
- Specified by:
setDeadLetterUri
in interface org.apache.camel.spi.RecoverableAggregationRepository
getPageSize
public short getPageSize()
setPageSize
public void setPageSize(short pageSize)
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
Apache Camel