Class EmbeddedInfinispanLogMinerEventProcessor
- java.lang.Object
-
- io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor<InfinispanTransaction>
-
- io.debezium.connector.oracle.logminer.processor.infinispan.AbstractInfinispanLogMinerEventProcessor
-
- io.debezium.connector.oracle.logminer.processor.infinispan.EmbeddedInfinispanLogMinerEventProcessor
-
- All Implemented Interfaces:
CacheProvider,LogMinerEventProcessor,AutoCloseable
public class EmbeddedInfinispanLogMinerEventProcessor extends AbstractInfinispanLogMinerEventProcessor
A concrete implementation ofAbstractInfinispanLogMinerEventProcessorthat uses Infinispan in embedded mode to store transaction and mined event data in caches. The cache configurations are supplied via connector configurations and are expected to be valid XML that represent parseable local cache setups for Infinispan.- Author:
- Chris Cranford
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor
AbstractLogMinerEventProcessor.Counters
-
-
Field Summary
Fields Modifier and Type Field Description private org.infinispan.manager.EmbeddedCacheManagercacheManagerprivate booleandropBufferOnStopprivate org.infinispan.Cache<String,LogMinerEvent>eventCacheprivate static org.slf4j.LoggerLOGGERprivate org.infinispan.Cache<String,String>processedTransactionsCacheprivate org.infinispan.Cache<String,String>schemaChangesCacheprivate org.infinispan.Cache<String,InfinispanTransaction>transactionCache-
Fields inherited from class io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor
counters
-
Fields inherited from interface io.debezium.connector.oracle.logminer.processor.infinispan.CacheProvider
EVENTS_CACHE_NAME, PROCESSED_TRANSACTIONS_CACHE_NAME, SCHEMA_CHANGES_CACHE_NAME, TRANSACTIONS_CACHE_NAME
-
-
Constructor Summary
Constructors Constructor Description EmbeddedInfinispanLogMinerEventProcessor(ChangeEventSource.ChangeEventSourceContext context, OracleConnectorConfig connectorConfig, OracleConnection jdbcConnection, EventDispatcher<TableId> dispatcher, OraclePartition partition, OracleOffsetContext offsetContext, OracleDatabaseSchema schema, OracleStreamingChangeEventSourceMetrics metrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()private <K,V>
org.infinispan.Cache<K,V>createCache(String cacheName, OracleConnectorConfig connectorConfig, Field field)org.infinispan.commons.api.BasicCache<String,LogMinerEvent>getEventCache()Get the LogMiner events cache Key - The event id, in the format oftransactionId-eventSequenceValue - The raw LogMinerEvent object instanceorg.infinispan.commons.api.BasicCache<String,String>getProcessedTransactionsCache()Get the processed transactions cache Key - The unique transaction id Value - The transaction's commit or rollback system change numberorg.infinispan.commons.api.BasicCache<String,String>getSchemaChangesCache()Get the Schema Changes cache Key - The system change number of the schema change Value - The table the schema change is related toorg.infinispan.commons.api.BasicCache<String,InfinispanTransaction>getTransactionCache()Returns theTransactionCacheimplementation.protected ScngetTransactionCacheMinimumScn()Gets the minimum system change number stored in the transaction cache.private org.infinispan.configuration.cache.ConfigurationparseAndGetConfiguration(String cacheName, String configuration)-
Methods inherited from class io.debezium.connector.oracle.logminer.processor.infinispan.AbstractInfinispanLogMinerEventProcessor
abandonTransactions, addToTransaction, calculateNewStartScn, createQueryStatement, createTransaction, displayCacheStatistics, finalizeTransactionCommit, finalizeTransactionRollback, getAndRemoveTransactionFromCache, getTransactionEventCount, getTransactionEventIterator, handleSchemaChange, hasSchemaChangeBeenSeen, isRecentlyProcessed, processRow, removeEventWithRowId, removeTransactionAndEventsFromCache
-
Methods inherited from class io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor
getConfig, getLastProcessedScn, getSchema, handleCommit, handleDataEvent, handleLobWrite, handleMissingScn, handleRollback, handleSelectLobLocator, handleStart, isTransactionAlreadyProcessed, isTransactionUserExcluded, isTrxIdRawValue, process, processResults, warnPotentiallyStuckScn
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
cacheManager
private final org.infinispan.manager.EmbeddedCacheManager cacheManager
-
dropBufferOnStop
private final boolean dropBufferOnStop
-
transactionCache
private final org.infinispan.Cache<String,InfinispanTransaction> transactionCache
-
eventCache
private final org.infinispan.Cache<String,LogMinerEvent> eventCache
-
processedTransactionsCache
private final org.infinispan.Cache<String,String> processedTransactionsCache
-
-
Constructor Detail
-
EmbeddedInfinispanLogMinerEventProcessor
public EmbeddedInfinispanLogMinerEventProcessor(ChangeEventSource.ChangeEventSourceContext context, OracleConnectorConfig connectorConfig, OracleConnection jdbcConnection, EventDispatcher<TableId> dispatcher, OraclePartition partition, OracleOffsetContext offsetContext, OracleDatabaseSchema schema, OracleStreamingChangeEventSourceMetrics metrics)
-
-
Method Detail
-
getTransactionCache
public org.infinispan.commons.api.BasicCache<String,InfinispanTransaction> getTransactionCache()
Description copied from class:AbstractLogMinerEventProcessorReturns theTransactionCacheimplementation.- Specified by:
getTransactionCachein interfaceCacheProvider- Specified by:
getTransactionCachein classAbstractLogMinerEventProcessor<InfinispanTransaction>- Returns:
- the transaction cache, never
null
-
getEventCache
public org.infinispan.commons.api.BasicCache<String,LogMinerEvent> getEventCache()
Description copied from interface:CacheProviderGet the LogMiner events cache- Key - The event id, in the format of
transactionId-eventSequence - Value - The raw LogMinerEvent object instance
- Returns:
- the evnts cache, never
null
- Key - The event id, in the format of
-
getSchemaChangesCache
public org.infinispan.commons.api.BasicCache<String,String> getSchemaChangesCache()
Description copied from interface:CacheProviderGet the Schema Changes cache- Key - The system change number of the schema change
- Value - The table the schema change is related to
- Returns:
- the schema changes cache, never
null
-
getProcessedTransactionsCache
public org.infinispan.commons.api.BasicCache<String,String> getProcessedTransactionsCache()
Description copied from interface:CacheProviderGet the processed transactions cache- Key - The unique transaction id
- Value - The transaction's commit or rollback system change number
- Returns:
- the processed transactions cache, never
null
-
getTransactionCacheMinimumScn
protected Scn getTransactionCacheMinimumScn()
Description copied from class:AbstractLogMinerEventProcessorGets the minimum system change number stored in the transaction cache.- Specified by:
getTransactionCacheMinimumScnin classAbstractLogMinerEventProcessor<InfinispanTransaction>- Returns:
- the minimum system change number, never
nullbut could beScn.NULL.
-
createCache
private <K,V> org.infinispan.Cache<K,V> createCache(String cacheName, OracleConnectorConfig connectorConfig, Field field)
-
-