org.apache.directory.mavibot.btree

## Class PersistedBTreeConfiguration<K,V>

- java.lang.Object
- - org.apache.directory.mavibot.btree.PersistedBTreeConfiguration<K,V>

- Type Parameters:
    `K` - The type for the keys
    `V` - The type for the stored values

      public class PersistedBTreeConfiguration<K,V>
      extends Object

  The B+Tree Configuration. This class can be used to store all the configurable parameters used by the B-tree class
  Author:
    Apache Directory Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PersistedBTreeConfiguration()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BTreeTypeEnum` | `getBtreeType()`
    `int` | `getCacheSize()`
    `String` | `getFilePath()`
    `ElementSerializer<K>` | `getKeySerializer()`
    `String` | `getName()`
    `int` | `getPageSize()`
    `BTree<?,V>` | `getParentBTree()`
    `long` | `getReadTimeOut()`
    `ElementSerializer<V>` | `getValueSerializer()`
    `int` | `getWriteBufferSize()`
    `boolean` | `isAllowDuplicates()`
    `void` | `setAllowDuplicates(boolean allowDuplicates)` enable duplicate key support
    `void` | `setBtreeType(BTreeTypeEnum btreeType)`
    `void` | `setCacheSize(int cacheSize)`
    `void` | `setFilePath(String filePath)`
    `void` | `setKeySerializer(ElementSerializer<K> keySerializer)`
    `void` | `setName(String name)`
    `void` | `setPageSize(int pageSize)`
    `void` | `setParentBTree(BTree<?,V> parentBTree)`
    `void` | `setReadTimeOut(long readTimeOut)`
    `void` | `setSerializers(ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer)`
    `void` | `setValueSerializer(ElementSerializer<V> valueSerializer)`
    `void` | `setWriteBufferSize(int writeBufferSize)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PersistedBTreeConfiguration

          public PersistedBTreeConfiguration()

  - ### Method Detail

    - #### getPageSize

          public int getPageSize()

      Returns:
        the pageSize

    - #### setPageSize

          public void setPageSize(int pageSize)

      Parameters:
        `pageSize` - the pageSize to set

    - #### getKeySerializer

          public ElementSerializer<K> getKeySerializer()

      Returns:
        the key serializer

    - #### getValueSerializer

          public ElementSerializer<V> getValueSerializer()

      Returns:
        the value serializer

    - #### setSerializers

          public void setSerializers(ElementSerializer<K> keySerializer,
                            ElementSerializer<V> valueSerializer)

      Parameters:
        `keySerializer` - the key serializer to set
        `valueSerializer` - the value serializer to set

    - #### setKeySerializer

          public void setKeySerializer(ElementSerializer<K> keySerializer)

      Parameters:
        `serializer` - the key serializer to set

    - #### setValueSerializer

          public void setValueSerializer(ElementSerializer<V> valueSerializer)

      Parameters:
        `serializer` - the key serializer to set

    - #### getReadTimeOut

          public long getReadTimeOut()

      Returns:
        the readTimeOut

    - #### setReadTimeOut

          public void setReadTimeOut(long readTimeOut)

      Parameters:
        `readTimeOut` - the readTimeOut to set

    - #### getFilePath

          public String getFilePath()

      Returns:
        the filePath

    - #### setFilePath

          public void setFilePath(String filePath)

      Parameters:
        `filePath` - the filePath to set

    - #### getWriteBufferSize

          public int getWriteBufferSize()

      Returns:
        the writeBufferSize

    - #### setWriteBufferSize

          public void setWriteBufferSize(int writeBufferSize)

      Parameters:
        `writeBufferSize` - the writeBufferSize to set

    - #### getName

          public String getName()

      Returns:
        the name

    - #### setName

          public void setName(String name)

      Parameters:
        `name` - the name to set

    - #### isAllowDuplicates

          public boolean isAllowDuplicates()

      Returns:
        true if duplicate key support is enabled

    - #### setAllowDuplicates

          public void setAllowDuplicates(boolean allowDuplicates)

      enable duplicate key support
      Parameters:
        `allowDuplicates` -
      Throws:
        `IllegalStateException` - if the B-tree was already initialized or when tried to turn off duplicate suport on an existing B-tree containing duplicate keys

    - #### getCacheSize

          public int getCacheSize()

      Returns:
        the cacheSize

    - #### setCacheSize

          public void setCacheSize(int cacheSize)

      Parameters:
        `cacheSize` - the cacheSize to set.

    - #### getParentBTree

          public BTree<?,V> getParentBTree()

      Returns:
        the cache

    - #### setParentBTree

          public void setParentBTree(BTree<?,V> parentBTree)

      Parameters:
        `cache` - the cache to set.

    - #### getBtreeType

          public BTreeTypeEnum getBtreeType()

      Returns:
        The BtreeType for this Btree

    - #### setBtreeType

          public void setBtreeType(BTreeTypeEnum btreeType)

      Parameters:
        `btreeType` - The BtreeType

Copyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.