Package com.apple.foundationdb.async
Class RankedSet.ConfigBuilder
java.lang.Object
com.apple.foundationdb.async.RankedSet.ConfigBuilder
- Enclosing class:
- RankedSet
Builder for
RankedSet.Config
.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
ConfigBuilder
(RankedSet.HashFunction hashFunction, int nlevels, boolean countDuplicates) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
int
boolean
setCountDuplicates
(boolean countDuplicates) Set whether to count duplicate keys separately.setHashFunction
(RankedSet.HashFunction hashFunction) Set the hash function to use.setNLevels
(int nlevels) Set the hash function to use.
-
Constructor Details
-
ConfigBuilder
protected ConfigBuilder() -
ConfigBuilder
-
-
Method Details
-
getHashFunction
-
setHashFunction
Set the hash function to use. It is possible to change the hash function of an existing ranked set, although this is not recommended since the distribution in the skip list may become uneven as a result.- Parameters:
hashFunction
- the hash function to use- Returns:
- this builder
-
getNLevels
public int getNLevels() -
setNLevels
Set the hash function to use. It is not currently possible to change the number of levels for an existing ranked set.- Parameters:
nlevels
- the number of levels to use- Returns:
- this builder
-
isCountDuplicates
public boolean isCountDuplicates() -
setCountDuplicates
Set whether to count duplicate keys separately. If duplicate keys are counted separately, ranks after them are increased by the number of duplicates.- Parameters:
countDuplicates
- whether to count duplicates- Returns:
- this builder
-
build
-