public interface IIndex extends ISimpleBTree, IAutoboxBTree, IRangeQuery, IIndexLocalCounter, ICounterSetAccess
Interface for mutable B+-Tree mapping arbitrary non-null keys to arbitrary values.
Modifier and Type | Method and Description |
---|---|
CounterSet |
getCounters()
Return performance counters.
|
IndexMetadata |
getIndexMetadata()
The metadata for the index.
|
IResourceMetadata[] |
getResourceMetadata()
The description of the resources comprising the index view.
|
void |
submit(byte[] fromKey,
byte[] toKey,
IKeyRangeIndexProcedure proc,
IResultHandler handler)
The procedure will be transparently applied against each index partition
spanned by the given key range.
|
<T> T |
submit(byte[] key,
ISimpleIndexProcedure<T> proc)
Submits an index procedure that operations on a single key to the
appropriate index partition returning the result of that procedure.
|
void |
submit(int fromIndex,
int toIndex,
byte[][] keys,
byte[][] vals,
AbstractKeyArrayIndexProcedureConstructor ctor,
IResultHandler resultHandler)
Runs a procedure against an index.
|
contains, insert, lookup, putIfAbsent, remove
contains, insert, lookup, remove
rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator
getCounter
IResourceMetadata[] getResourceMetadata()
IndexMetadata getIndexMetadata()
Note: The same method is exposed by ICheckpointProtocol
. It is
also exposed here in order to provide access to the IndexMetadata
to remote clients in the scale-out architecture.
CounterSet getCounters()
Interesting performance counters and other statistics about the index.
getCounters
in interface ICounterSetAccess
<T> T submit(byte[] key, ISimpleIndexProcedure<T> proc)
key
- The key.proc
- The procedure.IIndexProcedure.apply(IIndex)
void submit(byte[] fromKey, byte[] toKey, IKeyRangeIndexProcedure proc, IResultHandler handler)
Note: Since this variant of submit() does not split keys the
fromIndex and toIndex in the Split
s reported to
the IResultHandler
will be zero (0).
fromKey
- The lower bound (inclusive) -or- null
if there
is no lower bound.toKey
- The upper bound (exclusive) -or- null
if there
is no upper bound.proc
- The procedure. If the procedure implements the
IParallelizableIndexProcedure
marker interface then it
MAY be executed in parallel against the relevant index
partition(s).resultHandler
- When defined, results from each procedure application will be
reported to this object.void submit(int fromIndex, int toIndex, byte[][] keys, byte[][] vals, AbstractKeyArrayIndexProcedureConstructor ctor, IResultHandler resultHandler)
Note: This may be used to send custom logic together with the data to a
remote index or index partition. When the index is remote both the
procedure and the return value MUST be Serializable
.
Note: The scale-out indices add support for auto-split of the procedure such that it runs locally against each relevant index partition.
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 (required).vals
- The values (optional depending on the procedure).ctor
- An object that can create instances of the procedure.resultHandler
- When defined, results from each procedure application will be
reported to this object.
TODO In order to allow parallelization within a shard, we need to modify
this method signature to pass in an IResultHandler
constructor
object. That might be something which could be pushed down onto the ctor
argument. It would be used in scale-out to create a DS local result handler
so we can locally aggregate when parallelizing against each shard and then
return that aggregated result to the client which would extract the aggregate
result across the shards from the client's result handler. See BLZG-1537.(Schedule more IOs when loading data)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.