Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 59 of 59 for Callbacks (0.17 sec)

  1. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

                // we called sizeIfKnown and when we started reading the file (or I guess if
                // maxCharsPerByte is wrong)
                // Fallback to an incremental approach
                StringBuilder builder = new StringBuilder(bufIndex + 32);
                builder.append(buffer, 0, bufIndex);
                buffer = null; // release for gc
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

                // we called sizeIfKnown and when we started reading the file (or I guess if
                // maxCharsPerByte is wrong)
                // Fallback to an incremental approach
                StringBuilder builder = new StringBuilder(bufIndex + 32);
                builder.append(buffer, 0, bufIndex);
                buffer = null; // release for gc
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

          queue.dispatch();
        } finally {
          logger.removeHandler(logHandler);
        }
    
        assertEquals(1, logHandler.getStoredLogRecords().size());
        assertEquals(
            "Exception while executing callback: MyListener custom-label",
            logHandler.getStoredLogRecords().get(0).getMessage());
      }
    
      public void testEnqueueAndDispatch_multithreaded() throws InterruptedException {
        Object listener = new Object();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Striped64.java

      /** Table of cells. When non-null, size is a power of 2. */
      @CheckForNull transient volatile Cell[] cells;
    
      /**
       * Base value, used mainly when there is no contention, but also as a fallback during table
       * initialization races. Updated via CAS.
       */
      transient volatile long base;
    
      /** Spinlock (locked via CAS) used when resizing and/or creating Cells. */
      transient volatile int busy;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/MoreObjects.java

       *
       * <p><b>Note:</b> if {@code first} is represented as an {@link Optional}, this can be
       * accomplished with {@link Optional#or(Object) first.or(second)}. That approach also allows for
       * lazy evaluation of the fallback instance, using {@link Optional#or(Supplier)
       * first.or(supplier)}.
       *
       * <p><b>Java 9 users:</b> use {@code java.util.Objects.requireNonNullElse(first, second)}
       * instead.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 15.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

      }
    
      // Regression test for a case where we would fail to execute listeners immediately on done futures
      // this would be observable from an afterDone callback
      public void testListenersExecuteImmediately_fromAfterDone() {
        AbstractFuture<String> f =
            new AbstractFuture<String>() {
              @Override
              protected void afterDone() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/cache/LocalCache.java

                }
                result.put(key, value);
              }
            } catch (UnsupportedLoadingOperationException e) {
              // loadAll not implemented, fallback to load
              for (K key : keysToLoad) {
                misses--; // get will count this miss
                result.put(key, get(key, defaultLoader));
              }
            }
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AbstractCatchingFuture.java

      @CheckForNull @LazyInit Class<X> exceptionType;
      @CheckForNull @LazyInit F fallback;
    
      AbstractCatchingFuture(
          ListenableFuture<? extends V> inputFuture, Class<X> exceptionType, F fallback) {
        this.inputFuture = checkNotNull(inputFuture);
        this.exceptionType = checkNotNull(exceptionType);
        this.fallback = checkNotNull(fallback);
      }
    
      @Override
      public final void run() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        Futures.addCallback(f, callback, ex);
        f.set("foo");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Nov 15 16:33:21 GMT 2022
    - 6.3K bytes
    - Viewed (0)
Back to top