com.bigdata.btree.filter
Class Advancer<E>
java.lang.Object
com.bigdata.btree.filter.Advancer<E>
- Type Parameters:
E - The type of the objects visited by the source iterator.
- All Implemented Interfaces:
- ITupleFilter<E>, cutthecrap.utils.striterators.IFilter, Serializable
- Direct Known Subclasses:
- DistinctTermAdvancer
public abstract class Advancer<E>
- extends Object
- implements ITupleFilter<E>
Used to write logic that advances an ITupleCursor to another key
after it visits some element. For example, the "distinct term scan" for
the RDF DB is written in this manner.
- Version:
- $Id: Advancer.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
- See Also:
- Serialized Form
- TODO:
- write test for remove(). in order for remove() to work we must note
the key for the last visited tuple and then issue remove(key)
against the underlying index.
|
Field Summary |
protected static boolean |
INFO
|
protected static org.apache.log4j.Logger |
log
|
protected ITupleCursor<E> |
src
Set by #filter(ITupleCursor). |
|
Constructor Summary |
protected |
Advancer()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final transient org.apache.log4j.Logger log
INFO
protected static final transient boolean INFO
src
protected ITupleCursor<E> src
- Set by
#filter(ITupleCursor).
Advancer
protected Advancer()
filter
public final ITupleIterator<E> filter(Iterator src)
- Description copied from interface:
ITupleFilter
- Strengthened return type.
- Specified by:
filter in interface ITupleFilter<E>- Specified by:
filter in interface cutthecrap.utils.striterators.IFilter
- Parameters:
src - The source iterator (MUST be an ITupleCursor).
- Returns:
advance
protected abstract void advance(ITuple<E> tuple)
- Offers an opportunity to advance the source
ITupleCursor to a
new key using {@link ITupleCursor#seek(byte[]).
- Parameters:
tuple - The current value.
Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.