Class LobWriteEventAdapter


  • @ProtoAdapter(LobWriteEvent.class)
    public class LobWriteEventAdapter
    extends LogMinerEventAdapter
    An Infinispan ProtoStream adapter to marshall LobWriteEvent instances. This class defines a factory for creating LobWriteEvent instances when hydrating records from the persisted datastore asa 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 LobWriteEvent {
             // structure of the super type, LogMinerEventAdapter
             string data = 7;
         }
     
    Author:
    Chris Cranford
    • Constructor Detail

      • LobWriteEventAdapter

        public LobWriteEventAdapter()
    • Method Detail

      • factory

        @ProtoFactory
        public LobWriteEvent factory​(int eventType,
                                     String scn,
                                     String tableId,
                                     String rowId,
                                     String rsId,
                                     String changeTime,
                                     String data,
                                     int offset,
                                     int length)
        A ProtoStream factory that creates LobWriteEvent 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
        data - the LOB data
        offset - the LOB data offset (0-based)
        length - the LOB data length
        Returns:
        the constructed DmlEvent
      • getData

        @ProtoField(number=7)
        public String getData​(LobWriteEvent event)
        A ProtoStream handler to extract the data field from a LobWriteEvent type.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the data to be written for a LOB field, may be null
      • getOffset

        @ProtoField(number=8,
                    required=true)
        public int getOffset​(LobWriteEvent event)
        A ProtoStream handler to extract the offset field from a LobWriteEvent type.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the offset of the data to be written for a LOB field
      • getLength

        @ProtoField(number=9,
                    required=true)
        public int getLength​(LobWriteEvent event)
        A ProtoStream handler to extract the length field from a LobWriteEvent type.
        Parameters:
        event - the event instance, must not be null
        Returns:
        the length of the data to be written for a LOB field