K - The type for the keysV - The type for the stored valuespublic class InMemoryBTreeConfiguration<K,V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowDuplicates
Flag to enable duplicate key support
|
private long |
checkPointDelay
The delay between two checkpoints.
|
private java.lang.String |
filePath
The path where the BTree file will be stored.
|
private java.lang.String |
journalName
The journal's name.
|
private long |
journalSize
The maximal size of the journal.
|
private ElementSerializer<K> |
keySerializer
The Key and Value serializer used for this tree.
|
private java.lang.String |
name
The BTree name
|
private int |
pageSize
Number of entries in each Page.
|
private long |
readTimeOut
The maximum delay to wait before a revision is considered as unused.
|
private BTreeTypeEnum |
type
the type of BTree
|
private ElementSerializer<V> |
valueSerializer |
private int |
writeBufferSize
The size of the buffer used to write data in disk
|
| Constructor and Description |
|---|
InMemoryBTreeConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCheckPointDelay() |
java.lang.String |
getFilePath() |
java.lang.String |
getJournalName() |
long |
getJournalSize() |
ElementSerializer<K> |
getKeySerializer() |
java.lang.String |
getName() |
int |
getPageSize() |
long |
getReadTimeOut() |
BTreeTypeEnum |
getType() |
ElementSerializer<V> |
getValueSerializer() |
int |
getWriteBufferSize() |
boolean |
isAllowDuplicates() |
void |
setAllowDuplicates(boolean allowDuplicates)
enable duplicate key support
|
void |
setCheckPointDelay(long checkPointDelay) |
void |
setFilePath(java.lang.String filePath) |
void |
setJournalName(java.lang.String journalName) |
void |
setJournalSize(long journalSize) |
void |
setKeySerializer(ElementSerializer<K> keySerializer) |
void |
setName(java.lang.String name) |
void |
setPageSize(int pageSize) |
void |
setReadTimeOut(long readTimeOut) |
void |
setSerializers(ElementSerializer<K> keySerializer,
ElementSerializer<V> valueSerializer) |
void |
setType(BTreeTypeEnum type)
Sets the type of the BTree
|
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 long journalSize
private java.lang.String journalName
private long checkPointDelay
private boolean allowDuplicates
private BTreeTypeEnum type
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 long getJournalSize()
public void setJournalSize(long journalSize)
journalSize - the journalSize to setpublic long getCheckPointDelay()
public void setCheckPointDelay(long checkPointDelay)
checkPointDelay - the checkPointDelay to setpublic java.lang.String getFilePath()
public void setFilePath(java.lang.String filePath)
filePath - the filePath to setpublic java.lang.String getJournalName()
public void setJournalName(java.lang.String journalName)
journalName - the journal name 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 btree was already initialized or when tried to turn off duplicate suport on
an existing btree containing duplicate keyspublic BTreeTypeEnum getType()
public void setType(BTreeTypeEnum type)
type - the type of the tree