Class ReceptionistMessages.Listing<T>
- All Implemented Interfaces:
Serializable,Receptionist.Listing,scala.Equals,scala.Product
- Enclosing class:
- ReceptionistMessages
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<M> scala.collection.immutable.Set<ActorRef<M>>allServiceInstances(ServiceKey<M> key) Scala API: Return both the reachable and the unreachable service instances.boolean<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><T> scala.collection.immutable.Set<ActorRef<T>><T> scala.collection.immutable.Set<ActorRef<T>><T> booleanbooleangetAllServiceInstances(ServiceKey<M> key) Java API: Return both the reachable and the unreachable service instances.getServiceInstances(ServiceKey<M> key) Java API: Return the reachable service instances.inthashCode()booleanisForKey(ServiceKey<?> key) key()Scala APIintproductElement(int x$1) productElementName(int x$1) scala.collection.Iterator<Object><M> scala.collection.immutable.Set<ActorRef<M>>serviceInstances(ServiceKey<M> key) Scala API: Return the reachable service instances.booleanReturnstrueonly if thisListingwas sent triggered by new actors added or removed to the receptionist.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface scala.Product
productElementNamesMethods inherited from interface org.apache.pekko.actor.typed.receptionist.Receptionist.Listing
getKey
-
Method Details
-
key
Description copied from interface:Receptionist.ListingScala API- Specified by:
keyin interfaceReceptionist.Listing
-
_serviceInstances
-
_allServiceInstances
-
servicesWereAddedOrRemoved
public boolean servicesWereAddedOrRemoved()Description copied from interface:Receptionist.ListingReturnstrueonly if thisListingwas sent triggered by new actors added or removed to the receptionist. Whenfalsethe event is only about reachability changes - meaning that the full set of actors (Receptionist.Listing.allServiceInstances(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>)orReceptionist.Listing.getAllServiceInstances(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>)) is the same as the previousListing.knowing this is useful for subscribers only concerned with
Receptionist.Listing.allServiceInstances(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>)orReceptionist.Listing.getAllServiceInstances(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>)that can then ignoreListings related to reachability.In a non-clustered
ActorSystemthis will betruefor all listings. ForFindqueries and the initial listing for aSubscribethis will always betrue.- Specified by:
servicesWereAddedOrRemovedin interfaceReceptionist.Listing
-
isForKey
- Specified by:
isForKeyin interfaceReceptionist.Listing
-
serviceInstances
Description copied from interface:Receptionist.ListingScala API: Return the reachable service instances.In a non-clustered
ActorSystemthis will always be all registered instances for a service key.For a clustered
ActorSystemit 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(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>)Also, see
ServiceKey.Listingfor more convenient pattern matching- Specified by:
serviceInstancesin interfaceReceptionist.Listing
-
getServiceInstances
Description copied from interface:Receptionist.ListingJava API: Return the reachable service instances.In a non-clustered
ActorSystemthis will always be all registered instances for a service key.For a clustered
ActorSystemit 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(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>)- Specified by:
getServiceInstancesin interfaceReceptionist.Listing
-
allServiceInstances
Description copied from interface:Receptionist.ListingScala API: Return both the reachable and the unreachable service instances.In a non-clustered
ActorSystemthis will always be the same asReceptionist.Listing.serviceInstances(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>).For a clustered
ActorSystemthis include both services on nodes that are reachable and nodes that are unreachable.- Specified by:
allServiceInstancesin interfaceReceptionist.Listing
-
getAllServiceInstances
Description copied from interface:Receptionist.ListingJava API: Return both the reachable and the unreachable service instances.In a non-clustered
ActorSystemthis will always be the same asReceptionist.Listing.getServiceInstances(org.apache.pekko.actor.typed.receptionist.ServiceKey<T>).For a clustered
ActorSystemthis include both services on nodes that are reachable and nodes that are unreachable.- Specified by:
getAllServiceInstancesin 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
-
copy$default$2
-
copy$default$3
-
copy$default$4
public <T> boolean copy$default$4() -
productPrefix
- Specified by:
productPrefixin interfacescala.Product
-
productArity
public int productArity()- Specified by:
productArityin interfacescala.Product
-
productElement
- Specified by:
productElementin interfacescala.Product
-
productIterator
- Specified by:
productIteratorin interfacescala.Product
-
canEqual
- Specified by:
canEqualin interfacescala.Equals
-
productElementName
- Specified by:
productElementNamein interfacescala.Product
-
hashCode
public int hashCode() -
toString
-
equals
-