K - The type for the keysV - The type for the stored valuespublic class PersistedBTreeConfiguration<K,V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowDuplicates
Flag to enable duplicate key support
|
private BTreeTypeEnum |
btreeType
The B-tree type
|
private int |
cacheSize
The cache size, if it's <= 0, we don't have cache
|
private java.lang.String |
filePath
The path where the B-tree file will be stored.
|
private ElementSerializer<K> |
keySerializer
The Key and Value serializer used for this tree.
|
private java.lang.String |
name
The B-tree name
|
private int |
pageSize
Number of entries in each Page.
|
private BTree<?,V> |
parentBTree
The inherited B-tree if we create a sub B-tree
|
private long |
readTimeOut
The maximum delay to wait before a revision is considered as unused.
|
private ElementSerializer<V> |
valueSerializer |
private int |
writeBufferSize
The size of the buffer used to write data in disk
|
| Constructor and Description |
|---|
PersistedBTreeConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
BTreeTypeEnum |
getBtreeType() |
int |
getCacheSize() |
java.lang.String |
getFilePath() |
ElementSerializer<K> |
getKeySerializer() |
java.lang.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(java.lang.String filePath) |
void |
setKeySerializer(ElementSerializer<K> keySerializer) |
void |
setName(java.lang.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) |
private int pageSize
private int writeBufferSize
private ElementSerializer<K> keySerializer
private ElementSerializer<V> valueSerializer
private java.lang.String name
private java.lang.String filePath
private long readTimeOut
private boolean allowDuplicates
private BTreeTypeEnum btreeType
private int cacheSize
public int getPageSize()
public void setPageSize(int pageSize)
pageSize - the pageSize to setpublic ElementSerializer<K> getKeySerializer()
public ElementSerializer<V> getValueSerializer()
public void setSerializers(ElementSerializer<K> keySerializer, ElementSerializer<V> valueSerializer)
keySerializer - the key serializer to setvalueSerializer - the value serializer to setpublic void setKeySerializer(ElementSerializer<K> keySerializer)
serializer - the key serializer to setpublic void setValueSerializer(ElementSerializer<V> valueSerializer)
serializer - the key serializer to setpublic long getReadTimeOut()
public void setReadTimeOut(long readTimeOut)
readTimeOut - the readTimeOut to setpublic java.lang.String getFilePath()
public void setFilePath(java.lang.String filePath)
filePath - the filePath to setpublic int getWriteBufferSize()
public void setWriteBufferSize(int writeBufferSize)
writeBufferSize - the writeBufferSize to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the name to setpublic boolean isAllowDuplicates()
public void setAllowDuplicates(boolean allowDuplicates)
allowDuplicates - java.lang.IllegalStateException - if the B-tree was already initialized or when tried to turn off duplicate suport on
an existing B-tree containing duplicate keyspublic int getCacheSize()
public void setCacheSize(int cacheSize)
cacheSize - the cacheSize to set.public void setParentBTree(BTree<?,V> parentBTree)
cache - the cache to set.public BTreeTypeEnum getBtreeType()
public void setBtreeType(BTreeTypeEnum btreeType)
btreeType - The BtreeType