Class RecordFilterChainImpl
- java.lang.Object
-
- org.nuxeo.lib.stream.computation.internals.RecordFilterChainImpl
-
- All Implemented Interfaces:
RecordFilter
,RecordFilterChain
public class RecordFilterChainImpl extends Object implements RecordFilterChain
Chains multiple record filters.- Since:
- 11.1
-
-
Field Summary
Fields Modifier and Type Field Description protected Deque<RecordFilter>
filters
static RecordFilterChain
NONE
-
Constructor Summary
Constructors Constructor Description RecordFilterChainImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordFilterChain
addFilter(RecordFilter filter)
void
afterAppend(Record record, LogOffset offset)
Called after a record is appended to a stream.Record
afterRead(Record record, LogOffset offset)
Called after reading a record.Record
beforeAppend(Record record)
Called before appending a record to a stream.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.lib.stream.computation.RecordFilter
init
-
-
-
-
Field Detail
-
NONE
public static final RecordFilterChain NONE
-
filters
protected final Deque<RecordFilter> filters
-
-
Method Detail
-
addFilter
public RecordFilterChain addFilter(RecordFilter filter)
- Specified by:
addFilter
in interfaceRecordFilterChain
-
beforeAppend
public Record beforeAppend(Record record)
Description copied from interface:RecordFilter
Called before appending a record to a stream. This hook enables to change the record or to skip it when returning null.- Specified by:
beforeAppend
in interfaceRecordFilter
- Parameters:
record
- the record that will be appended to a stream
-
afterAppend
public void afterAppend(Record record, LogOffset offset)
Description copied from interface:RecordFilter
Called after a record is appended to a stream.- Specified by:
afterAppend
in interfaceRecordFilter
- Parameters:
record
- the written recordoffset
- the record's offset
-
afterRead
public Record afterRead(Record record, LogOffset offset)
Description copied from interface:RecordFilter
Called after reading a record. This hook enables to change the record or to skip it when returning null.- Specified by:
afterRead
in interfaceRecordFilter
- Parameters:
record
- the recordoffset
- the offset of the record
-
-