Package com.hazelcast.query
Interface PartitionPredicate<K,V>
- Type Parameters:
K
- type of the entry keyV
- type of the entry value
- All Superinterfaces:
Predicate<K,
,V> Serializable
-
Method Summary
Modifier and TypeMethodDescriptionReturns a random partition key from the collection.default Collection<? extends Object>
Returns the targetPredicate
.
-
Method Details
-
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
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
-
getTarget
Returns the targetPredicate
.
-