Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for Services (0.17 sec)

  1. android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java

      /** Constructor for use by subclasses. */
      protected AbstractIdleService() {}
    
      /** Start the service. */
      protected abstract void startUp() throws Exception;
    
      /** Stop the service. */
      protected abstract void shutDown() throws Exception;
    
      /**
       * Returns the {@link Executor} that will be used to run this service. Subclasses may override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 17 13:59:28 GMT 2023
    - 5.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/AbstractExecutionThreadService.java

    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import java.util.logging.Level;
    
    /**
     * Base class for services that can implement {@link #startUp}, {@link #run} and {@link #shutDown}
     * methods. This class uses a single thread to execute the service; consider {@link AbstractService}
     * if you would like to manage any threading manually.
     *
     * @author Jesse Wilson
     * @since 1.0
     */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

      }
    
      private static void assertState(
          ServiceManager manager, Service.State state, Service... services) {
        Collection<Service> managerServices = manager.servicesByState().get(state);
        for (Service service : services) {
          assertEquals(service.toString(), state, service.state());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

      public ServiceManager startAsync() {
        for (Service service : services) {
          checkState(service.state() == NEW, "Not all services are NEW, cannot start %s", this);
        }
        for (Service service : services) {
          try {
            state.tryStartTiming(service);
            service.startAsync();
          } catch (IllegalStateException e) {
            // This can happen if the service has already been started or stopped (e.g. by another
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 30.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

      }
    
      private static void assertState(
          ServiceManager manager, Service.State state, Service... services) {
        Collection<Service> managerServices = manager.servicesByState().get(state);
        for (Service service : services) {
          assertEquals(service.toString(), state, service.state());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/Service.java

     */
    @DoNotMock("Create an AbstractIdleService")
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public interface Service {
      /**
       * If the service state is {@link State#NEW}, this initiates service startup and returns
       * immediately. A stopped service may not be restarted.
       *
       * @return this
       * @throws IllegalStateException if the service is not {@link State#NEW}
       * @since 15.0
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 10.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        ExecutorService service = mock(ExecutorService.class);
        application.addDelayedShutdownHook(service, 2, TimeUnit.SECONDS);
        verify(service, Mockito.never()).shutdown();
        application.shutdown();
        InOrder shutdownFirst = Mockito.inOrder(service);
        shutdownFirst.verify(service).shutdown();
        shutdownFirst.verify(service).awaitTermination(2, TimeUnit.SECONDS);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ForwardingListeningExecutorService.java

    import java.util.concurrent.Callable;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A listening executor service which forwards all its method calls to another listening executor
     * service. Subclasses should override one or more methods to modify the behavior of the backing
     * executor service as desired per the <a
     * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        final LongHolder holder = new LongHolder();
        final ArrayList<ListenableFuture<Integer>> lengthChecks = new ArrayList<>();
        final List<Integer> completeLengthChecks;
        final int baseStackDepth;
        ExecutorService service = Executors.newFixedThreadPool(5);
        try {
          // Avoid counting frames from the executor itself, or the ExecutionSequencer
          baseStackDepth =
              serializer
                  .submit(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        final LongHolder holder = new LongHolder();
        final ArrayList<ListenableFuture<Integer>> lengthChecks = new ArrayList<>();
        final List<Integer> completeLengthChecks;
        final int baseStackDepth;
        ExecutorService service = Executors.newFixedThreadPool(5);
        try {
          // Avoid counting frames from the executor itself, or the ExecutionSequencer
          baseStackDepth =
              serializer
                  .submit(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
Back to top