@FunctionalInterface public interface GenericPartitioningStrategy extends PartitioningStrategy<Object>
PartitioningStrategy which allocates partitions without reference
to the object being added.| Modifier and Type | Method and Description |
|---|---|
int |
allocate(Bucket<?> bucket)
Calculates the index of the partition to use for any given object.
|
default int |
allocate(Object object,
Bucket<Object> bucket)
Deprecated.
|
default <T> PartitioningStrategy<T> |
cast()
Casts this
GenericPartitioningStrategy to a PartitioningStrategy of type T. |
int allocate(Bucket<?> bucket)
bucket - the bucketdefault <T> PartitioningStrategy<T> cast()
GenericPartitioningStrategy to a PartitioningStrategy of type T.T - the type@Deprecated default int allocate(Object object, Bucket<Object> bucket)
PartitioningStrategyThe index must be within range of the buckets size.
allocate in interface PartitioningStrategy<Object>object - the objectbucket - the bucketCopyright © 2022. All rights reserved.