Package com.hazelcast.query
Interface PartitionPredicate<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Object
getPartitionKey()
Returns a random partition key from the collection.default java.util.Collection<? extends java.lang.Object>
getPartitionKeys()
Predicate<K,V>
getTarget()
Returns the targetPredicate
.
-
-
-
Method Detail
-
getPartitionKeys
default java.util.Collection<? extends java.lang.Object> getPartitionKeys()
Returns the partition keys that determine the partitions the targetPredicate
is going to execute on. A default implementation of partition keys that wraps the partition key in a singleton collection is provided for backwards compatibility.- Returns:
- the partition keys
- Since:
- 5.2
-
getPartitionKey
java.lang.Object getPartitionKey()
Returns a random partition key from the collection. This is useful for client message routing to cluster instances. If there is a single value in the collection it is always returned as-is to be backwards compatible with older versions of PartitionPredicate.- Returns:
- the single key
-
-