com.google.common.util.concurrent.ExecutionList.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中com.google.common.util.concurrent.ExecutionList.<init>()方法的一些代码示例,展示了ExecutionList.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionList.<init>()方法的具体详情如下:
包路径:com.google.common.util.concurrent.ExecutionList
类名称:ExecutionList
方法名:<init>

ExecutionList.<init>介绍

[英]Creates a new, empty ExecutionList.
[中]创建一个新的空ExecutionList。

代码示例

代码示例来源:origin: apache/incubator-gobblin

protected JobLauncherExecutionDriver(JobSpec jobSpec, Logger log, DriverRunnable runnable) {
 super(runnable);
 _closer = Closer.create();
 _closer.register(runnable.getJobLauncher());
 _log = log;
 _jobSpec = jobSpec;
 _jobExec = runnable.getJobExec();
 _callbackDispatcher = _closer.register(runnable.getCallbackDispatcher());
 _jobState = runnable.getJobState();
 _executionList = new ExecutionList();
 _runnable = runnable;
}

代码示例来源:origin: google/guava

public void testNulls() {
 new NullPointerTester().testAllPublicInstanceMethods(new ExecutionList());
}

代码示例来源:origin: io.brooklyn/brooklyn-core

protected ListenableForwardingFuture(Future<T> delegate) {
  super(delegate);
  this.listeners = new ExecutionList();
}

代码示例来源:origin: org.apache.brooklyn/brooklyn-core

protected ListenableForwardingFuture(Future<T> delegate) {
  super(delegate);
  this.listeners = new ExecutionList();
}

代码示例来源:origin: com.yahoo.vespa/component

/** Clones this. The clone is <i>not</i> frozen and has no listeners. */
@Override
public ListenableFreezableClass clone() {
  ListenableFreezableClass clone=(ListenableFreezableClass)super.clone();
  clone.executionList = new ExecutionList();
  return clone;
}

代码示例来源:origin: com.linkedin.gobblin/gobblin-runtime

protected JobLauncherExecutionDriver(JobSpec jobSpec, Logger log, DriverRunnable runnable) {
 super(runnable);
 _closer = Closer.create();
 _closer.register(runnable.getJobLauncher());
 _log = log;
 _jobSpec = jobSpec;
 _jobExec = runnable.getJobExec();
 _callbackDispatcher = _closer.register(runnable.getCallbackDispatcher());
 _jobState = runnable.getJobState();
 _executionList = new ExecutionList();
 _runnable = runnable;
}

代码示例来源:origin: org.apache.gobblin/gobblin-runtime

protected JobLauncherExecutionDriver(JobSpec jobSpec, Logger log, DriverRunnable runnable) {
 super(runnable);
 _closer = Closer.create();
 _closer.register(runnable.getJobLauncher());
 _log = log;
 _jobSpec = jobSpec;
 _jobExec = runnable.getJobExec();
 _callbackDispatcher = _closer.register(runnable.getCallbackDispatcher());
 _jobState = runnable.getJobState();
 _executionList = new ExecutionList();
 _runnable = runnable;
}

代码示例来源:origin: jclouds/legacy-jclouds

protected void configure() {
 Closeable executorCloser = new Closeable() {
   @Inject
   @Named(PROPERTY_USER_THREADS)
   ListeningExecutorService userExecutor;
   @Inject
   @Named(PROPERTY_IO_WORKER_THREADS)
   ListeningExecutorService ioExecutor;
   // ScheduledExecutor is defined in an optional module
   @Inject(optional = true)
   @Named(PROPERTY_SCHEDULER_THREADS)
   ScheduledExecutorService scheduledExecutor;
   public void close() throws IOException {
    assert userExecutor != null;
    userExecutor.shutdownNow();
    assert ioExecutor != null;
    ioExecutor.shutdownNow();
    // ScheduledExecutor is defined in an optional module
    if (scheduledExecutor != null)
      scheduledExecutor.shutdownNow();
   }
 };
 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);
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

