Class ClusteredPostgresAggregationRepository
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository
org.apache.camel.processor.aggregate.jdbc.ClusteredJdbcAggregationRepository
org.apache.camel.processor.aggregate.jdbc.ClusteredPostgresAggregationRepository
- All Implemented Interfaces:
AutoCloseable
,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
PostgreSQL specific
JdbcAggregationRepository
that deals with SQL Violation Exceptions using special
INSERT INTO .. ON CONFLICT DO NOTHING
claues.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.camel.spi.OptimisticLockingAggregationRepository
org.apache.camel.spi.OptimisticLockingAggregationRepository.OptimisticLockingException
-
Field Summary
Fields inherited from class org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository
allowSerializedHeaders, BODY, codec, EXCHANGE, ID, jdbcTemplate, transactionTemplate, transactionTemplateReadOnly, VERSION, VERSION_PROPERTY
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
ConstructorDescriptionCreates an aggregation repositoryClusteredPostgresAggregationRepository
(org.springframework.transaction.PlatformTransactionManager transactionManager, String repositoryName, DataSource dataSource) Creates an aggregation repository with the three mandatory parameters -
Method Summary
Methods inherited from class org.apache.camel.processor.aggregate.jdbc.ClusteredJdbcAggregationRepository
getInstanceId, insertHelper, isRecoveryByInstance, remove, scan, setInstanceId, setRecoveryByInstance
Methods inherited from class org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository
add, add, confirm, confirmWithResult, doInit, doStart, doStop, get, getDeadLetterUri, getHeadersToStoreAsText, getJdbcOptimisticLockingExceptionMapper, getKeys, getKeys, getLobHandler, getMaximumRedeliveries, getPropagationBehavior, getRecoveryIntervalInMillis, getRepositoryName, getRepositoryNameCompleted, hasHeadersToStoreAsText, insert, insertHelper, isAllowSerializedHeaders, isReturnOldExchange, isStoreBodyAsText, isUseRecovery, recover, setAllowSerializedHeaders, setDataSource, setDeadLetterUri, setHeadersToStoreAsText, setJdbcCamelCodec, setJdbcOptimisticLockingExceptionMapper, setLobHandler, setMaximumRedeliveries, setPropagationBehavior, setPropagationBehaviorName, setRecoveryInterval, setRecoveryInterval, setRepositoryName, setReturnOldExchange, setStoreBodyAsText, setTransactionManager, setUseRecovery, update, updateHelper
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
ClusteredPostgresAggregationRepository
public ClusteredPostgresAggregationRepository()Creates an aggregation repository -
ClusteredPostgresAggregationRepository
public ClusteredPostgresAggregationRepository(org.springframework.transaction.PlatformTransactionManager transactionManager, String repositoryName, DataSource dataSource) Creates an aggregation repository with the three mandatory parameters
-
-
Method Details
-
insert
protected void insert(org.apache.camel.CamelContext camelContext, String correlationId, org.apache.camel.Exchange exchange, String repositoryName, Long version, boolean completed) throws Exception Inserts a new record into the given repository table- Overrides:
insert
in classClusteredJdbcAggregationRepository
- Parameters:
camelContext
- the current CamelContextcorrelationId
- the correlation keyexchange
- the aggregated exchangerepositoryName
- The name of the tableversion
- Version identifier- Throws:
Exception
-