Class LogMinerEventAdapter

  • Direct Known Subclasses:
    DmlEventAdapter, LobEraseEventAdapter, LobWriteEventAdapter, TruncateEventAdapter

    @ProtoAdapter(LogMinerEvent.class)
    public class LogMinerEventAdapter
    extends Object
    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 Detail

      • LogMinerEventAdapter

        public LogMinerEventAdapter()
    • Method Detail

      • factory

        @ProtoFactory
        public LogMinerEvent factory​(int eventType,
                                     String scn,
                                     String tableId,
                                     String rowId,
                                     String rsId,
                                     String changeTime)
        A ProtoStream factory that creates LogMinerEvent instances.
        Parameters:
        eventType - the event type
        scn - the system change number, must not be null
        tableId - the fully-qualified table name
        rowId - the Oracle row-id the change is associated with
        rsId - the Oracle rollback segment identifier
        changeTime - 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 the eventType field from the LogMinerEvent.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the event type's numerical representation
      • getScn

        @ProtoField(number=2,
                    required=true)
        public String getScn​(LogMinerEvent event)
        A ProtoStream handler to extract the scn field from the LogMinerEvent.
        Parameters:
        event - the event instance, must not be null
        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 the tableId field from the LogMinerEvent.
        Parameters:
        event - the event instance, must not be null
        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 the rowId field from the LogMinerEvent.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the event's row identifier, never null
      • getRsId

        @ProtoField(number=5,
                    required=true)
        public String getRsId​(LogMinerEvent event)
        A ProtoStream handler to extract the rsId field from the LogMinerEvent.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the rollback segment identifier, never null
      • getChangeTime

        @ProtoField(number=6,
                    required=true)
        public String getChangeTime​(LogMinerEvent event)
        A ProtoStream handler to extract the changeTime field from the LogMinerEvent.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the time when the event occurred as a string, never null