|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.store.btree.MVStore
public class MVStore
A persistent storage for maps.
| Field Summary | |
|---|---|
static boolean |
ASSERT
Whether assertions are enabled. |
| Method Summary | ||
|---|---|---|
void |
close()
Close the file. |
|
boolean |
compact(int fillRate)
Try to reduce the file size. |
|
Compressor |
getCompressor()
|
|
long |
getCurrentVersion()
Get the current version of the store. |
|
int |
getMaxPageSize()
The maximum number of key-value pairs in a page. |
|
MVMap<java.lang.String,java.lang.String> |
getMetaMap()
Get the metadata map. |
|
int |
getReadCount()
Get the number of read operations since this store was opened. |
|
int |
getRetainChunk()
|
|
boolean |
getReuseSpace()
|
|
int |
getWriteCount()
Get the number of write operations since this store was opened. |
|
boolean |
hasUnsavedChanges()
Check whether there are any unsaved changes. |
|
long |
incrementVersion()
Increment the current version. |
|
static MVStore |
open(java.lang.String fileName)
Open a tree store. |
|
static MVStore |
open(java.lang.String fileName,
MapFactory mapFactory)
Open a tree store. |
|
|
openMap(java.lang.String name,
java.lang.Class<K> keyClass,
java.lang.Class<V> valueClass)
Open a map. |
|
|
openMap(java.lang.String name,
java.lang.String mapType,
java.lang.String keyType,
java.lang.String valueType)
Open a map. |
|
void |
rollbackTo(long version)
Revert to the given version. |
|
void |
setCompressor(Compressor compressor)
|
|
void |
setMaxPageSize(int maxPageSize)
|
|
void |
setRetainChunk(int retainChunk)
Which chunk to retain. |
|
void |
setReuseSpace(boolean reuseSpace)
|
|
long |
store()
Commit all changes and persist them to disk. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean ASSERT
| Method Detail |
|---|
public static MVStore open(java.lang.String fileName)
fileName - the file name
public static MVStore open(java.lang.String fileName,
MapFactory mapFactory)
fileName - the file name (null for in-memory)mapFactory - the map factory
public <T extends MVMap<?,?>> T openMap(java.lang.String name,
java.lang.String mapType,
java.lang.String keyType,
java.lang.String valueType)
T - the map typename - the name of the mapmapType - the map typekeyType - the key typevalueType - the value type
public MVMap<java.lang.String,java.lang.String> getMetaMap()
map.{name} = {mapId}/{keyType}/{valueType}
root.{mapId} = {rootPos}
chunk.{chunkId} = {chunkData}
public <K,V> MVMap<K,V> openMap(java.lang.String name,
java.lang.Class<K> keyClass,
java.lang.Class<V> valueClass)
K - the key typeV - the value typename - the name of the mapkeyClass - the key classvalueClass - the value class
public void close()
public long incrementVersion()
public long store()
public boolean hasUnsavedChanges()
public boolean compact(int fillRate)
fillRate - the minimum percentage of live entries
public void setMaxPageSize(int maxPageSize)
public int getMaxPageSize()
public Compressor getCompressor()
public void setCompressor(Compressor compressor)
public boolean getReuseSpace()
public void setReuseSpace(boolean reuseSpace)
public int getRetainChunk()
public void setRetainChunk(int retainChunk)
This setting is not persisted.
retainChunk - the earliest chunk to retain (0 to retain all chunks,
-1 to re-use space as early as possible)public void rollbackTo(long version)
version - the version to revert topublic long getCurrentVersion()
public int getWriteCount()
public int getReadCount()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||