Interface Grouper.KeySerdeFactory<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
copyKey(T key)
Copies a key.Grouper.KeySerde<T>
factorize()
Create a newGrouper.KeySerde
, which may be stateful.Grouper.KeySerde<T>
factorizeWithDictionary(List<String> dictionary)
Create a newGrouper.KeySerde
with the given dictionary.long
getMaxDictionarySize()
Return max dictionary size threshold.Comparator<Grouper.Entry<T>>
objectComparator(boolean forceDefaultOrder)
Return an object that knows how to compare two serialized key instances.
-
-
-
Method Detail
-
getMaxDictionarySize
long getMaxDictionarySize()
Return max dictionary size threshold.- Returns:
- max dictionary size
-
factorize
Grouper.KeySerde<T> factorize()
Create a newGrouper.KeySerde
, which may be stateful.
-
factorizeWithDictionary
Grouper.KeySerde<T> factorizeWithDictionary(List<String> dictionary)
Create a newGrouper.KeySerde
with the given dictionary.
-
copyKey
T copyKey(T key)
Copies a key. Required if the key from anGrouper.Entry
fromGrouper.iterator(boolean)
will be retained past the following call to next().
-
objectComparator
Comparator<Grouper.Entry<T>> objectComparator(boolean forceDefaultOrder)
Return an object that knows how to compare two serialized key instances. Will be called by theGrouper.iterator(boolean)
method if sorting is enabled.- Parameters:
forceDefaultOrder
- Return a comparator that sorts by the key in default lexicographic ascending order, regardless of any other conditions (e.g., presence of OrderBySpecs).- Returns:
- comparator for key objects.
-
-