Interface Receptionist.Listing

    • Method Detail

      • isForKey

        boolean isForKey​(ServiceKey<?> key)
      • serviceInstances

        <T> scala.collection.immutable.Set<ActorRef<T>> serviceInstances​(ServiceKey<T> key)
        Scala API: Return the reachable service instances.

        In a non-clustered ActorSystem this will always be all registered instances for a service key.

        For a clustered ActorSystem it only contain services on nodes that are not seen as unreachable (note that they could have still have become unreachable between this message being sent and the receiving actor processing it).

        For a list including both reachable and unreachable instances see allServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)

        Also, see ServiceKey.Listing for more convenient pattern matching

        Parameters:
        key - (undocumented)
        Returns:
        (undocumented)
      • getServiceInstances

        <T> java.util.Set<ActorRef<T>> getServiceInstances​(ServiceKey<T> key)
        Java API: Return the reachable service instances.

        In a non-clustered ActorSystem this will always be all registered instances for a service key.

        For a clustered ActorSystem it only contain services on nodes that has are not seen as unreachable (note that they could have still have become unreachable between this message being sent and the receiving actor processing it).

        For a list including both reachable and unreachable instances see getAllServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)

        Parameters:
        key - (undocumented)
        Returns:
        (undocumented)
      • allServiceInstances

        <T> scala.collection.immutable.Set<ActorRef<T>> allServiceInstances​(ServiceKey<T> key)
        Scala API: Return both the reachable and the unreachable service instances.

        In a non-clustered ActorSystem this will always be the same as serviceInstances(akka.actor.typed.receptionist.ServiceKey<T>).

        For a clustered ActorSystem this include both services on nodes that are reachable and nodes that are unreachable.

        Parameters:
        key - (undocumented)
        Returns:
        (undocumented)
      • getAllServiceInstances

        <T> java.util.Set<ActorRef<T>> getAllServiceInstances​(ServiceKey<T> key)
        Java API: Return both the reachable and the unreachable service instances.

        In a non-clustered ActorSystem this will always be the same as getServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>).

        For a clustered ActorSystem this include both services on nodes that are reachable and nodes that are unreachable.

        Parameters:
        key - (undocumented)
        Returns:
        (undocumented)