Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for executeWithCircuitBreaker (0.5 sec)

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

            String result = circuitBreaker.executeWithCircuitBreaker(() -> "success");
            assertEquals("success", result, "Operation should succeed");
            assertEquals(State.HALF_OPEN, circuitBreaker.getState(), "Circuit should be in HALF_OPEN");
    
            // One more success should close the circuit (threshold is 2)
            circuitBreaker.executeWithCircuitBreaker(() -> "success2");
    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/SmbCircuitBreaker.java

         * @param <T> return type
         * @param operation the operation to execute
         * @return operation result
         * @throws CIFSException if circuit is open or operation fails
         */
        public <T> T executeWithCircuitBreaker(Supplier<T> operation) throws CIFSException {
            // Backpressure control
            if (backpressureEnabled && requestSemaphore != null) {
                if (!requestSemaphore.tryAcquire()) {
    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