com.bigdata.mdi
Interface IMetadataIndex

All Superinterfaces:
IRangeQuery
All Known Implementing Classes:
CacheOnceMetadataIndex, CachingMetadataIndex, MetadataIndex, MetadataIndexView, NoCacheMetadataIndexView, ReadOnlyMetadataIndexView

public interface IMetadataIndex
extends IRangeQuery

Interface for a metadata index. The metadata index stores the PartitionLocators that specify which IDataService has data for each index partition in a scale-out index.

Version:
$Id: IMetadataIndex.java 2265 2009-10-26 12:51:06Z 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
 PartitionLocator find(byte[] key)
          Find and return the partition spanning the given key.
 PartitionLocator get(byte[] key)
          The partition with that separator key or null (exact match on the separator key).
 MetadataIndex.MetadataIndexMetadata getIndexMetadata()
          The metadata for the metadata index itself.
 IndexMetadata getScaleOutIndexMetadata()
          The metadata template for the scale-out index managed by this metadata index.
 void staleLocator(PartitionLocator locator)
          Notification that a locator is stale.
 
Methods inherited from interface com.bigdata.btree.IRangeQuery
rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator
 

Method Detail

getIndexMetadata

MetadataIndex.MetadataIndexMetadata getIndexMetadata()
The metadata for the metadata index itself. Note that the MetadataIndex.MetadataIndexMetadata.getManagedIndexMetadata() returns the template IndexMetadata for the scale-out index partitions.

See Also:
getScaleOutIndexMetadata()

getScaleOutIndexMetadata

IndexMetadata getScaleOutIndexMetadata()
The metadata template for the scale-out index managed by this metadata index.


get

PartitionLocator get(byte[] key)
The partition with that separator key or null (exact match on the separator key).

Parameters:
key - The separator key (the first key that would go into that partition).
Returns:
The partition with that separator key or null.

find

PartitionLocator find(byte[] key)
Find and return the partition spanning the given key.

Parameters:
key - A key (optional). When null the locator for the last index partition will be returned.
Returns:
The partition spanning the given key or null if there are no partitions defined.

staleLocator

void staleLocator(PartitionLocator locator)
Notification that a locator is stale. Caching implementations of this interface will use this notice to update their state from the authoritative metadata index. Non-caching and authoritative implementations just ignore this message.

Parameters:
locator - The locator.


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