Class FSTUTFStringOffheapMap<V>


public class FSTUTFStringOffheapMap<V> extends FSTSerializedOffheapMap<String,V>
Created by ruedi on 05/08/15.
  • Constructor Details

    • FSTUTFStringOffheapMap

      public FSTUTFStringOffheapMap(int keyLen, long sizeMemBytes, int numberOfEleems, FSTCoder coder)
      see other mem constructor, additional allows to insert a coder. Useful to preregister classes (speed+size gain, no classnames written!). E.g. new DefaultCoder(MyValue.class, MyOtherValue.class, .. )
    • FSTUTFStringOffheapMap

      public FSTUTFStringOffheapMap(int keyLen, long sizeMemBytes, int numberOfEleems)
      Parameters:
      keyLen - - maximum len of a key
      sizeMemBytes - - size of memory (not bigger than OS heap
      numberOfEleems - - estimation on number of key-value pairs (autogrow, just educated guess)
    • FSTUTFStringOffheapMap

      public FSTUTFStringOffheapMap(String mappedFile, int keyLen, long sizeMemBytes, int numberOfElems, FSTCoder coder) throws Exception
      see other mem mapped file constructor + additional allows to insert a coder. Useful to preregister classes (speed+size gain, no classnames written!). E.g. new DefaultCoder(MyValue.class, MyOtherValue.class, .. )
      Throws:
      Exception
    • FSTUTFStringOffheapMap

      public FSTUTFStringOffheapMap(String file, int keylen, long size, int numelem) throws Exception
      create a memory mapped offheap hashmap
      Parameters:
      file - - the file location. If file exists, it will be loaded Attention: in case classes changed you need to delete files as objects won't be compatible (except you made use of fst versioning features)
      keylen - - the maximum len of a key
      size - - max size of file (can be GB, check OS settings to avoid eager write-to-disk)
      numelem - - estimated number of key-value pairs (will auto-grow, just educated guess)
      Throws:
      Exception
  • Method Details