com.bigdata.mdi
Class MetadataIndexView

java.lang.Object
  extended by com.bigdata.btree.DelegateIndex
      extended by com.bigdata.mdi.MetadataIndexView
All Implemented Interfaces:
IAutoboxBTree, IIndex, IIndexLocalCounter, IRangeQuery, ISimpleBTree, ICounterSetAccess, IMetadataIndex

public class MetadataIndexView
extends DelegateIndex
implements IMetadataIndex

The extension semantics for the IMetadataIndex are implemented by this class.

Version:
$Id: MetadataIndexView.java 4523 2011-05-18 18:14:45Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected static org.apache.log4j.Logger log
           
 
Fields inherited from interface com.bigdata.btree.IRangeQuery
ALL, CURSOR, DEFAULT, DELETED, FIXED_LENGTH_SUCCESSOR, KEYS, NONE, PARALLEL, READONLY, REMOVEALL, REVERSE, VALS
 
Constructor Summary
MetadataIndexView(AbstractBTree delegate)
           
 
Method Summary
 PartitionLocator find(byte[] key)
          The method is used to discover the locator for the index partition within which the key would be found.
 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 index.
 IndexMetadata getScaleOutIndexMetadata()
          The metadata template for the scale-out index managed by this metadata index.
 void staleLocator(PartitionLocator locator)
          Remove the locator from the locatorCache.
 
Methods inherited from class com.bigdata.btree.DelegateIndex
contains, contains, getCounter, getCounters, getResourceMetadata, insert, insert, lookup, lookup, rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator, remove, remove, submit, submit, submit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.bigdata.btree.IRangeQuery
rangeCount, rangeCount, rangeCountExact, rangeCountExactWithDeleted, rangeIterator, rangeIterator, rangeIterator
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

MetadataIndexView

public MetadataIndexView(AbstractBTree delegate)
Method Detail

getIndexMetadata

public MetadataIndex.MetadataIndexMetadata getIndexMetadata()
Description copied from interface: IIndex
The metadata for the index. This is full of good stuff about the index.

Specified by:
getIndexMetadata in interface IIndex
Specified by:
getIndexMetadata in interface IMetadataIndex
Overrides:
getIndexMetadata in class DelegateIndex
See Also:
IMetadataIndex.getScaleOutIndexMetadata()

getScaleOutIndexMetadata

public IndexMetadata getScaleOutIndexMetadata()
Description copied from interface: IMetadataIndex
The metadata template for the scale-out index managed by this metadata index.

Specified by:
getScaleOutIndexMetadata in interface IMetadataIndex

get

public PartitionLocator get(byte[] key)
Description copied from interface: IMetadataIndex
The partition with that separator key or null (exact match on the separator key).

Specified by:
get in interface IMetadataIndex
Parameters:
key - The separator key (the first key that would go into that partition).
Returns:
The partition with that separator key or null.

find

public PartitionLocator find(byte[] key)
The method is used to discover the locator for the index partition within which the key would be found.

Specified by:
find in interface IMetadataIndex
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

public void staleLocator(PartitionLocator locator)
Remove the locator from the locatorCache. It will be re-read on demand from the delegate.

Specified by:
staleLocator in interface IMetadataIndex
Parameters:
locator - The locator.


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