Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for allowsRequests (0.05 seconds)

  1. src/main/java/jcifs/util/SimpleCircuitBreaker.java

            return (double) totalSuccesses.get() / total;
        }
    
        /**
         * Check if circuit breaker allows requests
         *
         * @return true if requests are allowed
         */
        public boolean allowsRequests() {
            State current = evaluateState();
            return current != State.OPEN;
        }
    
        /**
         * Get the circuit breaker name
         *
         * @return name
         */
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 11.3K bytes
    - Click Count (0)
  2. src/test/java/jcifs/util/SimpleCircuitBreakerTest.java

        }
    
        @Test
        @DisplayName("Test initial state is CLOSED")
        void testInitialState() {
            assertEquals(SimpleCircuitBreaker.State.CLOSED, circuitBreaker.getState());
            assertTrue(circuitBreaker.allowsRequests());
        }
    
        @Test
        @DisplayName("Test successful calls in CLOSED state")
        void testSuccessfulCalls() throws Exception {
            String result = circuitBreaker.call(() -> "success");
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 10.6K bytes
    - Click Count (0)
Back to Top