Package io.debezium.data
Class SourceRecordStats
- java.lang.Object
-
- io.debezium.data.SourceRecordStats
-
-
Field Summary
Fields Modifier and Type Field Description private AtomicLongEMPTYprivate EnumMap<io.debezium.data.Envelope.Operation,AtomicLong>statsByOperationprivate AtomicLongtombstones
-
Constructor Summary
Constructors Constructor Description SourceRecordStats()Create a new statistics object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(org.apache.kafka.connect.source.SourceRecord record)longnumberOf(io.debezium.data.Envelope.Operation op)Get the number ofaddedrecords that had the givenEnvelope.Operation.longnumberOfCreates()Get the number ofCREATErecords that wereaddedto this object.longnumberOfDeletes()Get the number ofDELETErecords that wereaddedto this object.longnumberOfReads()Get the number ofREADrecords that wereaddedto this object.longnumberOfTombstones()Get the number of tombstone records that wereaddedto this object.longnumberOfUpdates()Get the number ofUPDATErecords that wereaddedto this object.SourceRecordStatsreset()Reset all of the counters to 0.StringtoString()
-
-
-
Field Detail
-
EMPTY
private final AtomicLong EMPTY
-
statsByOperation
private final EnumMap<io.debezium.data.Envelope.Operation,AtomicLong> statsByOperation
-
tombstones
private final AtomicLong tombstones
-
-
Method Detail
-
accept
public void accept(org.apache.kafka.connect.source.SourceRecord record)
-
numberOf
public long numberOf(io.debezium.data.Envelope.Operation op)
Get the number ofaddedrecords that had the givenEnvelope.Operation.- Parameters:
op- the operation for which the record count is to be returned- Returns:
- the count; never negative
-
numberOfCreates
public long numberOfCreates()
Get the number ofCREATErecords that wereaddedto this object.- Returns:
- the count; never negative
-
numberOfDeletes
public long numberOfDeletes()
Get the number ofDELETErecords that wereaddedto this object.- Returns:
- the count; never negative
-
numberOfReads
public long numberOfReads()
Get the number ofREADrecords that wereaddedto this object.- Returns:
- the count; never negative
-
numberOfUpdates
public long numberOfUpdates()
Get the number ofUPDATErecords that wereaddedto this object.- Returns:
- the count; never negative
-
numberOfTombstones
public long numberOfTombstones()
Get the number of tombstone records that wereaddedto this object.- Returns:
- the count; never negative
-
reset
public SourceRecordStats reset()
Reset all of the counters to 0.- Returns:
- this object for method chaining purposes; never null
-
-