- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for executeWithCircuitBreaker (0.09 seconds)
-
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()) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 33.4K bytes - Click Count (0) -
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");
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 23.2K bytes - Click Count (0)