Package org.apache.pekko.remote
Class FailureDetectorLoader
- java.lang.Object
-
- org.apache.pekko.remote.FailureDetectorLoader
-
public class FailureDetectorLoader extends java.lang.Object
INTERNAL APIUtility class to create
FailureDetector
instances reflectively.
-
-
Constructor Summary
Constructors Constructor Description FailureDetectorLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FailureDetector
apply(java.lang.String fqcn, com.typesafe.config.Config config, ActorContext ctx)
Loads and instantiates a givenFailureDetector
implementation.static FailureDetector
load(java.lang.String fqcn, com.typesafe.config.Config config, ActorSystem system)
Loads and instantiates a givenFailureDetector
implementation.
-
-
-
Method Detail
-
load
public static FailureDetector load(java.lang.String fqcn, com.typesafe.config.Config config, ActorSystem system)
Loads and instantiates a givenFailureDetector
implementation. The class to be loaded must have a constructor that accepts aConfig
and anpekko.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 implementationsystem
- ActorSystem to be used for loading the implementation- Returns:
- A configured instance of the given
FailureDetector
implementation
-
apply
public static FailureDetector apply(java.lang.String fqcn, com.typesafe.config.Config config, ActorContext ctx)
Loads and instantiates a givenFailureDetector
implementation. The class to be loaded must have a constructor that accepts aConfig
and anpekko.event.EventStream
parameter. Will throw ConfigurationException if the implementation cannot be loaded. Useload(java.lang.String, com.typesafe.config.Config, org.apache.pekko.actor.ActorSystem)
if no implicitpekko.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:
-
-