K
- The B-tree key typeV
- The B-tree value typepublic class BTreeFactory<K,V> extends Object
Constructor and Description |
---|
BTreeFactory() |
Modifier and Type | Method and Description |
---|---|
static <K,V> BTree<K,V> |
createInMemoryBTree()
Creates a new in-memory B-tree, with no initialization.
|
static <K,V> BTree<K,V> |
createInMemoryBTree(InMemoryBTreeConfiguration<K,V> configuration)
Creates a new in-memory B-tree using the BTreeConfiguration to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createInMemoryBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer)
Creates a new in-memory B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createInMemoryBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
boolean allowDuplicates)
Creates a new in-memory B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createInMemoryBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
int pageSize)
Creates a new in-memory B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createInMemoryBTree(String name,
String filePath,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer)
Creates a new in-memory B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createInMemoryBTree(String name,
String filePath,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
int pageSize)
Creates a new in-memory B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createInMemoryBTree(String name,
String filePath,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
int pageSize,
boolean allowDuplicates)
Creates a new in-memory B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree()
Creates a new persisted B-tree, with no initialization.
|
static <K,V> BTree<K,V> |
createPersistedBTree(BTreeTypeEnum type)
Creates a new persisted B-tree, with no initialization.
|
static <K,V> BTree<K,V> |
createPersistedBTree(PersistedBTreeConfiguration<K,V> configuration)
Creates a new persisted B-tree using the BTreeConfiguration to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer)
Creates a new persisted B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
boolean allowDuplicates)
Creates a new persisted B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
boolean allowDuplicates,
int cacheSize)
Creates a new persisted B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
int pageSize)
Creates a new persisted B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
int pageSize,
boolean allowDuplicates)
Creates a new persisted B-tree using the parameters to initialize the
B-tree
|
static <K,V> BTree<K,V> |
createPersistedBTree(String name,
ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer,
int pageSize,
boolean allowDuplicates,
int cacheSize)
Creates a new persisted B-tree using the parameters to initialize the
B-tree
|
static <K,V> void |
setBtreeHeaderOffset(PersistedBTree<K,V> btree,
long btreeHeaderOffset)
Sets the btreeHeader offset for a Persisted BTree
|
public BTreeFactory()
public static <K,V> BTree<K,V> createPersistedBTree()
public static <K,V> BTree<K,V> createPersistedBTree(BTreeTypeEnum type)
public static <K,V> void setBtreeHeaderOffset(PersistedBTree<K,V> btree, long btreeHeaderOffset)
btree
- The btree to updatebtreeHeaderOffset
- The offsetpublic static <K,V> BTree<K,V> createPersistedBTree(PersistedBTreeConfiguration<K,V> configuration)
configuration
- The configuration to usepublic static <K,V> BTree<K,V> createPersistedBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerpublic static <K,V> BTree<K,V> createPersistedBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, boolean allowDuplicates)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerallowDuplicates
- Tells if the B-tree allows multiple value for a given keypublic static <K,V> BTree<K,V> createPersistedBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, boolean allowDuplicates, int cacheSize)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerallowDuplicates
- Tells if the B-tree allows multiple value for a given keycacheSize
- The size to be used for this B-tree cachepublic static <K,V> BTree<K,V> createPersistedBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, int pageSize)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerpageSize
- Size of the pagepublic static <K,V> BTree<K,V> createPersistedBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, int pageSize, boolean allowDuplicates)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerpageSize
- Size of the pageallowDuplicates
- Tells if the B-tree allows multiple value for a given keypublic static <K,V> BTree<K,V> createPersistedBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, int pageSize, boolean allowDuplicates, int cacheSize)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerpageSize
- Size of the pageallowDuplicates
- Tells if the B-tree allows multiple value for a given keycacheSize
- The size to be used for this B-tree cachepublic static <K,V> BTree<K,V> createInMemoryBTree()
public static <K,V> BTree<K,V> createInMemoryBTree(InMemoryBTreeConfiguration<K,V> configuration)
configuration
- The configuration to usepublic static <K,V> BTree<K,V> createInMemoryBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerpublic static <K,V> BTree<K,V> createInMemoryBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, boolean allowDuplicates)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerallowDuplicates
- Tells if the B-tree allows multiple value for a given keypublic static <K,V> BTree<K,V> createInMemoryBTree(String name, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, int pageSize)
name
- The B-tree's namekeySerializer
- Key serializervalueSerializer
- Value serializerpageSize
- Size of the pagepublic static <K,V> BTree<K,V> createInMemoryBTree(String name, String filePath, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer)
name
- The B-tree's namefilePath
- The name of the data directory with absolute pathkeySerializer
- Key serializervalueSerializer
- Value serializerpublic static <K,V> BTree<K,V> createInMemoryBTree(String name, String filePath, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, int pageSize)
name
- The B-tree's namefilePath
- The name of the data directory with absolute pathkeySerializer
- Key serializervalueSerializer
- Value serializerpageSize
- Size of the pagepublic static <K,V> BTree<K,V> createInMemoryBTree(String name, String filePath, ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer, int pageSize, boolean allowDuplicates)
name
- The B-tree's namefilePath
- The name of the data directory with absolute pathkeySerializer
- Key serializervalueSerializer
- Value serializerpageSize
- Size of the pageallowDuplicates
- Tells if the B-tree allows multiple value for a given keyCopyright © 2012–2015 Apache Mavibot Project Parent. All rights reserved.