class BinlogReaderMetrics extends Metrics implements BinlogReaderMetricsMXBean
| Modifier and Type | Field and Description |
|---|---|
private com.github.shyiko.mysql.binlog.BinaryLogClient |
client |
private AtomicBoolean |
isGtidModeEnabled |
private AtomicReference<String> |
lastTransactionId |
private AtomicLong |
numberOfCommittedTransactions |
private AtomicLong |
numberOfLargeTransactions |
private AtomicLong |
numberOfNotWellFormedTransactions |
private AtomicLong |
numberOfRolledBackTransactions |
private MySqlSchema |
schema |
private com.github.shyiko.mysql.binlog.jmx.BinaryLogClientStatistics |
stats |
clock, lastEventTimestamp, metadataProvider, taskContext, totalNumberOfEventsSeenNO_OP| Constructor and Description |
|---|
BinlogReaderMetrics(com.github.shyiko.mysql.binlog.BinaryLogClient client,
MySqlTaskContext taskContext,
String name,
ChangeEventQueueMetrics changeEventQueueMetrics) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBinlogFilename()
Name of the current MySQL binlog file being read by underlying mysql-binlog-client.
|
long |
getBinlogPosition()
Current MySQL binlog offset position being read by underlying mysql-binlog-client.
|
String |
getGtidSet()
Current MySQL Gtid being read by underlying mysql-binlog-client.
|
boolean |
getIsGtidModeEnabled()
Tracks if the connector is running using Gtids to track current offset.
|
String |
getLastEvent() |
String |
getLastTransactionId() |
long |
getMilliSecondsBehindSource() |
long |
getMilliSecondsSinceLastEvent() |
String[] |
getMonitoredTables() |
long |
getNumberOfCommittedTransactions()
Tracks the number of committed transactions.
|
long |
getNumberOfDisconnects()
Tracks the number of times the underlying mysql-binlog-client has been disconnected from MySQL.
|
long |
getNumberOfLargeTransactions()
Tracks the number of transaction which contains events that contained more entries than could be contained
within the connectors
EventBuffer instance. |
long |
getNumberOfNotWellFormedTransactions()
Tracks the number of transactions which are not well-formed.
|
long |
getNumberOfRolledBackTransactions()
Tracks the number of rolled back transactions.
|
long |
getNumberOfSkippedEvents()
Tracks the number of events skipped by underlying mysql-binlog-client, generally due to the client
being unable to properly deserialize the event.
|
long |
getSecondsBehindMaster()
Tracks the number of seconds between "now" and when the last processed MySQL binlog event was originally written
to the MySQL server.
|
long |
getSecondsSinceLastEvent()
Tracks the number of seconds since last MySQL binlog event was processed by underlying mysql-binlog-client.
|
Map<String,String> |
getSourceEventPosition() |
long |
getTotalNumberOfEventsSeen() |
boolean |
isConnected() |
void |
onCommittedTransaction() |
void |
onGtidChange(String gtid) |
void |
onLargeTransaction() |
void |
onNotWellFormedTransaction() |
void |
onRolledBackTransaction() |
void |
reset() |
void |
setIsGtidModeEnabled(boolean enabled) |
getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, onEvent, onFilteredEvent, register, unregisterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacityprivate final com.github.shyiko.mysql.binlog.BinaryLogClient client
private final com.github.shyiko.mysql.binlog.jmx.BinaryLogClientStatistics stats
private final MySqlSchema schema
private final AtomicLong numberOfCommittedTransactions
private final AtomicLong numberOfRolledBackTransactions
private final AtomicLong numberOfNotWellFormedTransactions
private final AtomicLong numberOfLargeTransactions
private final AtomicBoolean isGtidModeEnabled
private final AtomicReference<String> lastTransactionId
public BinlogReaderMetrics(com.github.shyiko.mysql.binlog.BinaryLogClient client,
MySqlTaskContext taskContext,
String name,
ChangeEventQueueMetrics changeEventQueueMetrics)
public boolean isConnected()
isConnected in interface StreamingChangeEventSourceMetricsMXBeanpublic String getBinlogFilename()
BinlogReaderMetricsMXBeangetBinlogFilename in interface BinlogReaderMetricsMXBeanpublic long getBinlogPosition()
BinlogReaderMetricsMXBeangetBinlogPosition in interface BinlogReaderMetricsMXBeanpublic String getGtidSet()
BinlogReaderMetricsMXBeangetGtidSet in interface BinlogReaderMetricsMXBeanpublic boolean getIsGtidModeEnabled()
BinlogReaderMetricsMXBeangetIsGtidModeEnabled in interface BinlogReaderMetricsMXBeanpublic String getLastEvent()
getLastEvent in interface ChangeEventSourceMetricsMXBeangetLastEvent in class Metricspublic long getSecondsSinceLastEvent()
BinlogReaderMetricsMXBeangetSecondsSinceLastEvent in interface BinlogReaderMetricsMXBeanpublic long getMilliSecondsSinceLastEvent()
getMilliSecondsSinceLastEvent in interface ChangeEventSourceMetricsMXBeangetMilliSecondsSinceLastEvent in class Metricspublic long getSecondsBehindMaster()
BinlogReaderMetricsMXBeangetSecondsBehindMaster in interface BinlogReaderMetricsMXBeanpublic long getTotalNumberOfEventsSeen()
getTotalNumberOfEventsSeen in interface ChangeEventSourceMetricsMXBeangetTotalNumberOfEventsSeen in class Metricspublic long getNumberOfSkippedEvents()
BinlogReaderMetricsMXBeangetNumberOfSkippedEvents in interface BinlogReaderMetricsMXBeanpublic long getNumberOfDisconnects()
BinlogReaderMetricsMXBeangetNumberOfDisconnects in interface BinlogReaderMetricsMXBeanpublic void reset()
reset in interface ChangeEventSourceMetricsMXBeanreset in class Metricspublic long getNumberOfCommittedTransactions()
BinlogReaderMetricsMXBeangetNumberOfCommittedTransactions in interface BinlogReaderMetricsMXBeangetNumberOfCommittedTransactions in interface StreamingChangeEventSourceMetricsMXBeanpublic long getNumberOfRolledBackTransactions()
BinlogReaderMetricsMXBeangetNumberOfRolledBackTransactions in interface BinlogReaderMetricsMXBeanpublic long getNumberOfNotWellFormedTransactions()
BinlogReaderMetricsMXBeangetNumberOfNotWellFormedTransactions in interface BinlogReaderMetricsMXBeanpublic long getNumberOfLargeTransactions()
BinlogReaderMetricsMXBeanEventBuffer instance.getNumberOfLargeTransactions in interface BinlogReaderMetricsMXBeanpublic void onCommittedTransaction()
public void onRolledBackTransaction()
public void onNotWellFormedTransaction()
public void onLargeTransaction()
public void onGtidChange(String gtid)
public void setIsGtidModeEnabled(boolean enabled)
public String[] getMonitoredTables()
getMonitoredTables in interface ChangeEventSourceMetricsMXBeanpublic long getMilliSecondsBehindSource()
getMilliSecondsBehindSource in interface StreamingChangeEventSourceMetricsMXBeanpublic Map<String,String> getSourceEventPosition()
getSourceEventPosition in interface StreamingChangeEventSourceMetricsMXBeanpublic String getLastTransactionId()
getLastTransactionId in interface StreamingChangeEventSourceMetricsMXBeanCopyright © 2019 JBoss by Red Hat. All rights reserved.