Interface PeerAddressResolver

  • All Known Implementing Classes:
    NoopPeerAddressResolver
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PeerAddressResolver
    Interface to resolve raft actor peer addresses.
    Author:
    Thomas Pantelis
    • Method Detail

      • resolve

        @Nullable String resolve​(String peerId)
        Resolves a raft actor peer id to its remote actor address.
        Parameters:
        peerId - the id of the peer to resolve
        Returns:
        the peer's actor path string or null if not found
      • setResolved

        default void setResolved​(String peerId,
                                 String address)
        Sets the actor address for a raft peer.
        Parameters:
        peerId - the id of the peer
        address - the peer's actor's address