public interface IBTreeManager extends IIndexManager
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 or
the registration of indices that are not BTrees (HTree, Stream,
etc).| Modifier and Type | Method and Description |
|---|---|
IIndex |
getIndex(String name)
Return the unisolated view of the named index (the mutable view of the
live index object).
|
ICheckpointProtocol |
getIndexLocal(String name,
long commitTime)
Core implementation for access to historical index views.
|
ICheckpointProtocol |
getUnisolatedIndex(String name)
Return the mutable view of the named persistence capable data structure
(aka the "live" or
ITx.UNISOLATED view). |
ICheckpointProtocol |
register(String name,
IndexMetadata metadata)
Variant method creates and registered a named persistence capable data
structure but does not assume that the data structure will be a
BTree. |
IIndex |
registerIndex(String name,
BTree btree)
Register a named index.
|
IIndex |
registerIndex(String name,
IndexMetadata indexMetadata)
Register a named index.
|
dropIndex, registerIndexaddScheduledTask, destroy, getCollectPlatformStatistics, getCollectQueueStatistics, getExecutorService, getGlobalFileSystem, getGlobalRowStore, getGlobalRowStore, getHttpdPort, getIndex, getLastCommitTime, getResourceLocator, getResourceLockService, getTempStore, indexNameScangetCountersIIndex registerIndex(String name, BTree btree)
name - The name that can be used to recover the index.btree - The btree.getIndex(String).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.IIndex registerIndex(String name, IndexMetadata indexMetadata)
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.
Note: Due to the method signature, this method CAN NOT be used to create
and register persistence capable data structures other than an
IIndex (aka B+Tree).
name - The name that can be used to recover the index.indexMetadata - The metadata describing the index.getIndex(String).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.
TODO Due to the method signature, this method CAN NOT be
used to create and register persistence capable data
structures other than an IIndex (aka B+Tree). It
is difficult to reconcile this method with other method
signatures since this method is designed for scale-out and
relies on IIndex. However, only the B+Tree is an
IIndex. Therefore, this method signature can not
be readily reconciled with the HTree. The only
interface which the BTree and HTree share
is the ICheckpointProtocol interface, but that is
a purely local (not remote) interface and is therefore not
suitable to scale-out. Also, it is only in scale-out where
the returned object can be a different type than the
simple BTree class, e.g., a FusedView or
even an IClientIndex.registerIndex(String, IndexMetadata)ICheckpointProtocol register(String name, IndexMetadata metadata)
BTree.store - The backing store.metadata - The metadata that describes the data structure to be created.Checkpoint.create(IRawStore, IndexMetadata)IIndex getIndex(String name)
name - The name of the index.null iff there
is no index registered with that name.IllegalArgumentException - if name is nullICheckpointProtocol getUnisolatedIndex(String name)
ITx.UNISOLATED view).
Note: getIndex(String) delegates to this method and then casts
the result to an IIndex. This is the core implementation to
access an existing named index.
getIndex(String),
GIST ICheckpointProtocol getIndexLocal(String name, long commitTime)
Note: Transactions should pass in the timestamp against which they are
reading rather than the transaction identifier (aka startTime). By
providing the timestamp of the commit point, the transaction will hit the
#indexCache. If the transaction passes the startTime instead,
then all startTimes will be different and the cache will be defeated.
UnsupportedOperationException - If you pass in ITx.UNISOLATED,
ITx.READ_COMMITTED, or a timestamp that corresponds
to a read-write transaction since those are not "commit
times".IIndexStore.getIndex(String, long),
Add
cache for access to historical index views on the Journal by name
and commitTime. ,
GIST
FIXME GIST : Reconcile with
{@link IResourceManager#getIndex(String, long)}. They are returning
types that do not overlap ({@link ICheckpointProtocol} and
{@link ILocalBTreeView}). This is blocking the support of GIST in
{@link AbstractTask}.Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.