Package org.apache.pekko.actor.typed
Interface Extensions
- All Known Subinterfaces:
ExtensionsImpl
- All Known Implementing Classes:
ActorSystem
public interface Extensions
API for registering and looking up extensions.
Not for user extension.
-
Method Summary
Modifier and TypeMethodDescription<T extends Extension>
Textension(ExtensionId<T> ext) Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered.booleanhasExtension(ExtensionId<? extends Extension> ext) Returns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution<T extends Extension>
TregisterExtension(ExtensionId<T> ext) Registers the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
-
Method Details
-
extension
Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered. This method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution -
hasExtension
Returns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution -
registerExtension
Registers the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
-