Package akka.actor.typed.pubsub
Class PubSub
- java.lang.Object
-
- akka.actor.typed.pubsub.PubSub
-
-
Constructor Summary
Constructors Constructor Description PubSub(ActorSystem<?> system)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static T
apply(ActorSystem<?> system)
static PubSub
createExtension(ActorSystem<?> system)
scala.collection.immutable.Set<java.lang.String>
currentTopics()
Scala API: return the current set of running topicsstatic boolean
equals(java.lang.Object other)
static PubSub
get(ActorSystem<?> system)
java.util.Set<java.lang.String>
getCurrentTopics()
Java API: return the current set of running topicsstatic int
hashCode()
static ExtensionId<T>
id()
<T> ActorRef<Topic.Command<T>>
topic(java.lang.Class<T> messageClass, java.lang.String name)
Java API: Spawn an actor with the given topic name or share an existing one if it is already running.<T> ActorRef<Topic.Command<T>>
topic(java.lang.Class<T> messageClass, java.lang.String name, java.time.Duration ttl)
Scala API: Spawn an actor with the given topic name or share an existing one if it is already running.<T> ActorRef<Topic.Command<T>>
topic(java.lang.String name, scala.concurrent.duration.FiniteDuration ttl, scala.reflect.ClassTag<T> classTag)
Scala API: Spawn an actor with the given topic name or share an existing one if it is already running.<T> ActorRef<Topic.Command<T>>
topic(java.lang.String name, scala.reflect.ClassTag<T> classTag)
Scala API: Spawn an actor with the given topic name or share an existing one if it is already running.
-
-
-
Constructor Detail
-
PubSub
public PubSub(ActorSystem<?> system)
-
-
Method Detail
-
createExtension
public static PubSub createExtension(ActorSystem<?> system)
-
get
public static PubSub get(ActorSystem<?> system)
-
apply
public static final T apply(ActorSystem<?> system)
-
hashCode
public static final int hashCode()
-
equals
public static final boolean equals(java.lang.Object other)
-
id
public static ExtensionId<T> id()
-
topic
public <T> ActorRef<Topic.Command<T>> topic(java.lang.String name, scala.reflect.ClassTag<T> classTag)
Scala API: Spawn an actor with the given topic name or share an existing one if it is already running.Note that
Topic
actors manually started will not be part of this registry.
-
topic
public <T> ActorRef<Topic.Command<T>> topic(java.lang.String name, scala.concurrent.duration.FiniteDuration ttl, scala.reflect.ClassTag<T> classTag)
Scala API: Spawn an actor with the given topic name or share an existing one if it is already running.Note that
Topic
actors manually started will not be part of this registry.- Parameters:
ttl
- If the topic is idle this long, shut the actor down. All calls totopic
for the same topic name should use the same ttl.
-
topic
public <T> ActorRef<Topic.Command<T>> topic(java.lang.Class<T> messageClass, java.lang.String name)
Java API: Spawn an actor with the given topic name or share an existing one if it is already running.Note that
Topic
actors manually started will not be part of this registry.- Parameters:
messageClass
- the type of messages the topic accepts for publishing and subscribing
-
topic
public <T> ActorRef<Topic.Command<T>> topic(java.lang.Class<T> messageClass, java.lang.String name, java.time.Duration ttl)
Scala API: Spawn an actor with the given topic name or share an existing one if it is already running.Note that
Topic
actors manually started will not be part of this registry.- Parameters:
ttl
- If the topic is idle this long, shut the actor down. All calls totopic
for the same topic name should use the same ttl.
-
currentTopics
public scala.collection.immutable.Set<java.lang.String> currentTopics()
Scala API: return the current set of running topics
-
getCurrentTopics
public java.util.Set<java.lang.String> getCurrentTopics()
Java API: return the current set of running topics
-
-