Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for service (8.93 sec)

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

      public void testEnqueueAndDispatch_multithreaded() throws InterruptedException {
        Object listener = new Object();
        ExecutorService service = Executors.newFixedThreadPool(4);
        ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
        try {
          queue.addListener(listener, service);
    
          final CountDownLatch latch = new CountDownLatch(1);
          Multiset<Object> counters = ConcurrentHashMultiset.create();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ServiceTest.java

    import static com.google.common.util.concurrent.Service.State.FAILED;
    import static com.google.common.util.concurrent.Service.State.NEW;
    import static com.google.common.util.concurrent.Service.State.RUNNING;
    import static com.google.common.util.concurrent.Service.State.STARTING;
    import static com.google.common.util.concurrent.Service.State.STOPPING;
    import static com.google.common.util.concurrent.Service.State.TERMINATED;
    
    import java.util.Locale;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

        assertEquals(1, service.startUpCalled);
        assertEquals(Service.State.FAILED, service.state());
        assertThat(service.transitionStates).containsExactly(Service.State.STARTING);
      }
    
      public void testStop_withoutStart() {
        TestService service = new TestService();
        service.stopAsync().awaitTerminated();
        assertEquals(0, service.startUpCalled);
        assertEquals(0, service.shutDownCalled);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

              }
              throw new SampleRuntimeException();
            }
          };
    
      private TimeLimiter service;
    
      private static final ExecutorService executor = Executors.newFixedThreadPool(1);
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        service = SimpleTimeLimiter.create(executor);
      }
    
      public void testNewProxy_goodMethodWithEnoughTime() throws Exception {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

       */
      public static ListeningScheduledExecutorService noOpScheduledExecutor() {
        return new NoOpScheduledExecutorService();
      }
    
      /**
       * Creates a scheduled executor service that runs each task in the thread that invokes {@code
       * execute/submit/schedule}, as in {@link CallerRunsPolicy}. This applies both to individually
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 22:04:00 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

      private final ExecutorService executor;
    
      private SimpleTimeLimiter(ExecutorService executor) {
        this.executor = checkNotNull(executor);
      }
    
      /**
       * Creates a TimeLimiter instance using the given executor service to execute method calls.
       *
       * <p><b>Warning:</b> using a bounded executor may be counterproductive! If the thread pool fills
       * up, any time callers spend waiting for a thread may count toward their time limit, and in this
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java

        }
      }
    
      private static class TestCallable implements Callable<String> {
        @Override
        public String call() {
          return "foo";
        }
      }
    
      /** Simple same thread listening executor service that doesn't handle shutdown. */
      private static class TestListeningExecutorService extends AbstractListeningExecutorService {
    
        @Override
        public void execute(Runnable runnable) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java

        }
      }
    
      private static class TestCallable implements Callable<String> {
        @Override
        public String call() {
          return "foo";
        }
      }
    
      /** Simple same thread listening executor service that doesn't handle shutdown. */
      private static class TestListeningExecutorService extends AbstractListeningExecutorService {
    
        @Override
        public void execute(Runnable runnable) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

     * MoreExecutors#directExecutor}.
     */
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    public class MoreExecutorsDirectExecutorBenchmark {
      enum Impl {
        EXECUTOR_SERVICE {
          @Override
          Executor executor() {
            return newDirectExecutorService();
          }
        },
        EXECUTOR {
          @Override
          Executor executor() {
            return directExecutor();
          }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

     * MoreExecutors#directExecutor}.
     */
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    public class MoreExecutorsDirectExecutorBenchmark {
      enum Impl {
        EXECUTOR_SERVICE {
          @Override
          Executor executor() {
            return newDirectExecutorService();
          }
        },
        EXECUTOR {
          @Override
          Executor executor() {
            return directExecutor();
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
Back to top