Package com.google.common.util.concurrent

Examples of com.google.common.util.concurrent.ExecutionList


      binder().requestInjection(executorCloser);
      Closer closer = new Closer();
      closer.addToClose(executorCloser);
      bind(Closer.class).toInstance(closer);

      ExecutionList list = new ExecutionList();
      bindPostInjectionInvoke(closer, list);
      bind(ExecutionList.class).toInstance(list);
   }
View Full Code Here


      countDownLatch.countDown();
    }
  }

  public void testExceptionsCaught() {
    ExecutionList list = new ExecutionList();
    list.add(THROWING_RUNNABLE, sameThreadExecutor());
    list.execute();
    list.add(THROWING_RUNNABLE, sameThreadExecutor());
  }
View Full Code Here

  public void testNulls() throws Exception {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(Executor.class, sameThreadExecutor());
    tester.setDefault(Runnable.class, DO_NOTHING);
    tester.testAllPublicInstanceMethods(new ExecutionList());
  }
View Full Code Here

      binder().requestInjection(executorCloser);
      Closer closer = new Closer();
      closer.addToClose(executorCloser);
      bind(Closer.class).toInstance(closer);

      ExecutionList list = new ExecutionList();
      bindPostInjectionInvoke(closer, list);
      bind(ExecutionList.class).toInstance(list);
   }
View Full Code Here

    InputStream is = getClass().getResourceAsStream("/test-url-list.txt");
    BufferedReader br = new BufferedReader(new InputStreamReader(is));
    String line;
    int nurls = 0;
    ExecutorService executor = Executors.newFixedThreadPool(100);
    ExecutionList tasks = new ExecutionList();
    while ((line = br.readLine()) != null) {
      tasks.add(new LoadTask(t, line), executor);
      nurls++;
    }
    long t0 = System.currentTimeMillis();
    tasks.execute();
    executor.awaitTermination(30, TimeUnit.SECONDS);
    long el = System.currentTimeMillis() - t0;
    System.err.println(nurls + " urls, time=" + el + "ms (" + (nurls / (el / 1000.0)) + " URI/s");
  }
View Full Code Here

      binder().requestInjection(executorCloser);
      Closer closer = new Closer();
      closer.addToClose(executorCloser);
      bind(Closer.class).toInstance(closer);

      ExecutionList list = new ExecutionList();
      bindPostInjectionInvoke(closer, list);
      bind(ExecutionList.class).toInstance(list);
   }
View Full Code Here

      binder().requestInjection(executorCloser);
      Closer closer = new Closer();
      closer.addToClose(executorCloser);
      bind(Closer.class).toInstance(closer);

      ExecutionList list = new ExecutionList();
      bindPostInjectionInvoke(closer, list);
      bind(ExecutionList.class).toInstance(list);
   }
View Full Code Here

      binder().requestInjection(executorCloser);
      Closer closer = new Closer();
      closer.addToClose(executorCloser);
      bind(Closer.class).toInstance(closer);

      ExecutionList list = new ExecutionList();
      bindPostInjectionInvoke(closer, list);
      bind(ExecutionList.class).toInstance(list);
   }
View Full Code Here

TOP

Related Classes of com.google.common.util.concurrent.ExecutionList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.