public class BatchLookup extends AbstractKeyArrayIndexProcedure<AbstractKeyArrayIndexProcedure.ResultBuffer> implements IParallelizableIndexProcedure<AbstractKeyArrayIndexProcedure.ResultBuffer>
Modifier and Type | Class and Description |
---|---|
static class |
BatchLookup.BatchLookupConstructor
Factory for
BatchLookup procedures. |
AbstractKeyArrayIndexProcedure.ResultBitBuffer, AbstractKeyArrayIndexProcedure.ResultBitBufferCounter, AbstractKeyArrayIndexProcedure.ResultBitBufferHandler, AbstractKeyArrayIndexProcedure.ResultBuffer, AbstractKeyArrayIndexProcedure.ResultBufferHandler
Modifier | Constructor and Description |
---|---|
|
BatchLookup()
De-serialization ctor.
|
protected |
BatchLookup(IRabaCoder keysCoder,
IRabaCoder valsCoder,
int fromIndex,
int toIndex,
byte[][] keys)
Create a batch lookup operation.
|
Modifier and Type | Method and Description |
---|---|
AbstractKeyArrayIndexProcedure.ResultBuffer |
applyOnce(IIndex ndx,
IRaba keys,
IRaba vals)
Apply the procedure to the specified key range of the index.
|
boolean |
isReadOnly()
Return
true iff the procedure asserts that it will not
write on the index. |
protected IResultHandler<AbstractKeyArrayIndexProcedure.ResultBuffer,AbstractKeyArrayIndexProcedure.ResultBuffer> |
newAggregator()
Return an
IResultHandler that will be used to combine the results
if the index procedure is parallelized against a local index (including a
scale-out shard). |
apply, getKeys, getKeysCoder, getValues, getValuesCoder, readExternal, readMetadata, writeExternal, writeMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public BatchLookup()
protected BatchLookup(IRabaCoder keysCoder, IRabaCoder valsCoder, int fromIndex, int toIndex, byte[][] keys)
keys
- The array of keys (one key per tuple).BatchLookup.BatchLookupConstructor
public final boolean isReadOnly()
IReadOnly
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).isReadOnly
in interface IReadOnly
public AbstractKeyArrayIndexProcedure.ResultBuffer applyOnce(IIndex ndx, IRaba keys, IRaba vals)
AbstractKeyArrayIndexProcedure
applyOnce
in class AbstractKeyArrayIndexProcedure<AbstractKeyArrayIndexProcedure.ResultBuffer>
ndx
- The index.AbstractKeyArrayIndexProcedure.ResultBuffer
protected IResultHandler<AbstractKeyArrayIndexProcedure.ResultBuffer,AbstractKeyArrayIndexProcedure.ResultBuffer> newAggregator()
AbstractKeyArrayIndexProcedure
IResultHandler
that will be used to combine the results
if the index procedure is parallelized against a local index (including a
scale-out shard). If a null
is returned, then the index
procedure WILL NOT be parallelized against the local index. To
parallelize index procedures that do not return anything against a local
index, just use NopAggregator
. A non-null
value will
permit both index local parallelization of the index procedure and (in
scale-out) parallelization of the index procedure across the shards as
well. In order to be parallelized, the index procedure must also be
marked as IParallelizableIndexProcedure
.newAggregator
in class AbstractKeyArrayIndexProcedure<AbstractKeyArrayIndexProcedure.ResultBuffer>
IResultHandler
-or- null
NopAggregator
,
IParallelizableIndexProcedure
,
(Schedule more IOs when loading data)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.