Method Detail

adapt

Adapt the given filter. Implementers of this method should assume that
isFilterSupported has already been called with a result indicating it
is in fact supproted.
Adapt WhileMatchFilter as follow:
|
V
+--------+--------+
| |
| |
label('id-in') wrappedFilter.filter()
| |
| |
sink() +-----+-----+
+ | |
label('id-out') all()
| |
sink() |
+ v
The above implementation gives enough information from the server side to determine whether the
remaining rows should be filtered out. For each WhileMatchFilter instance, an unique ID
is generated for labeling. The input label is the unique ID suffixed by "-in" and the output
label is the unique ID suffixed by "-out". When wrappedFilter decides to filter out the
rest of rows, there is no out label ("id-out") applied in the output. In other words, when
there is a missing "id-out" for an input "id-in", WhileMatchFilter.filterAllRemaining() returns true. Since the server continues to send
result even though WhileMatchFilter.filterAllRemaining() returns true, we need to replace this WhileMatchFilter instance with a "block all" filter and rescan from the next row.