Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for onSuccess (0.04 sec)

  1. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

            new FutureCallback<String>() {
              private final Object monitor = new Object();
              private boolean called = false;
    
              @Override
              public void onSuccess(String result) {
                fail("Was not expecting onSuccess() to be called.");
              }
    
              @Override
              public void onFailure(Throwable t) {
                synchronized (monitor) {
                  assertFalse(called);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/SmbCircuitBreaker.java

                    throw (CIFSException) e;
                }
                throw new CIFSException("Circuit breaker operation failed", e);
            }
        }
    
        private void onSuccess() {
            onSuccess(0);
        }
    
        private void onSuccess(long responseTimeMs) {
            State currentState = state.get();
            totalSuccesses.incrementAndGet();
            consecutiveSuccesses.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)
  3. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

            new FutureCallback<String>() {
              private final Object monitor = new Object();
              private boolean called = false;
    
              @Override
              public void onSuccess(String result) {
                fail("Was not expecting onSuccess() to be called.");
              }
    
              @Override
              public void onFailure(Throwable t) {
                synchronized (monitor) {
                  assertFalse(called);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        FluentFuture<String> f = FluentFuture.from(immediateFuture("a"));
        boolean[] called = new boolean[1];
        f.addCallback(
            new FutureCallback<String>() {
              @Override
              public void onSuccess(String result) {
                called[0] = true;
              }
    
              @Override
              public void onFailure(Throwable t) {}
            },
            directExecutor());
        assertThat(called[0]).isTrue();
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/util/SimpleCircuitBreaker.java

                }
                throw new CircuitBreakerOpenException("Circuit breaker " + name + " is open");
            }
    
            try {
                T result = callable.call();
                onSuccess();
                return result;
            } catch (Exception e) {
                onFailure();
                throw e;
            }
        }
    
        /**
         * Execute a runnable through the circuit breaker
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/Futures.java

       * <p>Example:
       *
       * {@snippet :
       * ListenableFuture<QueryResult> future = ...;
       * Executor e = ...
       * addCallback(future,
       *     new FutureCallback<QueryResult>() {
       *       public void onSuccess(QueryResult result) {
       *         storeInCache(result);
       *       }
       *       public void onFailure(Throwable t) {
       *         reportError(t);
       *       }
       *     }, e);
       * }
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * computation is complete.
       *
       * <p>Example:
       *
       * {@snippet :
       * future.addCallback(
       *     new FutureCallback<QueryResult>() {
       *       public void onSuccess(QueryResult result) {
       *         storeInCache(result);
       *       }
       *       public void onFailure(Throwable t) {
       *         reportError(t);
       *       }
       *     }, executor);
       * }
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

        Futures.addCallback(
            future,
            new FutureCallback<@Nullable AutoCloseable>() {
              @Override
              public void onSuccess(@Nullable AutoCloseable result) {
                closingFuture.closeables.closer.eventuallyClose(result, closingExecutor);
              }
    
              @Override
              public void onFailure(Throwable t) {}
            },
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 97.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/ClosingFuture.java

        Futures.addCallback(
            future,
            new FutureCallback<@Nullable AutoCloseable>() {
              @Override
              public void onSuccess(@Nullable AutoCloseable result) {
                closingFuture.closeables.closer.eventuallyClose(result, closingExecutor);
              }
    
              @Override
              public void onFailure(Throwable t) {}
            },
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 98.1K bytes
    - Viewed (0)
Back to top