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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T extends Extension>
      T
      extension​(ExtensionId<T> ext)
      Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered.
      boolean hasExtension​(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>
      T
      registerExtension​(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 Detail

      • extension

        <T extends Extension> T extension​(ExtensionId<T> ext)
        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

        boolean hasExtension​(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
      • registerExtension

        <T extends Extension> T registerExtension​(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