@InterfaceAudience.LimitedPrivate(value="Replication") public class ChainWALEntryFilter extends Object implements WALEntryFilter
WALEntryFilter
which contains multiple filters and applies them
in chain orderModifier and Type | Field and Description |
---|---|
private WALCellFilter[] |
cellFilters |
private WALEntryFilter[] |
filters |
Constructor and Description |
---|
ChainWALEntryFilter(List<WALEntryFilter> filters) |
ChainWALEntryFilter(WALEntryFilter... filters) |
Modifier and Type | Method and Description |
---|---|
WAL.Entry |
filter(WAL.Entry entry)
Applies the filter, possibly returning a different Entry instance.
|
private void |
filterCells(WAL.Entry entry) |
void |
initCellFilters() |
private final WALEntryFilter[] filters
private WALCellFilter[] cellFilters
public ChainWALEntryFilter(WALEntryFilter... filters)
public ChainWALEntryFilter(List<WALEntryFilter> filters)
public void initCellFilters()
public WAL.Entry filter(WAL.Entry entry)
WALEntryFilter
Applies the filter, possibly returning a different Entry instance. If null is returned, the entry will be skipped.
Notice that you are free to modify the cell list of the give entry, but do not change the content of the cell, it may be used by others at the same time(and usually you can not modify a cell unless you cast it to the implementation class, which is not a good idea).
filter
in interface WALEntryFilter
entry
- Entry to filterprivate void filterCells(WAL.Entry entry)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.