Class LogMinerEventAdapter
- java.lang.Object
-
- io.debezium.connector.oracle.logminer.processor.infinispan.marshalling.LogMinerEventAdapter
-
- Direct Known Subclasses:
DmlEventAdapter,LobEraseEventAdapter,LobWriteEventAdapter,TruncateEventAdapter
@ProtoAdapter(LogMinerEvent.class) public class LogMinerEventAdapter extends Object
An Infinispan ProtoStream adapter to marshallLogMinerEventinstances. This class defines a factory for creatingLogMinerEventinstances when hydrating records from the persisted event datastore as well as field handlers to extract values to be marshalled to the protocol buffer stream. The underlying protocol buffer record consists of the following structure:message LogMinerEvent { required int32 eventType = 1; required string scn = 2; required string tableId = 3; required string rowId = 4; required object rsId = 5; required string changeTime = 6; }- Author:
- Chris Cranford
-
-
Constructor Summary
Constructors Constructor Description LogMinerEventAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogMinerEventfactory(int eventType, String scn, String tableId, String rowId, String rsId, String changeTime)A ProtoStream factory that createsLogMinerEventinstances.StringgetChangeTime(LogMinerEvent event)A ProtoStream handler to extract thechangeTimefield from theLogMinerEvent.intgetEventType(LogMinerEvent event)A ProtoStream handler to extract theeventTypefield from theLogMinerEvent.StringgetRowId(LogMinerEvent event)A ProtoStream handler to extract therowIdfield from theLogMinerEvent.StringgetRsId(LogMinerEvent event)A ProtoStream handler to extract thersIdfield from theLogMinerEvent.StringgetScn(LogMinerEvent event)A ProtoStream handler to extract thescnfield from theLogMinerEvent.StringgetTableId(LogMinerEvent event)A ProtoStream handler to extract thetableIdfield from theLogMinerEvent.
-
-
-
Method Detail
-
factory
@ProtoFactory public LogMinerEvent factory(int eventType, String scn, String tableId, String rowId, String rsId, String changeTime)
A ProtoStream factory that createsLogMinerEventinstances.- Parameters:
eventType- the event typescn- the system change number, must not benulltableId- the fully-qualified table namerowId- the Oracle row-id the change is associated withrsId- the Oracle rollback segment identifierchangeTime- the time the change occurred- Returns:
- the constructed DmlEvent
-
getEventType
@ProtoField(number=1, required=true) public int getEventType(LogMinerEvent event)A ProtoStream handler to extract theeventTypefield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the event type's numerical representation
-
getScn
@ProtoField(number=2, required=true) public String getScn(LogMinerEvent event)A ProtoStream handler to extract thescnfield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the event's system change number represented as a string
-
getTableId
@ProtoField(number=3, required=true) public String getTableId(LogMinerEvent event)A ProtoStream handler to extract thetableIdfield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the event's table identifier represented as a string
-
getRowId
@ProtoField(number=4, required=true) public String getRowId(LogMinerEvent event)A ProtoStream handler to extract therowIdfield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the event's row identifier, never
null
-
getRsId
@ProtoField(number=5, required=true) public String getRsId(LogMinerEvent event)A ProtoStream handler to extract thersIdfield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the rollback segment identifier, never
null
-
getChangeTime
@ProtoField(number=6, required=true) public String getChangeTime(LogMinerEvent event)A ProtoStream handler to extract thechangeTimefield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the time when the event occurred as a string, never
null
-
-