Class FailureDetectorLoader

java.lang.Object
org.apache.pekko.remote.FailureDetectorLoader

public class FailureDetectorLoader extends Object
INTERNAL API

Utility class to create FailureDetector instances reflectively.

  • Constructor Details

    • FailureDetectorLoader

      public FailureDetectorLoader()
  • Method Details

    • load

      public static FailureDetector load(String fqcn, com.typesafe.config.Config config, ActorSystem system)
      Loads and instantiates a given FailureDetector implementation. The class to be loaded must have a constructor that accepts a Config and an pekko.event.EventStream parameter. Will throw ConfigurationException if the implementation cannot be loaded.

      Parameters:
      fqcn - Fully qualified class name of the implementation to be loaded.
      config - Configuration that will be passed to the implementation
      system - ActorSystem to be used for loading the implementation
      Returns:
      A configured instance of the given FailureDetector implementation
    • apply

      public static FailureDetector apply(String fqcn, com.typesafe.config.Config config, ActorContext ctx)
      Loads and instantiates a given FailureDetector implementation. The class to be loaded must have a constructor that accepts a Config and an pekko.event.EventStream parameter. Will throw ConfigurationException if the implementation cannot be loaded. Use load(java.lang.String, com.typesafe.config.Config, org.apache.pekko.actor.ActorSystem) if no implicit pekko.actor.ActorContext is available.

      Parameters:
      fqcn - Fully qualified class name of the implementation to be loaded.
      config - Configuration that will be passed to the implementation
      Returns: