Interface PartitionPredicate<K,​V>

  • Type Parameters:
    K - type of the entry key
    V - type of the entry value
    All Superinterfaces:

    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:
    Predicates.partitionPredicate(Object, Predicate)
    • Method Detail

      • getPartitionKeys

        default java.util.Collection<? extends java.lang.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

        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.
        the single key