com.bigdata.btree
Class HTreeIndexMetadata

java.lang.Object
  extended by com.bigdata.btree.IndexMetadata
      extended by com.bigdata.btree.HTreeIndexMetadata
All Implemented Interfaces:
IKeyBuilderFactory, Externalizable, Serializable, Cloneable

public class HTreeIndexMetadata
extends IndexMetadata

HTree specific implementation.

Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
static interface HTreeIndexMetadata.Options
          HTree specific options.
 
Constructor Summary
HTreeIndexMetadata()
          De-serialization constructor only - DO NOT use this ctor for creating a new instance! It will result in a thrown exception, typically from IndexMetadata.firstCheckpoint().
HTreeIndexMetadata(IIndexManager indexManager, Properties properties, String namespace, UUID indexUUID)
          Constructor used to configure a new named B+Tree.
HTreeIndexMetadata(String name, UUID indexUUID)
          Constructor used to configure a new named BTree.
HTreeIndexMetadata(UUID indexUUID)
          Constructor used to configure a new unnamed HTree.
 
Method Summary
 HTreeIndexMetadata clone()
          Makes a copy of the persistent data, clearing the address of the IndexMetadata record on the cloned copy.
 int getAddressBits()
           
 String getHTreeClassName()
          The name of a class derived from HTree that will be used to re-load the index.
 int getKeyLen()
           
 void readExternal(ObjectInput in)
           
 void setAddressBits(int addressBits)
           
 void setHTreeClassName(String className)
           
 void setKeyLen(int keyLen)
           
protected  void toString(StringBuilder sb)
          Extension hook for IndexMetadata.toString().
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.bigdata.btree.IndexMetadata
firstCheckpoint, getAsynchronousIndexWriteConfiguration, getAsynchronousIndexWriteConfiguration, getBloomFilterFactory, getBranchingFactor, getBTreeClassName, getBtreeRecordCompressorFactory, getCheckpointClassName, getConflictResolver, getDeleteMarkers, getIndexSegmentBranchingFactor, getIndexSegmentBufferNodes, getIndexSegmentRecordCompressorFactory, getIndexType, getIndexUUID, getInitialDataServiceUUID, getKeyBuilder, getMaxRecLen, getMetadataAddr, getName, getNodeKeySerializer, getOverflowHandler, getPartitionMetadata, getProperty, getProperty, getRawRecords, getScatterSplitConfiguration, getSplitHandler, getTupleSerializer, getVersionTimestampFilters, getVersionTimestamps, getWriteRetentionQueueCapacity, getWriteRetentionQueueScan, isIsolatable, overflowCheckpoint, read, setBloomFilterFactory, setBranchingFactor, setBTreeClassName, setBtreeRecordCompressorFactory, setCheckpointClassName, setConflictResolver, setDeleteMarkers, setIndexSegmentBranchingFactor, setIndexSegmentBufferNodes, setIndexSegmentRecordCompressorFactory, setInitialDataServiceUUID, setIsolatable, setMaxRecLen, setNodeKeySerializer, setOverflowHandler, setPartitionMetadata, setRawRecords, setScatterSplitConfiguration, setSplitHandler, setTupleSerializer, setVersionTimestampFilters, setVersionTimestamps, setWriteRetentionQueueCapacity, setWriteRetentionQueueScan, toString, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTreeIndexMetadata

public HTreeIndexMetadata()
De-serialization constructor only - DO NOT use this ctor for creating a new instance! It will result in a thrown exception, typically from IndexMetadata.firstCheckpoint().


HTreeIndexMetadata

public HTreeIndexMetadata(UUID indexUUID)
Constructor used to configure a new unnamed HTree. The index UUID is set to the given value and all other fields are defaulted as explained at #HTreeIndexMetadata(Properties, String, UUID). Those defaults may be overridden using the various setter methods, but some values can not be safely overridden after the index is in use.

Parameters:
indexUUID - The indexUUID.
Throws:
IllegalArgumentException - if the indexUUID is null.

HTreeIndexMetadata

public HTreeIndexMetadata(String name,
                          UUID indexUUID)
Constructor used to configure a new named BTree. The index UUID is set to the given value and all other fields are defaulted as explained at #IndexMetadata(Properties, String, UUID). Those defaults may be overridden using the various setter methods, but some values can not be safely overridden after the index is in use.

Parameters:
name - The index name. When this is a scale-out index, the same name is specified for each index resource. However they will be registered on the journal under different names depending on the index partition to which they belong.
indexUUID - The indexUUID. The same index UUID MUST be used for all component indices in a scale-out index.
Throws:
IllegalArgumentException - if the indexUUID is null.

HTreeIndexMetadata

public HTreeIndexMetadata(IIndexManager indexManager,
                          Properties properties,
                          String namespace,
                          UUID indexUUID)
Constructor used to configure a new named B+Tree. The index UUID is set to the given value and all other fields are defaulted as explained at #getProperty(Properties, String, String, String). Those defaults may be overridden using the various setter methods.

Parameters:
indexManager - Optional. When given and when the IIndexManager is a scale-out IBigdataFederation, this object will be used to interpret the IndexMetadata.Options.INITIAL_DATA_SERVICE property.
properties - Properties object used to overridden the default values for this IndexMetadata instance.
namespace - The index name. When this is a scale-out index, the same name is specified for each index resource. However they will be registered on the journal under different names depending on the index partition to which they belong.
indexUUID - component indices in a scale-out index. The indexUUID. The same index UUID MUST be used for all
indexType - Type-safe enumeration specifying the type of the persistence class data structure (historically, this was always a B+Tree).
Throws:
IllegalArgumentException - if properties is null.
IllegalArgumentException - if indexUUID is null.
Method Detail

getHTreeClassName

public final String getHTreeClassName()
The name of a class derived from HTree that will be used to re-load the index.

See Also:
HTreeIndexMetadata.Options.HTREE_CLASS_NAME

setHTreeClassName

public void setHTreeClassName(String className)

getAddressBits

public int getAddressBits()

setAddressBits

public void setAddressBits(int addressBits)

getKeyLen

public int getKeyLen()

setKeyLen

public void setKeyLen(int keyLen)

toString

protected void toString(StringBuilder sb)
Description copied from class: IndexMetadata
Extension hook for IndexMetadata.toString().

Overrides:
toString in class IndexMetadata
Parameters:
sb - Where to write additional metadata.

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class IndexMetadata
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class IndexMetadata
Throws:
IOException

clone

public HTreeIndexMetadata clone()
Description copied from class: IndexMetadata
Makes a copy of the persistent data, clearing the address of the IndexMetadata record on the cloned copy.

Overrides:
clone in class IndexMetadata
Returns:
The cloned copy.


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