org.mapdb
Class DB.BTreeSetMaker

java.lang.Object
  extended by org.mapdb.DB.BTreeSetMaker
Enclosing class:
DB

public class DB.BTreeSetMaker
extends Object


Field Summary
protected  Comparator<?> comparator
           
protected  boolean counter
           
protected  String name
           
protected  int nodeSize
           
protected  boolean pumpIgnoreDuplicates
           
protected  int pumpPresortBatchSize
           
protected  Iterator<?> pumpSource
           
protected  BTreeKeySerializer<?> serializer
           
 
Constructor Summary
DB.BTreeSetMaker(String name)
           
 
Method Summary
 DB.BTreeSetMaker comparator(Comparator<?> comparator)
          comparator used to sort keys.
 DB.BTreeSetMaker counterEnable()
          by default collection does not have counter, without counter updates are faster, but entire collection needs to be traversed to count items.
<K> NavigableSet<K>
make()
           
 NavigableSet<Long> makeLongSet()
          creates set optimized for using zero or positive `Long`
<K> NavigableSet<K>
makeOrGet()
           
 NavigableSet<String> makeStringSet()
          creates set optimized for using `String`
 DB.BTreeSetMaker nodeSize(int nodeSize)
          nodeSize maximal size of node, larger node causes overflow and creation of new BTree node.
<K> DB.BTreeSetMaker
pumpIgnoreDuplicates()
          If source iteretor contains an duplicate key, exception is thrown.
 DB.BTreeSetMaker pumpPresort(int batchSize)
           
 DB.BTreeSetMaker pumpSource(Iterator<?> source)
           
 DB.BTreeSetMaker serializer(BTreeKeySerializer<?> serializer)
          keySerializer used to convert keys into/from binary form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name

nodeSize

protected int nodeSize

counter

protected boolean counter

serializer

protected BTreeKeySerializer<?> serializer

comparator

protected Comparator<?> comparator

pumpSource

protected Iterator<?> pumpSource

pumpPresortBatchSize

protected int pumpPresortBatchSize

pumpIgnoreDuplicates

protected boolean pumpIgnoreDuplicates
Constructor Detail

DB.BTreeSetMaker

public DB.BTreeSetMaker(String name)
Method Detail

nodeSize

public DB.BTreeSetMaker nodeSize(int nodeSize)
nodeSize maximal size of node, larger node causes overflow and creation of new BTree node. Use large number for small keys, use small number for large keys.


counterEnable

public DB.BTreeSetMaker counterEnable()
by default collection does not have counter, without counter updates are faster, but entire collection needs to be traversed to count items.


serializer

public DB.BTreeSetMaker serializer(BTreeKeySerializer<?> serializer)
keySerializer used to convert keys into/from binary form.


comparator

public DB.BTreeSetMaker comparator(Comparator<?> comparator)
comparator used to sort keys.


pumpSource

public DB.BTreeSetMaker pumpSource(Iterator<?> source)

pumpIgnoreDuplicates

public <K> DB.BTreeSetMaker pumpIgnoreDuplicates()
If source iteretor contains an duplicate key, exception is thrown. This options will only use firts key and ignore any consequentive duplicates.


pumpPresort

public DB.BTreeSetMaker pumpPresort(int batchSize)

make

public <K> NavigableSet<K> make()

makeOrGet

public <K> NavigableSet<K> makeOrGet()

makeStringSet

public NavigableSet<String> makeStringSet()
creates set optimized for using `String`


makeLongSet

public NavigableSet<Long> makeLongSet()
creates set optimized for using zero or positive `Long`



Copyright © 2014. All Rights Reserved.