Class LogMinerEventAdapter
java.lang.Object
io.debezium.connector.oracle.logminer.processor.infinispan.marshalling.LogMinerEventAdapter
- Direct Known Subclasses:
DmlEventAdapter,LobEraseEventAdapter,LobWriteEventAdapter,TruncateEventAdapter,XmlEndEventAdapter,XmlWriteEventAdapter
An Infinispan ProtoStream adapter to marshall
LogMinerEvent instances.
This class defines a factory for creating LogMinerEvent instances 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 -
Method Summary
Modifier and TypeMethodDescriptionA ProtoStream factory that createsLogMinerEventinstances.getChangeTime(LogMinerEvent event) A ProtoStream handler to extract thechangeTimefield from theLogMinerEvent.intgetEventType(LogMinerEvent event) A ProtoStream handler to extract theeventTypefield from theLogMinerEvent.getRowId(LogMinerEvent event) A ProtoStream handler to extract therowIdfield from theLogMinerEvent.getRsId(LogMinerEvent event) A ProtoStream handler to extract thersIdfield from theLogMinerEvent.getScn(LogMinerEvent event) A ProtoStream handler to extract thescnfield from theLogMinerEvent.getTableId(LogMinerEvent event) A ProtoStream handler to extract thetableIdfield from theLogMinerEvent.
-
Constructor Details
-
LogMinerEventAdapter
public LogMinerEventAdapter()
-
-
Method Details
-
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
A ProtoStream handler to extract theeventTypefield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the event type's numerical representation
-
getScn
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
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
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
A ProtoStream handler to extract thersIdfield from theLogMinerEvent.- Parameters:
event- the event instance, must not benull- Returns:
- the rollback segment identifier, never
null
-
getChangeTime
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
-