Enum Class FcEventType

java.lang.Object
java.lang.Enum<FcEventType>
org.frontcache.resilience.FcEventType
All Implemented Interfaces:
Serializable, Comparable<FcEventType>, Constable

public enum FcEventType extends Enum<FcEventType>
Execution outcomes of an FcCommand, replacing com.netflix.hystrix.HystrixEventType. The first ten constants are one-for-one with the Hystrix event types Frontcache can produce, and their rolling counts feed the rollingCount* fields of the dashboard JSON - so the set is fixed by that wire contract, not by what the code happens to need. COLLAPSED and RESPONSE_FROM_CACHE are here for exactly that reason: Frontcache never emits them (it registers no collapsers and does not use request caching), but the dashboard asserts their fields exist, so the emitter needs a counter to read a zero from. See docs/archive/hystrix-to-resilience4j-proposal.md sections 4.1 and 7.3.
  • Enum Constant Details

    • SUCCESS

      public static final FcEventType SUCCESS
    • FAILURE

      public static final FcEventType FAILURE
    • TIMEOUT

      public static final FcEventType TIMEOUT
    • BAD_REQUEST

      public static final FcEventType BAD_REQUEST
    • SHORT_CIRCUITED

      public static final FcEventType SHORT_CIRCUITED
    • THREAD_POOL_REJECTED

      public static final FcEventType THREAD_POOL_REJECTED
    • SEMAPHORE_REJECTED

      public static final FcEventType SEMAPHORE_REJECTED
    • FALLBACK_SUCCESS

      public static final FcEventType FALLBACK_SUCCESS
    • FALLBACK_FAILURE

      public static final FcEventType FALLBACK_FAILURE
    • FALLBACK_REJECTION

      public static final FcEventType FALLBACK_REJECTION
      Never emitted. The fallback semaphore is parsed and reported but deliberately not enforced - every call that reaches a fallback already holds an Input-Request permit, so this state is unreachable. Kept so rollingCountFallbackRejection has a counter to read 0 from. See proposal section 6.3.
    • EXCEPTION_THROWN

      public static final FcEventType EXCEPTION_THROWN
      The command threw out of execute() instead of returning a fallback.
    • RESPONSE_FROM_CACHE

      public static final FcEventType RESPONSE_FROM_CACHE
      Never emitted - Frontcache does not use Hystrix request caching.
    • COLLAPSED

      public static final FcEventType COLLAPSED
      Never emitted - Frontcache registers no collapsers.
    • BUDGET_OVERRUN_OBSERVED

      public static final FcEventType BUDGET_OVERRUN_OBSERVED
      NOT a Hystrix event, and deliberately so. A semaphore-isolated command that ran past its configured timeout budget. It is observed and reported by the watchdog (FcCommandMetrics.sweepOverruns()) and nothing else: it does not abort the call, is not mapped by FallbackLogger.failureType(List), and must never be counted as a circuit-breaker failure or folded into rollingCountTimeout - Hystrix treats a timeout as a failure, so doing that would move errorPercentage and could open a circuit on a request that succeeded. It surfaces as an additional JSON field, which is safe because the dashboard asserts key presence and ignores extras. See proposal section 6.2.
  • Method Details

    • values

      public static FcEventType[] 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

      public static FcEventType valueOf(String name)
      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
    • isFailureOutcome

      public boolean isFailureOutcome()
      True for the outcomes that mean "the origin/cache call itself did not complete normally".