com.bigdata.btree
Interface IIndex

All Superinterfaces:
IAutoboxBTree, ICounterSetAccess, IIndexLocalCounter, IRangeQuery, ISimpleBTree
All Known Subinterfaces:
IClientIndex, ILocalBTreeView, IScaleOutClientIndex
All Known Implementing Classes:
AbstractBTree, AbstractScaleOutClientIndexView, AbstractScaleOutClientIndexView2, BTree, ClientIndexView, ClientIndexViewRefactor, CommitRecordIndex, CommitTimeIndex, CounterSetBTree, DelegateIndex, EventReceiver.EventBTree, FusedView, IndexSegment, IndexSegmentIndex, IsolatedFusedView, JournalIndex, MetadataIndex, MetadataIndexView, Name2Addr, ReadCommittedView, ReadOnlyIndex, TxId2CommitTimeIndex, UnisolatedReadWriteIndex

public interface IIndex
extends ISimpleBTree, IAutoboxBTree, IRangeQuery, IIndexLocalCounter, ICounterSetAccess

Interface for mutable B+-Tree mapping arbitrary non-null keys to arbitrary values.

Version:
$Id: IIndex.java 6348 2012-06-14 14:08:45Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from interface com.bigdata.btree.IRangeQuery
ALL, CURSOR, DEFAULT, DELETED, FIXED_LENGTH_SUCCESSOR, KEYS, NONE, PARALLEL, READONLY, REMOVEALL, REVERSE, VALS
 
Method Summary
 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.
 Object submit(byte[] key, ISimpleIndexProcedure 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.
 
Methods inherited from interface com.bigdata.btree.ISimpleBTree
contains, insert, lookup, remove
 
Methods inherited from interface com.bigdata.btree.IAutoboxBTree
contains, insert, lookup, remove
 
Methods inherited from interface com.bigdata.btree.IRangeQuery
rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator
 
Methods inherited from interface com.bigdata.btree.IIndexLocalCounter
getCounter
 

Method Detail

getResourceMetadata

IResourceMetadata[] getResourceMetadata()
The description of the resources comprising the index view.


getIndexMetadata

IndexMetadata getIndexMetadata()
The metadata for the index. This is full of good stuff about the index.

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.

See Also:
ICheckpointProtocol.getIndexMetadata()

getCounters

CounterSet getCounters()
Return performance counters.

Interesting performance counters and other statistics about the index.

Specified by:
getCounters in interface ICounterSetAccess

submit

Object submit(byte[] key,
              ISimpleIndexProcedure proc)
Submits an index procedure that operations on a single key to the appropriate index partition returning the result of that procedure.

Parameters:
key - The key.
proc - The procedure.
Returns:
The value returned by IIndexProcedure.apply(IIndex)

submit

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.

Note: Since this variant of submit() does not split keys the fromIndex and toIndex in the Splits reported to the IResultHandler will be zero (0).

Parameters:
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.

submit

void submit(int fromIndex,
            int toIndex,
            byte[][] keys,
            byte[][] vals,
            AbstractKeyArrayIndexProcedureConstructor ctor,
            IResultHandler resultHandler)
Runs a procedure against an index.

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.

Parameters:
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.


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