com.bigdata.sparse
Class AtomicRowRead

java.lang.Object
  extended by com.bigdata.btree.proc.AbstractIndexProcedure
      extended by com.bigdata.sparse.AbstractAtomicRowReadOrWrite
          extended by com.bigdata.sparse.AtomicRowRead
All Implemented Interfaces:
IIndexProcedure, ISimpleIndexProcedure, IRowStoreConstants, Externalizable, Serializable

public class AtomicRowRead
extends AbstractAtomicRowReadOrWrite

Atomic read of the logical row associated with some Schema and primary key.

Version:
$Id: AtomicRowRead.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bigdata.sparse.AbstractAtomicRowReadOrWrite
DEBUG, filter, fromTime, INFO, log, primaryKey, schema, toTime
 
Fields inherited from interface com.bigdata.sparse.IRowStoreConstants
AUTO_TIMESTAMP, AUTO_TIMESTAMP_UNIQUE, CURRENT_ROW, MAX_TIMESTAMP, MIN_TIMESTAMP
 
Constructor Summary
AtomicRowRead()
          De-serialization ctor.
AtomicRowRead(Schema schema, Object primaryKey, long fromTime, long toTime, INameFilter filter)
          Constructor for an atomic read operation.
 
Method Summary
 TPS apply(IIndex ndx)
          Atomic read.
 boolean isReadOnly()
          Return true iff the procedure asserts that it will not write on the index.
 
Methods inherited from class com.bigdata.sparse.AbstractAtomicRowReadOrWrite
atomicRead, atomicRead, getCurrentValue, readExternal, writeExternal
 
Methods inherited from class com.bigdata.btree.proc.AbstractIndexProcedure
getKeyBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomicRowRead

public AtomicRowRead()
De-serialization ctor.


AtomicRowRead

public AtomicRowRead(Schema schema,
                     Object primaryKey,
                     long fromTime,
                     long toTime,
                     INameFilter filter)
Constructor for an atomic read operation.

Parameters:
schema - The schema governing the property set.
primaryKey - The value of the primary key (identifies the logical row to be read).
fromTime - During pre-condition and post-condition reads, the first timestamp for which timestamped property values will be accepted.
toTime - During pre-condition and post-condition reads, 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.
filter - An optional filter used to restrict the property values that will be returned.
Method Detail

isReadOnly

public final boolean isReadOnly()
Description copied from interface: IIndexProcedure
Return true iff the procedure asserts that it will not write on the index. When true, the procedure may be run against a view of the index that is read-only or which allows concurrent processes to read on the same index object. When false the procedure will be run against a mutable view of the index (assuming that the procedure is executed in a context that has access to a mutable index view).


apply

public TPS apply(IIndex ndx)
Atomic read.

Parameters:
ndx - The index.
Returns:
A TPS instance containing the selected data from the logical row identified by the AbstractAtomicRowReadOrWrite.primaryKey -or- null iff the primary key was NOT FOUND in the index. I.e., iff there are NO entries for that primary key regardless of whether or not they were selected.


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