public class BinaryLogClientStatistics extends Object implements BinaryLogClientStatisticsMXBean, BinaryLogClient.EventListener, BinaryLogClient.LifecycleListener
Constructor and Description |
---|
BinaryLogClientStatistics() |
BinaryLogClientStatistics(BinaryLogClient binaryLogClient) |
Modifier and Type | Method and Description |
---|---|
protected long |
getCurrentTimeMillis() |
String |
getLastEvent() |
long |
getNumberOfDisconnects() |
long |
getNumberOfSkippedEvents() |
long |
getSecondsBehindMaster() |
long |
getSecondsSinceLastEvent() |
long |
getTotalNumberOfEventsSeen() |
void |
onCommunicationFailure(BinaryLogClient client,
Exception ex)
It's guarantied to be called before
BinaryLogClient.LifecycleListener.onDisconnect(BinaryLogClient) ) in case of
communication failure. |
void |
onConnect(BinaryLogClient client)
Called once client has successfully logged in but before started to receive binlog events.
|
void |
onDisconnect(BinaryLogClient client)
Called upon disconnect (regardless of the reason).
|
void |
onEvent(Event event) |
void |
onEventDeserializationFailure(BinaryLogClient client,
Exception ex)
Called in case of failed event deserialization.
|
void |
reset() |
public BinaryLogClientStatistics()
public BinaryLogClientStatistics(BinaryLogClient binaryLogClient)
public String getLastEvent()
getLastEvent
in interface BinaryLogClientStatisticsMXBean
public long getSecondsSinceLastEvent()
getSecondsSinceLastEvent
in interface BinaryLogClientStatisticsMXBean
public long getSecondsBehindMaster()
getSecondsBehindMaster
in interface BinaryLogClientStatisticsMXBean
public long getTotalNumberOfEventsSeen()
getTotalNumberOfEventsSeen
in interface BinaryLogClientStatisticsMXBean
public long getNumberOfSkippedEvents()
getNumberOfSkippedEvents
in interface BinaryLogClientStatisticsMXBean
public long getNumberOfDisconnects()
getNumberOfDisconnects
in interface BinaryLogClientStatisticsMXBean
public void reset()
reset
in interface BinaryLogClientStatisticsMXBean
public void onEvent(Event event)
onEvent
in interface BinaryLogClient.EventListener
public void onEventDeserializationFailure(BinaryLogClient client, Exception ex)
BinaryLogClient.LifecycleListener
onEventDeserializationFailure
in interface BinaryLogClient.LifecycleListener
public void onDisconnect(BinaryLogClient client)
BinaryLogClient.LifecycleListener
onDisconnect
in interface BinaryLogClient.LifecycleListener
public void onConnect(BinaryLogClient client)
BinaryLogClient.LifecycleListener
onConnect
in interface BinaryLogClient.LifecycleListener
public void onCommunicationFailure(BinaryLogClient client, Exception ex)
BinaryLogClient.LifecycleListener
BinaryLogClient.LifecycleListener.onDisconnect(BinaryLogClient)
) in case of
communication failure.onCommunicationFailure
in interface BinaryLogClient.LifecycleListener
protected long getCurrentTimeMillis()
Copyright © 2017. All rights reserved.