Class ReliabilityStrategyFactory


public final class ReliabilityStrategyFactory extends Object
Factory for ReliabilityStrategies.
  • Method Details

    • getReliabilityStrategy

      public static ReliabilityStrategy getReliabilityStrategy(LoggerConfig loggerConfig)
      Returns a new ReliabilityStrategy instance based on the value of system property log4j.ReliabilityStrategy. If not value was specified this method returns a new AwaitUnconditionallyReliabilityStrategy.

      Valid values for this system property are "AwaitUnconditionally" (use AwaitUnconditionallyReliabilityStrategy), "Locking" (use LockingReliabilityStrategy) and "AwaitCompletion" (use the default AwaitCompletionReliabilityStrategy).

      Users may also use this system property to specify the fully qualified class name of a class that implements the ReliabilityStrategy and has a constructor that accepts a single LoggerConfig argument.

      loggerConfig - the LoggerConfig the resulting ReliabilityStrategy is associated with
      a ReliabilityStrategy that helps the specified LoggerConfig to log events reliably during or after a configuration change