Enum Class CircuitBreakerConfig.SlidingWindowSynchronizationStrategy

java.lang.Object
java.lang.Enum<CircuitBreakerConfig.SlidingWindowSynchronizationStrategy>
io.github.resilience4j.circuitbreaker.CircuitBreakerConfig.SlidingWindowSynchronizationStrategy
All Implemented Interfaces:
Serializable, Comparable<CircuitBreakerConfig.SlidingWindowSynchronizationStrategy>, Constable
Enclosing class:
CircuitBreakerConfig

public static enum CircuitBreakerConfig.SlidingWindowSynchronizationStrategy extends Enum<CircuitBreakerConfig.SlidingWindowSynchronizationStrategy>
  • Enum Constant Details

    • LOCK_FREE

      Lock-free algorithm based on CAS of immutable objects. This option is preferable in cases of high concurrency, as contention is handled better since threads cannot block each other. It has the disadvantage of allocating more objects as they cannot be mutated in place.
    • SYNCHRONIZED

      Blocking algorithm using locks. This option does not allocate extra memory, but threads can block each other. One thread that acquired the lock and is superseded from the CPU will block all other threads until is scheduled again by the OS scheduler.
  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null