protected void configure() {
 Closeable executorCloser = new Closeable() {
   @Inject
   @Named(PROPERTY_USER_THREADS)
   ListeningExecutorService userExecutor;
   @Inject
   @Named(PROPERTY_IO_WORKER_THREADS)
   ListeningExecutorService ioExecutor;
   // ScheduledExecutor is defined in an optional module
   @Inject(optional = true)
   @Named(PROPERTY_SCHEDULER_THREADS)
   ScheduledExecutorService scheduledExecutor;
   public void close() throws IOException {
    assert userExecutor != null;
    userExecutor.shutdownNow();
    assert ioExecutor != null;
    ioExecutor.shutdownNow();
    // ScheduledExecutor is defined in an optional module
    if (scheduledExecutor != null)
      scheduledExecutor.shutdownNow();
   }
 };
 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);
}

代码示例来源:origin: org.jclouds/jclouds-core

protected void configure() {
 Closeable executorCloser = new Closeable() {
   @Inject
   @Named(PROPERTY_USER_THREADS)
   ListeningExecutorService userExecutor;
   @Inject
   @Named(PROPERTY_IO_WORKER_THREADS)
   ListeningExecutorService ioExecutor;
   // ScheduledExecutor is defined in an optional module
   @Inject(optional = true)
   @Named(PROPERTY_SCHEDULER_THREADS)
   ScheduledExecutorService scheduledExecutor;
   public void close() throws IOException {
    assert userExecutor != null;
    userExecutor.shutdownNow();
    assert ioExecutor != null;
    ioExecutor.shutdownNow();
    // ScheduledExecutor is defined in an optional module
    if (scheduledExecutor != null)
      scheduledExecutor.shutdownNow();
   }
 };
 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);
}

代码示例来源:origin: com.amysta.jclouds/jclouds-core

protected void configure() {
 Closeable executorCloser = new Closeable() {
   @Inject
   @Named(PROPERTY_USER_THREADS)
   ListeningExecutorService userExecutor;
   // ScheduledExecutor is defined in an optional module
   @Inject(optional = true)
   @Named(PROPERTY_SCHEDULER_THREADS)
   ScheduledExecutorService scheduledExecutor;
   public void close() throws IOException {
    assert userExecutor != null;
    userExecutor.shutdownNow();
    // ScheduledExecutor is defined in an optional module
    if (scheduledExecutor != null)
      scheduledExecutor.shutdownNow();
   }
 };
 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);
}

代码示例来源:origin: apache/jclouds

protected void configure() {
 Closeable executorCloser = new Closeable() {
   @Inject
   @Named(PROPERTY_USER_THREADS)
   ListeningExecutorService userExecutor;
   // ScheduledExecutor is defined in an optional module
   @Inject(optional = true)
   @Named(PROPERTY_SCHEDULER_THREADS)
   ScheduledExecutorService scheduledExecutor;
   public void close() throws IOException {
    assert userExecutor != null;
    userExecutor.shutdownNow();
    // ScheduledExecutor is defined in an optional module
    if (scheduledExecutor != null)
      scheduledExecutor.shutdownNow();
   }
 };
 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);
}

代码示例来源:origin: Nextdoor/bender

protected void configure() {
 Closeable executorCloser = new Closeable() {
   @Inject
   @Named(PROPERTY_USER_THREADS)
   ListeningExecutorService userExecutor;
   // ScheduledExecutor is defined in an optional module
   @Inject(optional = true)
   @Named(PROPERTY_SCHEDULER_THREADS)
   ScheduledExecutorService scheduledExecutor;
   public void close() throws IOException {
    assert userExecutor != null;
    userExecutor.shutdownNow();
    // ScheduledExecutor is defined in an optional module
    if (scheduledExecutor != null)
      scheduledExecutor.shutdownNow();
   }
 };
 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);
}

代码示例来源:origin: com.google.guava/guava-tests

public void testNulls() {
 new NullPointerTester().testAllPublicInstanceMethods(new ExecutionList());
}

相关文章

微信公众号

最新文章

更多