@ThreadSafe public class LogMinerMetrics extends io.debezium.metrics.Metrics implements LogMinerMetricsMXBean
| Modifier and Type | Field and Description |
|---|---|
private AtomicReference<Duration> |
averageLogMinerQueryDuration |
private AtomicReference<Duration> |
averageProcessedCapturedBatchDuration |
private AtomicInteger |
batchSize |
private AtomicInteger |
capturedDmlCount |
private AtomicReference<String[]> |
currentLogFileName |
private AtomicLong |
currentScn |
private static int |
DEFAULT_BATCH_SIZE |
private static int |
DEFAULT_SLEEP_TIME |
private AtomicReference<Duration> |
lastLogMinerQueryDuration |
private AtomicReference<Duration> |
lastProcessedCapturedBatchDuration |
private AtomicInteger |
logMinerQueryCount |
private static int |
MAX_BATCH_SIZE |
private static int |
MAX_SLEEP_TIME |
private AtomicInteger |
millisecondToSleepBetweenMiningQuery |
private static int |
MIN_BATCH_SIZE |
private static int |
MIN_SLEEP_TIME |
private AtomicInteger |
processedCapturedBatchCount |
private AtomicReference<String[]> |
redoLogStatus |
private static int |
SLEEP_TIME_INCREMENT |
private AtomicInteger |
switchCounter |
| Constructor and Description |
|---|
LogMinerMetrics(io.debezium.connector.common.CdcSourceTaskContext taskContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeSleepingTime(boolean increment)
change sleeping time
|
Long |
getAverageLogMinerQueryDuration() |
Long |
getAverageProcessedCapturedBatchDuration() |
int |
getBatchSize()
Maximum number of entries in Log Miner view to fetch.
|
int |
getCapturedDmlCount() |
String[] |
getCurrentRedoLogFileName()
Exposes current redo log file.
|
Long |
getCurrentScn()
Exposes current SCN in the database.
|
Long |
getLastLogMinerQueryDuration() |
Long |
getLastProcessedCapturedBatchDuration()
Log Miner view query returns number of captured DML , Commit and Rollback.
|
int |
getLogMinerQueryCount() |
Integer |
getMillisecondToSleepBetweenMiningQuery() |
int |
getProcessedCapturedBatchCount()
Log Miner view query returns number of captured DML , Commit and Rollback.
|
String[] |
getRedoLogStatus()
Exposes states of redo logs: current, active, inactive, unused ...
|
int |
getSwitchCounter()
fetches counter of redo switches for the last day.
|
void |
incrementCapturedDmlCount() |
void |
setBatchSize(int size)
this gives ability to manipulate number of entries in Log Miner view to fetch.
|
void |
setCurrentLogFileName(Set<String> names) |
void |
setCurrentScn(Long scn) |
private void |
setDurationMetrics(Duration duration,
AtomicReference<Duration> lastDuration,
AtomicInteger counter,
AtomicReference<Duration> averageDuration) |
void |
setLastLogMinerQueryDuration(Duration fetchDuration) |
void |
setMillisecondToSleepBetweenMiningQuery(Integer milliseconds)
sets number of milliseconds for connector to sleep before fetching another batch from the Log Miner view
|
void |
setProcessedCapturedBatchDuration(Duration processDuration) |
void |
setRedoLogStatus(Map<String,String> status) |
void |
setSwitchCount(int counter) |
String |
toString() |
private static final int MAX_SLEEP_TIME
private static final int DEFAULT_SLEEP_TIME
private static final int MIN_SLEEP_TIME
private static final int MIN_BATCH_SIZE
private static final int MAX_BATCH_SIZE
private static final int DEFAULT_BATCH_SIZE
private static final int SLEEP_TIME_INCREMENT
private final AtomicLong currentScn
private final AtomicInteger capturedDmlCount
private final AtomicReference<String[]> currentLogFileName
private final AtomicReference<String[]> redoLogStatus
private final AtomicInteger switchCounter
private final AtomicReference<Duration> lastLogMinerQueryDuration
private final AtomicReference<Duration> averageLogMinerQueryDuration
private final AtomicInteger logMinerQueryCount
private final AtomicReference<Duration> lastProcessedCapturedBatchDuration
private final AtomicInteger processedCapturedBatchCount
private final AtomicReference<Duration> averageProcessedCapturedBatchDuration
private final AtomicInteger batchSize
private final AtomicInteger millisecondToSleepBetweenMiningQuery
LogMinerMetrics(io.debezium.connector.common.CdcSourceTaskContext taskContext)
public void setCurrentScn(Long scn)
public void incrementCapturedDmlCount()
public void setSwitchCount(int counter)
public void setLastLogMinerQueryDuration(Duration fetchDuration)
public void setProcessedCapturedBatchDuration(Duration processDuration)
public Long getCurrentScn()
LogMinerMetricsMXBeangetCurrentScn in interface LogMinerMetricsMXBeanpublic int getCapturedDmlCount()
getCapturedDmlCount in interface LogMinerMetricsMXBeanpublic String[] getCurrentRedoLogFileName()
LogMinerMetricsMXBeangetCurrentRedoLogFileName in interface LogMinerMetricsMXBeanpublic String[] getRedoLogStatus()
LogMinerMetricsMXBeangetRedoLogStatus in interface LogMinerMetricsMXBeanpublic int getSwitchCounter()
LogMinerMetricsMXBeangetSwitchCounter in interface LogMinerMetricsMXBeanpublic Long getLastLogMinerQueryDuration()
getLastLogMinerQueryDuration in interface LogMinerMetricsMXBeanpublic Long getAverageLogMinerQueryDuration()
getAverageLogMinerQueryDuration in interface LogMinerMetricsMXBeanpublic Long getLastProcessedCapturedBatchDuration()
LogMinerMetricsMXBeangetLastProcessedCapturedBatchDuration in interface LogMinerMetricsMXBeanpublic int getLogMinerQueryCount()
getLogMinerQueryCount in interface LogMinerMetricsMXBeanpublic int getProcessedCapturedBatchCount()
LogMinerMetricsMXBeangetProcessedCapturedBatchCount in interface LogMinerMetricsMXBeanpublic Long getAverageProcessedCapturedBatchDuration()
getAverageProcessedCapturedBatchDuration in interface LogMinerMetricsMXBeanpublic int getBatchSize()
LogMinerMetricsMXBeangetBatchSize in interface LogMinerMetricsMXBeanpublic Integer getMillisecondToSleepBetweenMiningQuery()
getMillisecondToSleepBetweenMiningQuery in interface LogMinerMetricsMXBeanpublic void setBatchSize(int size)
LogMinerMetricsMXBeansetBatchSize in interface LogMinerMetricsMXBeansize - limitpublic void setMillisecondToSleepBetweenMiningQuery(Integer milliseconds)
LogMinerMetricsMXBeansetMillisecondToSleepBetweenMiningQuery in interface LogMinerMetricsMXBeanmilliseconds - to sleeppublic void changeSleepingTime(boolean increment)
LogMinerMetricsMXBeanchangeSleepingTime in interface LogMinerMetricsMXBeanincrement - true to add, false to deductprivate void setDurationMetrics(Duration duration, AtomicReference<Duration> lastDuration, AtomicInteger counter, AtomicReference<Duration> averageDuration)
Copyright © 2020 JBoss by Red Hat. All rights reserved.