org.cdlib.xtf.util
Class DiskHashWriter

Object
  extended by DiskHashWriter

public class DiskHashWriter
extends Object

Creates a persistent string to byte buffer hash table on disk, optimized for quick access. It can be read back later using a DiskHashReader.

Author:
Martin Haye

Field Summary
private  HashMap memMap
          Keeps track of entries in memory until we're ready to write to disk
static Tester tester
           
 
Constructor Summary
DiskHashWriter()
           
 
Method Summary
 void outputTo(SubStoreWriter out)
          Writes out the entire hash
 void put(String key, PackedByteBuf val)
          Add a new key/value pair to the hash.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

memMap

private HashMap memMap
Keeps track of entries in memory until we're ready to write to disk


tester

public static final Tester tester
Constructor Detail

DiskHashWriter

public DiskHashWriter()
Method Detail

put

public void put(String key,
                PackedByteBuf val)
Add a new key/value pair to the hash.


outputTo

public void outputTo(SubStoreWriter out)
              throws IOException
Writes out the entire hash

Throws:
IOException