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
Modifier and TypeMethodDescriptiondefault void
afterAppend
(Record record, LogOffset offset) Called after a record is appended to a stream.default Record
Called after reading a record.default Record
beforeAppend
(Record record) Called before appending a record to a stream.default void
Initialiaze the filter.
-
Method Details
-
init
Initialiaze the filter. -
beforeAppend
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
Called after a record is appended to a stream.- Parameters:
record
- the written recordoffset
- the record's offset
-
afterRead
Called after reading a record. This hook enables to change the record or to skip it when returning null.- Parameters:
record
- the recordoffset
- the offset of the record
-