com.bigdata.journal
Interface IBTreeManager

All Superinterfaces:
IIndexManager, IIndexStore
All Known Subinterfaces:
IJournal
All Known Implementing Classes:
AbstractJournal, Journal, StoreManager.ManagedJournal, TemporaryStore

public interface IBTreeManager
extends IIndexManager

Extended to allow direct registration of a named BTree.

Version:
$Id: IBTreeManager.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
TODO:
change registerIndex() methods to return void and have people use getIndex(String) to obtain the view after they have registered the index. This will make it somewhat easier to handle things like the registration of an index partition reading from multiple resources.

Method Summary
 IIndex getIndex(String name)
          Return the unisolated view of the named index (the mutable view of the live index object).
 IIndex registerIndex(String name, BTree btree)
          Register a named index.
 IIndex registerIndex(String name, IndexMetadata indexMetadata)
          Register a named index.
 
Methods inherited from interface com.bigdata.journal.IIndexManager
dropIndex, registerIndex
 
Methods inherited from interface com.bigdata.journal.IIndexStore
destroy, getExecutorService, getGlobalFileSystem, getGlobalRowStore, getIndex, getLastCommitTime, getResourceLocator, getResourceLockService, getTempStore
 

Method Detail

registerIndex

IIndex registerIndex(String name,
                     BTree btree)
Register a named index.

Parameters:
name - The name that can be used to recover the index.
btree - The btree.
Returns:
The object that would be returned by getIndex(String).
Throws:
IndexExistsException - if there is an index already registered under that name. Use IIndexStore#getIndex(String) to test whether there is an index registered under a given name.

registerIndex

IIndex registerIndex(String name,
                     IndexMetadata indexMetadata)
Register a named index.

This variant allows you to register an index under a name other than the value returned by IndexMetadata.getName().

Note: This variant is generally by the IMetadataService when it needs to register a index partition of some scale-out index on a IDataService. In this case the name is the name of the index partition while the value reported by IndexMetadata.getName() is the name of the scale-out index. In nearly all other cases you can use IIndexManager.registerIndex(IndexMetadata) instead. The same method signature is also declared by IDataService.registerIndex(String, IndexMetadata) in order to support registration of index partitions.

Parameters:
name - The name that can be used to recover the index.
indexMetadata - The metadata describing the index.
Returns:
The object that would be returned by getIndex(String).
Throws:
IndexExistsException - if there is an index already registered under that name. Use IIndexStore#getIndex(String) to test whether there is an index registered under a given name.

getIndex

IIndex getIndex(String name)
Return the unisolated view of the named index (the mutable view of the live index object).

Parameters:
name - The name of the index.
Returns:
The unisolated view named index or null iff there is no index registered with that name.
Throws:
IllegalArgumentException - if name is null


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