Interface PartitioningStrategy<T>
- Type Parameters:
T- the object type
- All Known Subinterfaces:
GenericPartitioningStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function which determines the position of an object within a
Bucket.
Functions will not necessarily return consistent results for subsequent calls using the same parameters, as their behaviour usually depends heavily on current bucket state.
-
Method Summary
-
Method Details
-
allocate
Calculates the index of the partition to use for the object.The index must be within range of the buckets size.
- Parameters:
object- the objectbucket- the bucket- Returns:
- the index
-