Class ReceptionistMessages.Listing<T>
- java.lang.Object
-
- akka.actor.typed.internal.receptionist.ReceptionistMessages.Listing<T>
-
- All Implemented Interfaces:
Receptionist.Listing
,java.io.Serializable
,scala.Equals
,scala.Product
- Enclosing class:
- ReceptionistMessages
public static final class ReceptionistMessages.Listing<T> extends java.lang.Object implements Receptionist.Listing, scala.Product, java.io.Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.collection.immutable.Set<ActorRef<T>>
_allServiceInstances()
scala.collection.immutable.Set<ActorRef<T>>
_serviceInstances()
<M> scala.collection.immutable.Set<ActorRef<M>>
allServiceInstances(ServiceKey<M> key)
Scala API: Return both the reachable and the unreachable service instances.boolean
canEqual(java.lang.Object x$1)
<T> ReceptionistMessages.Listing<T>
copy(ServiceKey<T> key, scala.collection.immutable.Set<ActorRef<T>> _serviceInstances, scala.collection.immutable.Set<ActorRef<T>> _allServiceInstances, boolean servicesWereAddedOrRemoved)
<T> ServiceKey<T>
copy$default$1()
<T> scala.collection.immutable.Set<ActorRef<T>>
copy$default$2()
<T> scala.collection.immutable.Set<ActorRef<T>>
copy$default$3()
<T> boolean
copy$default$4()
boolean
equals(java.lang.Object x$1)
<M> java.util.Set<ActorRef<M>>
getAllServiceInstances(ServiceKey<M> key)
Java API: Return both the reachable and the unreachable service instances.<M> java.util.Set<ActorRef<M>>
getServiceInstances(ServiceKey<M> key)
Java API: Return the reachable service instances.int
hashCode()
boolean
isForKey(ServiceKey<?> key)
ServiceKey<T>
key()
Scala APIint
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
<M> scala.collection.immutable.Set<ActorRef<M>>
serviceInstances(ServiceKey<M> key)
Scala API: Return the reachable service instances.boolean
servicesWereAddedOrRemoved()
Returnstrue
only if thisListing
was sent triggered by new actors added or removed to the receptionist.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface akka.actor.typed.receptionist.Receptionist.Listing
getKey
-
-
-
-
Method Detail
-
key
public ServiceKey<T> key()
Description copied from interface:Receptionist.Listing
Scala API- Specified by:
key
in interfaceReceptionist.Listing
-
servicesWereAddedOrRemoved
public boolean servicesWereAddedOrRemoved()
Description copied from interface:Receptionist.Listing
Returnstrue
only if thisListing
was sent triggered by new actors added or removed to the receptionist. Whenfalse
the event is only about reachability changes - meaning that the full set of actors (Receptionist.Listing.allServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)
orReceptionist.Listing.getAllServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)
) is the same as the previousListing
.knowing this is useful for subscribers only concerned with
Receptionist.Listing.allServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)
orReceptionist.Listing.getAllServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)
that can then ignoreListing
s related to reachability.In a non-clustered
ActorSystem
this will betrue
for all listings. ForFind
queries and the initial listing for aSubscribe
this will always betrue
.- Specified by:
servicesWereAddedOrRemoved
in interfaceReceptionist.Listing
-
isForKey
public boolean isForKey(ServiceKey<?> key)
- Specified by:
isForKey
in interfaceReceptionist.Listing
-
serviceInstances
public <M> scala.collection.immutable.Set<ActorRef<M>> serviceInstances(ServiceKey<M> key)
Description copied from interface:Receptionist.Listing
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
Receptionist.Listing.allServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)
Also, see
ServiceKey.Listing
for more convenient pattern matching- Specified by:
serviceInstances
in interfaceReceptionist.Listing
-
getServiceInstances
public <M> java.util.Set<ActorRef<M>> getServiceInstances(ServiceKey<M> key)
Description copied from interface:Receptionist.Listing
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
Receptionist.Listing.getAllServiceInstances(akka.actor.typed.receptionist.ServiceKey<T>)
- Specified by:
getServiceInstances
in interfaceReceptionist.Listing
-
allServiceInstances
public <M> scala.collection.immutable.Set<ActorRef<M>> allServiceInstances(ServiceKey<M> key)
Description copied from interface:Receptionist.Listing
Scala API: Return both the reachable and the unreachable service instances.In a non-clustered
ActorSystem
this will always be the same asReceptionist.Listing.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.- Specified by:
allServiceInstances
in interfaceReceptionist.Listing
-
getAllServiceInstances
public <M> java.util.Set<ActorRef<M>> getAllServiceInstances(ServiceKey<M> key)
Description copied from interface:Receptionist.Listing
Java API: Return both the reachable and the unreachable service instances.In a non-clustered
ActorSystem
this will always be the same asReceptionist.Listing.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.- Specified by:
getAllServiceInstances
in interfaceReceptionist.Listing
-
copy
public <T> ReceptionistMessages.Listing<T> copy(ServiceKey<T> key, scala.collection.immutable.Set<ActorRef<T>> _serviceInstances, scala.collection.immutable.Set<ActorRef<T>> _allServiceInstances, boolean servicesWereAddedOrRemoved)
-
copy$default$1
public <T> ServiceKey<T> copy$default$1()
-
copy$default$2
public <T> scala.collection.immutable.Set<ActorRef<T>> copy$default$2()
-
copy$default$3
public <T> scala.collection.immutable.Set<ActorRef<T>> copy$default$3()
-
copy$default$4
public <T> boolean copy$default$4()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-