org.h2.dev.store.btree
Class BtreeMapStore

java.lang.Object
  extended by org.h2.dev.store.btree.BtreeMapStore

public class BtreeMapStore
extends java.lang.Object

A persistent storage for tree maps.


Method Summary
 void close()
          Close the file.
 long commit()
          Commit the current transaction.
 void compact()
          Try to reduce the file size.
static BtreeMapStore open(java.lang.String fileName)
          Open a tree store.
<K,V> BtreeMap<K,V>
openMap(java.lang.String name, java.lang.Class<K> keyClass, java.lang.Class<V> valueClass)
          Open a map.
 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
 

Method Detail

open

public static BtreeMapStore open(java.lang.String fileName)
Open a tree store.

Parameters:
fileName - the file name
Returns:
the store

openMap

public <K,V> BtreeMap<K,V> openMap(java.lang.String name,
                                   java.lang.Class<K> keyClass,
                                   java.lang.Class<V> valueClass)
Open a map.

Type Parameters:
K - the key type
V - the value type
Parameters:
name - the name of the map
keyClass - the key class
valueClass - the value class
Returns:
the map

close

public void close()
Close the file. Uncommitted changes are ignored.


store

public long store()
Commit all changes and persist them to disk.

Returns:
the transaction id

commit

public long commit()
Commit the current transaction.

Returns:
the transaction id

compact

public void compact()
Try to reduce the file size. Blocks with a low number of live items will be re-written.