Class DefaultChangeStreamRecordAdapter
java.lang.Object
com.google.cloud.bigtable.data.v2.models.DefaultChangeStreamRecordAdapter
- All Implemented Interfaces:
ChangeStreamRecordAdapter<ChangeStreamRecord>
@InternalApi
public class DefaultChangeStreamRecordAdapter
extends Object
implements ChangeStreamRecordAdapter<ChangeStreamRecord>
Default implementation of a
ChangeStreamRecordAdapter
that uses ChangeStreamRecord
s to represent change stream records.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter
ChangeStreamRecordAdapter.ChangeStreamRecordBuilder<ChangeStreamRecordT>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of aChangeStreamRecordAdapter.ChangeStreamRecordBuilder
.Get the token from the given ChangeStreamMutation record.Get the token from the given Heartbeat record.boolean
Checks if the given change stream record is a ChangeStreamMutation.boolean
isHeartbeat
(ChangeStreamRecord record) Checks if the given change stream record is a Heartbeat.
-
Constructor Details
-
DefaultChangeStreamRecordAdapter
public DefaultChangeStreamRecordAdapter()
-
-
Method Details
-
createChangeStreamRecordBuilder
public ChangeStreamRecordAdapter.ChangeStreamRecordBuilder<ChangeStreamRecord> createChangeStreamRecordBuilder()Creates a new instance of aChangeStreamRecordAdapter.ChangeStreamRecordBuilder
.- Specified by:
createChangeStreamRecordBuilder
in interfaceChangeStreamRecordAdapter<ChangeStreamRecord>
-
isHeartbeat
Checks if the given change stream record is a Heartbeat.- Specified by:
isHeartbeat
in interfaceChangeStreamRecordAdapter<ChangeStreamRecord>
-
getTokenFromHeartbeat
Get the token from the given Heartbeat record. If the given record is not a Heartbeat, it will throw an Exception.- Specified by:
getTokenFromHeartbeat
in interfaceChangeStreamRecordAdapter<ChangeStreamRecord>
-
isChangeStreamMutation
Checks if the given change stream record is a ChangeStreamMutation.- Specified by:
isChangeStreamMutation
in interfaceChangeStreamRecordAdapter<ChangeStreamRecord>
-
getTokenFromChangeStreamMutation
Get the token from the given ChangeStreamMutation record. If the given record is not a ChangeStreamMutation, it will throw an Exception.- Specified by:
getTokenFromChangeStreamMutation
in interfaceChangeStreamRecordAdapter<ChangeStreamRecord>
-