Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 39 for Command (0.2 sec)

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

      private Throwable thrownByExecutionThread;
      private final Executor exceptionCatchingExecutor =
          new Executor() {
            @Override
            public void execute(Runnable command) {
              executionThread = new Thread(command);
              executionThread.setUncaughtExceptionHandler(
                  new UncaughtExceptionHandler() {
                    @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

      private static class FakeExecutor implements Executor {
        Queue<Runnable> tasks = Queues.newArrayDeque();
    
        @Override
        public void execute(Runnable command) {
          tasks.add(command);
        }
    
        boolean hasNext() {
          return !tasks.isEmpty();
        }
    
        void runNext() {
          assertTrue("expected at least one task to run", hasNext());
          tasks.remove().run();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java

      public void testTimeout() throws Exception {
        // Create a service whose executor will never run its commands
        Service service =
            new TestService() {
              @Override
              protected Executor executor() {
                return new Executor() {
                  @Override
                  public void execute(Runnable command) {}
                };
              }
    
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

        for (int i = 0; i < 100; i++) {
          descending[i] = (byte) (99 - i);
        }
        assertCrc(0xd022db97, descending);
      }
    
      public void testScsiReadCommand() {
        // Test SCSI read command.
        byte[] scsiReadCommand =
            new byte[] {
              0x01, (byte) 0xc0, 0x00, 0x00,
              0x00, 0x00, 0x00, 0x00,
              0x00, 0x00, 0x00, 0x00,
              0x00, 0x00, 0x00, 0x00,
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/ListeningScheduledExecutorServiceTest.java

      public void testScheduleRunnable() throws Exception {
        Runnable command = () -> {};
    
        ListenableScheduledFuture<?> future = executorService.schedule(command, Duration.ofSeconds(12));
    
        assertThat(future.get()).isEqualTo("schedule");
        assertThat(recordedCommand).isSameInstanceAs(command);
        assertThat(recordedTimeUnit).isEqualTo(TimeUnit.NANOSECONDS);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Mar 17 20:45:59 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/Files.java

      @J2ObjCIncompatible
      public static File createTempDir() {
        return TempFileCreator.INSTANCE.createTempDir();
      }
    
      /**
       * Creates an empty file or updates the last updated timestamp on the same as the unix command of
       * the same name.
       *
       * @param file the file to create or update
       * @throws IOException if an I/O error occurs
       */
      @SuppressWarnings("GoodTime") // reading system time without TimeSource
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java

        @Override
        protected <T> Callable<T> wrapTask(Callable<T> callable) {
          return new WrappedCallable<T>(callable);
        }
    
        @Override
        protected Runnable wrapTask(Runnable command) {
          return new WrappedRunnable(command);
        }
      }
    
      private static final class MockExecutor implements ScheduledExecutorService {
        String lastMethodCalled = "";
        long lastInitialDelay;
        long lastDelay;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Dec 16 19:54:45 GMT 2020
    - 7.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

          return inline.submit(task, result);
        }
    
        @Override
        public void execute(Runnable command) {
          lastMethodCalled = "execute";
          assertThat(command).isInstanceOf(WrappedRunnable.class);
          inline.execute(command);
        }
    
        private static <T> void assertTaskWrapped(Collection<? extends Callable<T>> tasks) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/CacheBuilder.java

     *             return createExpensiveGraph(key);
     *           }
     *         });
     * }</pre>
     *
     * <p>Or equivalently,
     *
     * <pre>{@code
     * // In real life this would come from a command-line flag or config file
     * String spec = "maximumSize=10000,expireAfterWrite=10m";
     *
     * LoadingCache<Key, Graph> graphs = CacheBuilder.from(spec)
     *     .removalListener(MY_LISTENER)
     *     .build(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        Executor delegate;
        boolean wasExecuted;
    
        public ExecutorSpy(Executor delegate) {
          this.delegate = delegate;
        }
    
        @Override
        public void execute(Runnable command) {
          delegate.execute(command);
          wasExecuted = true;
        }
      }
    
      public void testTransform_Executor() throws Exception {
        Object value = new Object();
        ExecutorSpy spy = new ExecutorSpy(directExecutor());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
Back to top