Interface PartitionPredicate<K,V>

Type Parameters:
K - type of the entry key
V - type of the entry value
All Superinterfaces:
Predicate<K,V>, Serializable

public interface PartitionPredicate<K,V> extends Predicate<K,V>
A Predicate that restricts the execution of a Predicate to specific partitions. This can help to speed up query execution since only a subset of all partitions needs to be queried. This predicate only has effect if used as an outermost predicate.
See Also:
  • Method Details

    • getPartitionKeys

      default Collection<? extends Object> getPartitionKeys()
      Returns the partition keys that determine the partitions the target Predicate 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.
      the partition keys
    • 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.
      the single key
    • getTarget

      Predicate<K,V> getTarget()
      Returns the target Predicate.