Interface RecordFilter

All Known Subinterfaces:
RecordFilterChain
All Known Implementing Classes:
BaseOverflowRecordFilter, KeyValueStoreOverflowRecordFilter, NoFilterChain, RecordFilterChainImpl, TransientStoreOverflowRecordFilter

public interface RecordFilter
Record filtering enables to modify/skip record while it is append or read from a stream. Filter can also be used to add custom code.
Since:
11.1
  • Method Details

    • init

      default void init(Map<String,String> options)
      Initialiaze the filter.
    • beforeAppend

      default Record beforeAppend(Record record)
      Called before appending a record to a stream. This hook enables to change the record or to skip it when returning null.
      Parameters:
      record - the record that will be appended to a stream
    • afterAppend

      default void afterAppend(Record record, LogOffset offset)
      Called after a record is appended to a stream.
      Parameters:
      record - the written record
      offset - the record's offset
    • afterRead

      default Record afterRead(Record record, LogOffset offset)
      Called after reading a record. This hook enables to change the record or to skip it when returning null.
      Parameters:
      record - the record
      offset - the offset of the record