Interface WorkPartitionService

    • Method Detail

      • isMine

        <K> boolean isMine​(K id,
                           Function<K,​Long> hasher)
        Returns whether a given identifier maps to a partition owned by this instance.
        Type Parameters:
        K - entity type
        Parameters:
        id - identifier
        hasher - function that maps identifier to a long value
        Returns:
        true if the identifier maps to a partition owned by this instance, otherwise false
      • getLeader

        <K> NodeId getLeader​(K id,
                             Function<K,​Long> hasher)
        Returns the owner for a given identifier.
        Type Parameters:
        K - entity type
        Parameters:
        id - identifier to query
        hasher - function that maps id to a long value
        Returns:
        the leader node identifier