Package org.nuxeo.lib.stream.computation
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 Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
afterAppend(Record record, LogOffset offset)
Called after a record is appended to a stream.default Record
afterRead(Record record, LogOffset offset)
Called after reading a record.default Record
beforeAppend(Record record)
Called before appending a record to a stream.default void
init(Map<String,String> options)
Initialiaze the filter.
-
-
-
Method Detail
-
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 recordoffset
- the record's offset
-
-