Class CircuitBreakerRegistry

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class CircuitBreakerRegistry
    extends Object
    implements Closeable
    Keeps track of all registered circuit breaker instances for various request types. Responsible for a holistic view of whether a circuit breaker has tripped or not.
    Since:
    9.4
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • CircuitBreakerRegistry

        public CircuitBreakerRegistry()
    • Method Detail

      • checkTripped

        public List<CircuitBreaker> checkTripped​(org.apache.solr.client.solrj.SolrRequest.SolrRequestType requestType)
        Check and return circuit breakers that have triggered
        Parameters:
        requestType - SolrRequest.SolrRequestType to check for.
        Returns:
        CircuitBreakers which have triggered, null otherwise.
      • toErrorMessage

        public static String toErrorMessage​(List<CircuitBreaker> circuitBreakerList)
        Construct the final error message to be printed when circuit breakers trip.
        Parameters:
        circuitBreakerList - Input list for circuit breakers.
        Returns:
        Constructed error message.
      • isEnabled

        public boolean isEnabled​(org.apache.solr.client.solrj.SolrRequest.SolrRequestType requestType)