Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for HALF_OPEN (0.1 sec)

  1. src/test/java/jcifs/util/SmbCircuitBreakerTest.java

            Thread.sleep(1100);
    
            // First success should transition to HALF_OPEN
            String result = circuitBreaker.executeWithCircuitBreaker(() -> "success 0");
            assertEquals("success 0", result, "Should execute in HALF_OPEN");
            assertEquals(State.HALF_OPEN, circuitBreaker.getState(), "Should be in HALF_OPEN after first success");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/SimpleCircuitBreaker.java

                    if (state.compareAndSet(State.OPEN, State.HALF_OPEN)) {
                        stateChangeTime.set(System.currentTimeMillis());
                        halfOpenSuccesses.set(0);
                        log.info("Circuit breaker {} transitioning from OPEN to HALF_OPEN", name);
                        return State.HALF_OPEN;
                    }
                    // Another thread changed the state, re-evaluate
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/util/SimpleCircuitBreakerTest.java

        @Test
        @DisplayName("Test transition to HALF_OPEN after timeout")
        void testTransitionToHalfOpen() throws Exception {
            // Open the circuit
            circuitBreaker.tripBreaker();
            assertEquals(SimpleCircuitBreaker.State.OPEN, circuitBreaker.getState());
    
            // Wait for timeout
            Thread.sleep(150);
    
            // Next call should transition to HALF_OPEN
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  4. src/main/java/jcifs/util/SmbCircuitBreaker.java

                if (currentState == State.OPEN && shouldAttemptReset()) {
                    log.debug("[{}] Attempting to reset circuit breaker from OPEN to HALF_OPEN", name);
                    transitionTo(State.HALF_OPEN);
                    currentState = State.HALF_OPEN;
                }
    
                // Block if circuit is open
                if (currentState == State.OPEN) {
                    totalRequests.incrementAndGet();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 33.4K bytes
    - Viewed (0)
Back to top