Class ResilienceRegistries

java.lang.Object
org.knowm.xchange.client.ResilienceRegistries

@Beta
public class ResilienceRegistries
extends Object
  • Field Details

    • DEFAULT_RETRY_CONFIG

      public static final io.github.resilience4j.retry.RetryConfig DEFAULT_RETRY_CONFIG
    • NON_IDEMPOTENT_CALLS_RETRY_CONFIG_NAME

      public static final String NON_IDEMPOTENT_CALLS_RETRY_CONFIG_NAME
      See Also:
      Constant Field Values
    • DEFAULT_NON_IDEMPOTENT_CALLS_RETRY_CONFIG

      public static final io.github.resilience4j.retry.RetryConfig DEFAULT_NON_IDEMPOTENT_CALLS_RETRY_CONFIG
      Suggested for calls that are not idempotent like placing order or withdrawing funds

      Well designed exchange APIs will have mechanisms that make even placing orders idempotent. Most however cannot handle retries on this type of calls and if you do one after a socket read timeout for eq. then this may result in placing two identical orders instead of one. For such exchanged this retry configuration is recommended.

    • DEFAULT_GLOBAL_RATE_LIMITER_CONFIG

      public static final io.github.resilience4j.ratelimiter.RateLimiterConfig DEFAULT_GLOBAL_RATE_LIMITER_CONFIG
  • Constructor Details

    • ResilienceRegistries

      public ResilienceRegistries()
    • ResilienceRegistries

      public ResilienceRegistries​(io.github.resilience4j.retry.RetryConfig globalRetryConfig, io.github.resilience4j.retry.RetryConfig nonIdempotentCallsRetryConfig)
    • ResilienceRegistries

      public ResilienceRegistries​(io.github.resilience4j.retry.RetryConfig globalRetryConfig, io.github.resilience4j.retry.RetryConfig nonIdempotentCallsRetryConfig, io.github.resilience4j.ratelimiter.RateLimiterConfig globalRateLimiterConfig)
    • ResilienceRegistries

      public ResilienceRegistries​(io.github.resilience4j.retry.RetryRegistry retryRegistry, io.github.resilience4j.ratelimiter.RateLimiterRegistry rateLimiterRegistry)
  • Method Details

    • retries

      public io.github.resilience4j.retry.RetryRegistry retries()
    • rateLimiters

      public io.github.resilience4j.ratelimiter.RateLimiterRegistry rateLimiters()