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.
 void log(java.lang.String string)
          Log the string, if logging is enabled.
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.
 void store()
          Persist all changes to disk.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

close

public void close()
Close the file.


store

public void store()
Persist all changes to disk.


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.


log

public void log(java.lang.String string)
Log the string, if logging is enabled.

Parameters:
string - the string to log