public abstract class DistinctFilter<E> extends Object implements IChunkConverter<E,E>
ISolutions generated by an
IRule. The filter is optimized if only a single chunk is visited by the source iterator. Otherwise, the filter is implemented using a
BTreebacked by a
When more than one chunk is processed,
ISolutions are transformed
into unsigned byte keys. The
BTree is tested for each such key. If
the key is NOT found, then it is inserted into the
BTree and the
solution is passed by the filter. Otherwise the solution is rejected by the
filter. The backing
BTree is closed when the filter is finalized, but
it will hold a hard reference to the
TemporaryStore until then.
Solutions are processed in chunks for efficient ordered reads and writes on
|Constructor and Description|
|Modifier and Type||Method and Description|
Convert the next chunk of element(s) from the source iterator into target element(s).
Return an unsigned byte key that is a representation of the visited element.
public E convert(IChunkedOrderedIterator<E> src)
Note: This method will only be invoked if
for the source iterator.
Note: Iterators are single-threaded so the implementation of this method does not need to be thread-safe.
protected abstract byte getSortKey(E e)
e- The visited element.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.