org.apache.camel.component.hawtdb
Class HawtDBAggregationRepository

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.component.hawtdb.HawtDBAggregationRepository
All Implemented Interfaces:
Service, ShutdownableService, AggregationRepository, RecoverableAggregationRepository

public class HawtDBAggregationRepository
extends ServiceSupport
implements RecoverableAggregationRepository

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)
           
 void confirm(CamelContext camelContext, String exchangeId)
           
protected  void doStart()
           
protected  void doStop()
           
 Exchange get(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()
           
 Exchange recover(CamelContext camelContext, String exchangeId)
           
 void remove(CamelContext camelContext, String key, Exchange exchange)
           
 Set<String> scan(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.impl.ServiceSupport
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 name
persistentFileName - the persistent store filename

HawtDBAggregationRepository

public HawtDBAggregationRepository(String repositoryName,
                                   HawtDBFile hawtDBFile)
Creates an aggregation repository using the provided HawtDBFile.

Parameters:
repositoryName - the repository name
hawtDBFile - the hawtdb file to use as persistent store
Method Detail

add

public Exchange add(CamelContext camelContext,
                    String key,
                    Exchange exchange)
Specified by:
add in interface AggregationRepository

get

public Exchange get(CamelContext camelContext,
                    String key)
Specified by:
get in interface AggregationRepository

remove

public void remove(CamelContext camelContext,
                   String key,
                   Exchange exchange)
Specified by:
remove in interface AggregationRepository

confirm

public void confirm(CamelContext camelContext,
                    String exchangeId)
Specified by:
confirm in interface AggregationRepository

getKeys

public Set<String> getKeys()
Specified by:
getKeys in interface AggregationRepository

scan

public Set<String> scan(CamelContext camelContext)
Specified by:
scan in interface RecoverableAggregationRepository

recover

public Exchange recover(CamelContext camelContext,
                        String exchangeId)
Specified by:
recover in interface 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 RecoverableAggregationRepository

setRecoveryInterval

public void setRecoveryInterval(long interval)
Specified by:
setRecoveryInterval in interface RecoverableAggregationRepository

getRecoveryIntervalInMillis

public long getRecoveryIntervalInMillis()
Specified by:
getRecoveryIntervalInMillis in interface RecoverableAggregationRepository

isUseRecovery

public boolean isUseRecovery()
Specified by:
isUseRecovery in interface RecoverableAggregationRepository

setUseRecovery

public void setUseRecovery(boolean useRecovery)
Specified by:
setUseRecovery in interface RecoverableAggregationRepository

getMaximumRedeliveries

public int getMaximumRedeliveries()
Specified by:
getMaximumRedeliveries in interface RecoverableAggregationRepository

setMaximumRedeliveries

public void setMaximumRedeliveries(int maximumRedeliveries)
Specified by:
setMaximumRedeliveries in interface RecoverableAggregationRepository

getDeadLetterUri

public String getDeadLetterUri()
Specified by:
getDeadLetterUri in interface RecoverableAggregationRepository

setDeadLetterUri

public void setDeadLetterUri(String deadLetterUri)
Specified by:
setDeadLetterUri in interface RecoverableAggregationRepository

getPageSize

public short getPageSize()

setPageSize

public void setPageSize(short pageSize)

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.