|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.component.hawtdb.HawtDBAggregationRepository
public class HawtDBAggregationRepository
An instance of AggregationRepository which is backed by a HawtDB.
| Constructor Summary | |
|---|---|
HawtDBAggregationRepository()
Creates an aggregation repository |
|
HawtDBAggregationRepository(String repositoryName)
Creates an aggregation repository |
|
HawtDBAggregationRepository(String repositoryName,
HawtDBFile hawtDBFile)
Creates an aggregation repository using the provided HawtDBFile. |
|
HawtDBAggregationRepository(String repositoryName,
String persistentFileName)
Creates an aggregation repository using a new HawtDBFile
that persists using the provided file. |
|
| Method Summary | |
|---|---|
Exchange |
add(CamelContext camelContext,
String key,
Exchange exchange)
Add the given Exchange under the correlation key. |
void |
confirm(CamelContext camelContext,
String exchangeId)
Confirms the completion of the Exchange. |
protected void |
doStart()
|
protected void |
doStop()
|
Exchange |
get(CamelContext camelContext,
String key)
Gets the given exchange with the correlation key |
Integer |
getBufferSize()
|
String |
getDeadLetterUri()
Gets the dead letter channel |
HawtDBFile |
getHawtDBFile()
|
Set<String> |
getKeys()
Gets the keys currently in the repository. |
int |
getMaximumRedeliveries()
Gets the maximum redelivery attempts to do before a recovered Exchange is doomed
as exhausted and moved to the dead letter channel. |
short |
getPageSize()
|
String |
getPersistentFileName()
|
long |
getRecoveryIntervalInMillis()
Gets the interval between recovery scans in millis. |
String |
getRepositoryName()
|
boolean |
isReturnOldExchange()
|
boolean |
isSync()
|
boolean |
isUseRecovery()
Whether or not recovery is enabled or not |
Exchange |
recover(CamelContext camelContext,
String exchangeId)
Recovers the exchange with the given exchange id |
void |
remove(CamelContext camelContext,
String key,
Exchange exchange)
Removes the exchange with the given correlation key, which should happen when an Exchange is completed |
Set<String> |
scan(CamelContext camelContext)
Scans the repository for Exchanges to be recovered |
void |
setBufferSize(Integer bufferSize)
|
void |
setDeadLetterUri(String deadLetterUri)
Sets an optional dead letter channel which exhausted recovered Exchange
should be send to. |
void |
setHawtDBFile(HawtDBFile hawtDBFile)
|
void |
setMaximumRedeliveries(int maximumRedeliveries)
Sets an optional limit of the number of redelivery attempt of recovered Exchange
should be attempted, before its exhausted. |
void |
setPageSize(short pageSize)
|
void |
setPersistentFileName(String persistentFileName)
|
void |
setRecoveryInterval(long interval)
Sets the interval between recovery scans |
void |
setRecoveryInterval(long interval,
TimeUnit timeUnit)
Sets the interval between recovery scans |
void |
setRepositoryName(String repositoryName)
|
void |
setReturnOldExchange(boolean returnOldExchange)
|
void |
setSync(boolean sync)
|
void |
setUseRecovery(boolean useRecovery)
Sets whether or not recovery is enabled |
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HawtDBAggregationRepository()
public HawtDBAggregationRepository(String repositoryName)
repositoryName - the repository name
public HawtDBAggregationRepository(String repositoryName,
String persistentFileName)
HawtDBFile
that persists using the provided file.
repositoryName - the repository namepersistentFileName - the persistent store filename
public HawtDBAggregationRepository(String repositoryName,
HawtDBFile hawtDBFile)
HawtDBFile.
repositoryName - the repository namehawtDBFile - the hawtdb file to use as persistent store| Method Detail |
|---|
public Exchange add(CamelContext camelContext,
String key,
Exchange exchange)
AggregationRepositoryExchange under the correlation key.
Will replace any existing exchange.
add in interface AggregationRepositorycamelContext - the current CamelContextkey - the correlation keyexchange - the aggregated exchange
public Exchange get(CamelContext camelContext,
String key)
AggregationRepository
get in interface AggregationRepositorycamelContext - the current CamelContextkey - the correlation key
public void remove(CamelContext camelContext,
String key,
Exchange exchange)
AggregationRepositoryExchange is completed
remove in interface AggregationRepositorycamelContext - the current CamelContextkey - the correlation keyexchange - the exchange to remove
public void confirm(CamelContext camelContext,
String exchangeId)
AggregationRepositoryExchange.
confirm in interface AggregationRepositorycamelContext - the current CamelContextexchangeId - exchange id to confirmpublic Set<String> getKeys()
AggregationRepository
getKeys in interface AggregationRepositorypublic Set<String> scan(CamelContext camelContext)
RecoverableAggregationRepositoryExchanges to be recovered
scan in interface RecoverableAggregationRepositorycamelContext - the current CamelContext
public Exchange recover(CamelContext camelContext,
String exchangeId)
RecoverableAggregationRepository
recover in interface RecoverableAggregationRepositorycamelContext - the current CamelContextexchangeId - exchange id
public HawtDBFile getHawtDBFile()
public void setHawtDBFile(HawtDBFile hawtDBFile)
public String getRepositoryName()
public void setRepositoryName(String repositoryName)
public String getPersistentFileName()
public void setPersistentFileName(String persistentFileName)
public boolean isSync()
public void setSync(boolean sync)
public Integer getBufferSize()
public void setBufferSize(Integer bufferSize)
public boolean isReturnOldExchange()
public void setReturnOldExchange(boolean returnOldExchange)
public void setRecoveryInterval(long interval,
TimeUnit timeUnit)
RecoverableAggregationRepository
setRecoveryInterval in interface RecoverableAggregationRepositoryinterval - the intervaltimeUnit - the time unitpublic void setRecoveryInterval(long interval)
RecoverableAggregationRepository
setRecoveryInterval in interface RecoverableAggregationRepositoryinterval - the interval in millispublic long getRecoveryIntervalInMillis()
RecoverableAggregationRepository
getRecoveryIntervalInMillis in interface RecoverableAggregationRepositorypublic boolean isUseRecovery()
RecoverableAggregationRepository
isUseRecovery in interface RecoverableAggregationRepositorypublic void setUseRecovery(boolean useRecovery)
RecoverableAggregationRepository
setUseRecovery in interface RecoverableAggregationRepositoryuseRecovery - whether or not recovery is enabledpublic int getMaximumRedeliveries()
RecoverableAggregationRepositoryExchange is doomed
as exhausted and moved to the dead letter channel.
getMaximumRedeliveries in interface RecoverableAggregationRepositorypublic void setMaximumRedeliveries(int maximumRedeliveries)
RecoverableAggregationRepositoryExchange
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
setMaximumRedeliveries in interface RecoverableAggregationRepositorymaximumRedeliveries - the maximum redeliveriespublic String getDeadLetterUri()
RecoverableAggregationRepository
getDeadLetterUri in interface RecoverableAggregationRepositorypublic void setDeadLetterUri(String deadLetterUri)
RecoverableAggregationRepositoryExchange
should be send to.
By default this option is disabled
setDeadLetterUri in interface RecoverableAggregationRepositorydeadLetterUri - the uri of the dead letter channelpublic short getPageSize()
public void setPageSize(short pageSize)
protected void doStart()
throws Exception
doStart in class ServiceSupportException
protected void doStop()
throws Exception
doStop in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||