com.bigdata.btree.proc
Class BatchContains

java.lang.Object
  extended by com.bigdata.btree.proc.AbstractIndexProcedure
      extended by com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
          extended by com.bigdata.btree.proc.BatchContains
All Implemented Interfaces:
IIndexProcedure, IKeyArrayIndexProcedure, IParallelizableIndexProcedure, Externalizable, Serializable

public class BatchContains
extends AbstractKeyArrayIndexProcedure
implements IParallelizableIndexProcedure

Batch existence test operation. Existence tests SHOULD be used in place of lookup tests to determine key existence if null values are allowed in an index (lookup will return a null for both a null value and the absence of a key in the index).

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

Nested Class Summary
static class BatchContains.BatchContainsConstructor
          Factory for BatchContains procedures.
 
Nested classes/interfaces inherited from class com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
AbstractKeyArrayIndexProcedure.ResultBitBuffer, AbstractKeyArrayIndexProcedure.ResultBitBufferCounter, AbstractKeyArrayIndexProcedure.ResultBitBufferHandler, AbstractKeyArrayIndexProcedure.ResultBuffer, AbstractKeyArrayIndexProcedure.ResultBufferHandler
 
Field Summary
 
Fields inherited from class com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
DEBUG, log
 
Constructor Summary
  BatchContains()
          De-serialization ctor.
protected BatchContains(IRabaCoder keysCoder, int fromIndex, int toIndex, byte[][] keys)
          Create a batch existence test operation.
 
Method Summary
 Object apply(IIndex ndx)
          Applies the operation using ISimpleBTree.contains(byte[]).
 boolean isReadOnly()
          Return true iff the procedure asserts that it will not write on the index.
 
Methods inherited from class com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
getKey, getKeyCount, getKeys, getValue, getValues, readExternal, readMetadata, writeExternal, writeMetadata
 
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

BatchContains

public BatchContains()
De-serialization ctor.


BatchContains

protected BatchContains(IRabaCoder keysCoder,
                        int fromIndex,
                        int toIndex,
                        byte[][] keys)
Create a batch existence test operation.

Parameters:
keys - A series of keys. Each key is an variable length unsigned byte[]. The keys MUST be presented in sorted order.
See Also:
BatchContains.BatchContainsConstructor
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).

Specified by:
isReadOnly in interface IIndexProcedure

apply

public Object apply(IIndex ndx)
Applies the operation using ISimpleBTree.contains(byte[]).

Specified by:
apply in interface IIndexProcedure
Parameters:
ndx -
Returns:
A ResultBitBuffer.


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