Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for cluster (0.34 sec)

  1. guava-tests/test/com/google/common/primitives/ImmutableLongArrayTest.java

          void doIt(ImmutableLongArray.Builder builder, AtomicLong counter) {
            builder.add(counter.getAndIncrement());
          }
        },
        ADD_ARRAY {
          @Override
          void doIt(ImmutableLongArray.Builder builder, AtomicLong counter) {
            long[] array = new long[RANDOM.nextInt(10)];
            for (int i = 0; i < array.length; i++) {
              array[i] = counter.getAndIncrement();
            }
            builder.addAll(array);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Jun 01 09:32:35 GMT 2023
    - 20.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

          void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) {
            builder.add(counter.getAndIncrement());
          }
        },
        ADD_ARRAY {
          @Override
          void doIt(ImmutableDoubleArray.Builder builder, AtomicInteger counter) {
            double[] array = new double[RANDOM.nextInt(10)];
            for (int i = 0; i < array.length; i++) {
              array[i] = counter.getAndIncrement();
            }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 06 15:23:21 GMT 2023
    - 20K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        final AtomicDoubleArray aa = new AtomicDoubleArray(SIZE);
        for (int i = 0; i < SIZE; i++) {
          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
        Thread t1 = newStartedThread(c1);
        Thread t2 = newStartedThread(c2);
        awaitTermination(t1);
        awaitTermination(t2);
        assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        final AtomicDoubleArray aa = new AtomicDoubleArray(SIZE);
        for (int i = 0; i < SIZE; i++) {
          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
        Thread t1 = newStartedThread(c1);
        Thread t2 = newStartedThread(c2);
        awaitTermination(t1);
        awaitTermination(t2);
        assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

        for (int i = 0; i < 1000; i++) {
          final AtomicInteger counter = new AtomicInteger();
          final TrustedListenableFutureTask<Integer> task =
              TrustedListenableFutureTask.create(
                  new Callable<Integer>() {
                    @Override
                    public Integer call() {
                      return counter.incrementAndGet();
                    }
                  });
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

      private WorkerRunningState workerRunningState = IDLE;
    
      /**
       * This counter prevents an ABA issue where a thread may successfully schedule the worker, the
       * worker runs and exhausts the queue, another thread enqueues a task and fails to schedule the
       * worker, and then the first thread's call to delegate.execute() returns. Without this counter,
       * it would observe the QUEUING state and set it to QUEUED, and the worker would never be
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

            }
            long size = spliterator.getExactSizeIfKnown();
            long[] counter = {0};
            spliterator.forEachRemaining(
                e -> {
                  consumer.accept(e);
                  counter[0]++;
                });
            if (size >= 0) {
              assertEquals(size, counter[0]);
            }
          }
        },
        ALTERNATE_ADVANCE_AND_SPLIT {
          @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 18:19:31 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * exception is thrown, this exception is used as the result of the output {@code Future}.
       *
       * <p>Usage example:
       *
       * <pre>{@code
       * // Falling back to a zero counter in case an exception happens when processing the RPC to fetch
       * // counters.
       * ListenableFuture<Integer> faultTolerantFuture =
       *     fetchCounters().catching(FetchException.class, x -> 0, directExecutor());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/CountingInputStreamTest.java

        assertEquals(-1, counter.read(new byte[30]));
        assertEquals(20, counter.getCount());
      }
    
      @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte
      public void testMark() throws Exception {
        assertTrue(counter.markSupported());
        assertEquals(10, counter.read(new byte[10]));
        assertEquals(10, counter.getCount());
        counter.mark(5);
        counter.read();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/AbstractCacheTest.java

      public void testSingleSimpleStats() {
        StatsCounter counter = new SimpleStatsCounter();
        for (int i = 0; i < 11; i++) {
          counter.recordHits(1);
        }
        for (int i = 0; i < 13; i++) {
          counter.recordLoadSuccess(i);
        }
        for (int i = 0; i < 17; i++) {
          counter.recordLoadException(i);
        }
        for (int i = 0; i < 23; i++) {
          counter.recordMisses(1);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
Back to top