Package org.apache.pekko.event
Interface LookupClassification
public interface LookupClassification
Maps Subscribers to Classifiers using equality on Classifier to store a Set of Subscribers (hence the need for compareSubscribers)
Maps Events to Classifiers through the classify-method (so it knows who to publish to)
The compareSubscribers need to provide a total ordering of the Subscribers
-
Method Summary
Modifier and TypeMethodDescriptionclassify(LookupClassification event) Returns the Classifier associated with the given EventintProvides a total ordering of Subscribers (think java.util.Comparator.compare)intmapSize()This is a size hint for the number of Classifiers you expect to have (use powers of 2)voidvoidpublish(LookupClassification event) voidpublish(LookupClassification event, LookupClassification subscriber) Publishes the given Event to the given Subscriberbooleansubscribe(LookupClassification subscriber, LookupClassification to) voidunsubscribe(LookupClassification subscriber) booleanunsubscribe(LookupClassification subscriber, LookupClassification from)
-
Method Details
-
classify
Returns the Classifier associated with the given Event -
compareSubscribers
Provides a total ordering of Subscribers (think java.util.Comparator.compare) -
mapSize
int mapSize()This is a size hint for the number of Classifiers you expect to have (use powers of 2) -
org$apache$pekko$event$LookupClassification$_setter_$subscribers_$eq
-
publish
Publishes the given Event to the given Subscriber -
publish
-
subscribe
-
subscribers
-
unsubscribe
-
unsubscribe
-