com.bigdata.sparse
Class AtomicRowFilter

java.lang.Object
  extended by cutthecrap.utils.striterators.FilterBase
      extended by com.bigdata.btree.filter.TupleTransformer<TPS.TPV,TPS>
          extended by com.bigdata.sparse.AtomicRowFilter
All Implemented Interfaces:
ITupleFilter<TPS>, IRowStoreConstants, IFilter, IPropertySet, Serializable, Cloneable

public class AtomicRowFilter
extends TupleTransformer<TPS.TPV,TPS>
implements IRowStoreConstants

Transforms an ITupleIterator reading directly on an IIndex backing a SparseRowStore into an ITupleIterator visiting logical ITPS rows.

Version:
$Id: AtomicRowFilter.java 3651 2010-09-28 10:59:12Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form
TODO:
Look at the remove semantics for the sparse row store. This would have to delete the logical row, or at least all property values that were materialized from the logical row. in fact, since this is a many:one transform, we must override the remove() impl for the inner class on TupleTransformer., You could replace the AtomicRowRead with this iterator by setting the capacity to ONE (1). However, that will do more work when we are only trying to read a single row on a local index since we will have to serialize and then de-serialize the TPS for that logical row. (For a remote read the effort should be the same).

Field Summary
protected static org.apache.log4j.Logger log
           
 
Fields inherited from class com.bigdata.btree.filter.TupleTransformer
tupleSer
 
Fields inherited from interface com.bigdata.sparse.IRowStoreConstants
AUTO_TIMESTAMP, AUTO_TIMESTAMP_UNIQUE, CURRENT_ROW, MAX_TIMESTAMP, MIN_TIMESTAMP
 
Constructor Summary
protected AtomicRowFilter(Schema schema, long fromTime, long toTime, INameFilter nameFilter)
           
 
Method Summary
protected  ITupleIterator<TPS> newTransformer(LookaheadTupleFilter.ILookaheadTupleIterator<TPS.TPV> src, Object context)
          Method responsible for creating a new instance of the iterator that reads from the lookahead source whose tuples are of the source type and visits the transformed tuples.
 
Methods inherited from class com.bigdata.btree.filter.TupleTransformer
filterOnce
 
Methods inherited from class cutthecrap.utils.striterators.FilterBase
addFilter, filter, getProperty, getRequiredProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cutthecrap.utils.striterators.IFilter
filter
 
Methods inherited from interface cutthecrap.utils.striterators.IPropertySet
getProperty
 

Field Detail

log

protected static final transient org.apache.log4j.Logger log
Constructor Detail

AtomicRowFilter

protected AtomicRowFilter(Schema schema,
                          long fromTime,
                          long toTime,
                          INameFilter nameFilter)
Parameters:
schema - The schema governing the row.
fromTime - The first timestamp for which timestamped property values will be accepted.
toTime - The first timestamp for which timestamped property values will NOT be accepted -or- IRowStoreConstants.CURRENT_ROW to accept only the most current binding whose timestamp is GTE fromTime.
nameFilter - An optional filter used to select the values for property names accepted by that filter.
Method Detail

newTransformer

protected ITupleIterator<TPS> newTransformer(LookaheadTupleFilter.ILookaheadTupleIterator<TPS.TPV> src,
                                             Object context)
Description copied from class: TupleTransformer
Method responsible for creating a new instance of the iterator that reads from the lookahead source whose tuples are of the source type and visits the transformed tuples.

Specified by:
newTransformer in class TupleTransformer<TPS.TPV,TPS>


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.