com.bigdata.btree.proc
Class AbstractKeyArrayIndexProcedureConstructor<T extends IKeyArrayIndexProcedure>

java.lang.Object
  extended by com.bigdata.btree.proc.AbstractKeyArrayIndexProcedureConstructor<T>
Direct Known Subclasses:
BatchContains.BatchContainsConstructor, BatchInsert.BatchInsertConstructor, BatchLookup.BatchLookupConstructor, BatchRemove.BatchRemoveConstructor, Id2TermWriteProc.Id2TermWriteProcConstructor, JustIndexWriteProc.WriteJustificationsProcConstructor, MagicIndexWriteProc.IndexWriteProcConstructor, SPOIndexWriteProc.IndexWriteProcConstructor, Term2IdWriteProc.Term2IdWriteProcConstructor, TextIndexWriteProc.IndexWriteProcConstructor

public abstract class AbstractKeyArrayIndexProcedureConstructor<T extends IKeyArrayIndexProcedure>
extends Object

A factory for IKeyArrayIndexProcedures so that their data may be key range partitions and mapped against each relevant index partition.

Version:
$Id: AbstractKeyArrayIndexProcedureConstructor.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
AbstractKeyArrayIndexProcedureConstructor()
           
 
Method Summary
 T newInstance(IIndex ndx, int fromIndex, int toIndex, byte[][] keys, byte[][] vals)
          Uses the ITupleSerializer reported by IndexMetadata for the IIndex.
 T newInstance(IndexMetadata indexMetadata, int fromIndex, int toIndex, byte[][] keys, byte[][] vals)
          Uses the ITupleSerializer reported by IndexMetadata.
 T newInstance(int fromIndex, int toIndex, byte[][] keys, byte[][] vals)
          Uses the default IRabaCoders for coding.
abstract  T newInstance(IRabaCoder keysCoder, IRabaCoder valsCoder, int fromIndex, int toIndex, byte[][] keys, byte[][] vals)
          Uses the specified IRabaCoders.
abstract  boolean sendValues()
          Return true if the procedure requires values paired with the keys (otherwise the caller should specify null for the values byte[]).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractKeyArrayIndexProcedureConstructor

public AbstractKeyArrayIndexProcedureConstructor()
Method Detail

sendValues

public abstract boolean sendValues()
Return true if the procedure requires values paired with the keys (otherwise the caller should specify null for the values byte[]).


newInstance

public T newInstance(IIndex ndx,
                     int fromIndex,
                     int toIndex,
                     byte[][] keys,
                     byte[][] vals)
Uses the ITupleSerializer reported by IndexMetadata for the IIndex.

Parameters:
ndx - The index - this is used to determine the serializers for the keys and/or values to be sent to a remote IDataService.
fromIndex - The index of the first key to be used (inclusive).
toIndex - The index of the last key to be used (exclusive).
keys - The keys.
vals - The values (may be optional depending on the semantics of the operation).
Returns:
An instance of the procedure.
TODO:
we will need a different method signature to support hash-partitioned (vs range partitioned) indices.

newInstance

public T newInstance(IndexMetadata indexMetadata,
                     int fromIndex,
                     int toIndex,
                     byte[][] keys,
                     byte[][] vals)
Uses the ITupleSerializer reported by IndexMetadata.

Parameters:
indexMetadata -
fromIndex -
toIndex -
keys -
vals -
Returns:

newInstance

public T newInstance(int fromIndex,
                     int toIndex,
                     byte[][] keys,
                     byte[][] vals)
Uses the default IRabaCoders for coding.

Parameters:
fromIndex -
toIndex -
keys -
vals -
Returns:
TODO:
Why does this variant exist? Is it just to make life easier when the IndexMetadata is not on hand locally?

newInstance

public abstract T newInstance(IRabaCoder keysCoder,
                              IRabaCoder valsCoder,
                              int fromIndex,
                              int toIndex,
                              byte[][] keys,
                              byte[][] vals)
Uses the specified IRabaCoders.

Parameters:
keysCoder -
valsCoder -
fromIndex -
toIndex -
keys -
vals -
Returns:


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