Interface Coordinators


public interface Coordinators
A snapshot of coordinator assignments, returned by TopologyService.coordinators(java.lang.String, byte, java.util.Set<java.lang.String>).

This is a self-contained result — callers should use it directly rather than querying the topology cache separately. The key type is implicit (it was specified in the coordinators() call that produced this result).

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the coordinator for the given key, or empty if the coordinator was not discovered (e.g. the group or transaction does not exist, or the coordinator is unavailable).
  • Method Details

    • coordinatorFor

      Optional<VirtualNode> coordinatorFor(String key)
      Returns the coordinator for the given key, or empty if the coordinator was not discovered (e.g. the group or transaction does not exist, or the coordinator is unavailable).
      Parameters:
      key - the group or transaction ID
      Returns:
      the coordinator's virtual node, or empty