gpt4 book ai didi

org.jclouds.concurrent.config.WithSubmissionTrace.wrap()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 12:53:05 28 4
gpt4 key购买 nike

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

WithSubmissionTrace.wrap介绍

暂无

代码示例

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

public ExecutorServiceModule(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
   @Named(PROPERTY_IO_WORKER_THREADS) ListeningExecutorService ioExecutor) {
 this.userExecutorFromConstructor = WithSubmissionTrace.wrap(userExecutor);
 this.ioExecutorFromConstructor = WithSubmissionTrace.wrap(ioExecutor);
}

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

public ExecutorServiceModule(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
   @Named(PROPERTY_IO_WORKER_THREADS) ListeningExecutorService ioExecutor) {
 this.userExecutorFromConstructor = WithSubmissionTrace.wrap(userExecutor);
 this.ioExecutorFromConstructor = WithSubmissionTrace.wrap(ioExecutor);
}

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

public ExecutorServiceModule(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
   @Named(PROPERTY_IO_WORKER_THREADS) ListeningExecutorService ioExecutor) {
 this.userExecutorFromConstructor = WithSubmissionTrace.wrap(userExecutor);
 this.ioExecutorFromConstructor = WithSubmissionTrace.wrap(ioExecutor);
}

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

@Provides
@Singleton
@Named(PROPERTY_USER_THREADS)
ListeningExecutorService provideListeningUserExecutorService(@Named(PROPERTY_USER_THREADS) int count, Closer closer) { // NO_UCD
 if (userExecutorFromConstructor != null)
   return userExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("user thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_SCHEDULER_THREADS)
ListeningScheduledExecutorService provideListeningScheduledExecutorService(
   @Named(PROPERTY_SCHEDULER_THREADS) int count, Closer closer) {
 return shutdownOnClose(WithSubmissionTrace.wrap(newScheduledThreadPoolNamed("scheduler thread %d", count)),
    closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_USER_THREADS)
ListeningExecutorService provideListeningUserExecutorService(@Named(PROPERTY_USER_THREADS) int count, Closer closer) { // NO_UCD
 if (userExecutorFromConstructor != null)
   return userExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("user thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_IO_WORKER_THREADS)
ListeningExecutorService provideListeningIOExecutorService(@Named(PROPERTY_IO_WORKER_THREADS) int count,
   Closer closer) { // NO_UCD
 if (ioExecutorFromConstructor != null)
   return ioExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("i/o thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_IO_WORKER_THREADS)
ListeningExecutorService provideListeningIOExecutorService(@Named(PROPERTY_IO_WORKER_THREADS) int count,
   Closer closer) { // NO_UCD
 if (ioExecutorFromConstructor != null)
   return ioExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("i/o thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_IO_WORKER_THREADS)
ListeningExecutorService provideListeningIOExecutorService(@Named(PROPERTY_IO_WORKER_THREADS) int count,
   Closer closer) { // NO_UCD
 if (ioExecutorFromConstructor != null)
   return ioExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("i/o thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_USER_THREADS)
ListeningExecutorService provideListeningUserExecutorService(@Named(PROPERTY_USER_THREADS) int count, Closer closer) { // NO_UCD
 if (userExecutorFromConstructor != null)
   return userExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("user thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_SCHEDULER_THREADS)
final ListeningScheduledExecutorService provideListeningScheduledExecutorService(
   @Named(PROPERTY_SCHEDULER_THREADS) int count, Closer closer) {
 return shutdownOnClose(WithSubmissionTrace.wrap(newScheduledThreadPoolNamed("scheduler thread %d", count)),
    closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_SCHEDULER_THREADS)
ListeningScheduledExecutorService provideListeningScheduledExecutorService(
   @Named(PROPERTY_SCHEDULER_THREADS) int count, Closer closer) {
 return shutdownOnClose(WithSubmissionTrace.wrap(newScheduledThreadPoolNamed("scheduler thread %d", count)),
    closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_SCHEDULER_THREADS)
final ListeningScheduledExecutorService provideListeningScheduledExecutorService(
   @Named(PROPERTY_SCHEDULER_THREADS) int count, Closer closer) {
 return shutdownOnClose(WithSubmissionTrace.wrap(newScheduledThreadPoolNamed("scheduler thread %d", count)),
    closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_SCHEDULER_THREADS)
ListeningScheduledExecutorService provideListeningScheduledExecutorService(
   @Named(PROPERTY_SCHEDULER_THREADS) int count, Closer closer) {
 return shutdownOnClose(WithSubmissionTrace.wrap(newScheduledThreadPoolNamed("scheduler thread %d", count)),
    closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_USER_THREADS)
final ListeningExecutorService provideListeningUserExecutorService(@Named(PROPERTY_USER_THREADS) int count, Closer closer) { // NO_UCD
 if (userExecutorFromConstructor != null)
   return userExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("user thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_USER_THREADS)
final ListeningExecutorService provideListeningUserExecutorService(@Named(PROPERTY_USER_THREADS) int count, Closer closer) { // NO_UCD
 if (userExecutorFromConstructor != null)
   return userExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("user thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_USER_THREADS)
final ListeningExecutorService provideListeningUserExecutorService(@Named(PROPERTY_USER_THREADS) int count, Closer closer) { // NO_UCD
 if (userExecutorFromConstructor != null)
   return userExecutorFromConstructor;
 return shutdownOnClose(WithSubmissionTrace.wrap(newThreadPoolNamed("user thread %d", count)), closer);
}

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

@Provides
@Singleton
@Named(PROPERTY_SCHEDULER_THREADS)
final ListeningScheduledExecutorService provideListeningScheduledExecutorService(
   @Named(PROPERTY_SCHEDULER_THREADS) int count, Closer closer) {
 return shutdownOnClose(WithSubmissionTrace.wrap(newScheduledThreadPoolNamed("scheduler thread %d", count)),
    closer);
}

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

public static ListeningExecutorService currentRequestExecutorService() {
 ThreadFactory factory = checkNotNull(ThreadManager.currentRequestThreadFactory(),
    "ThreadManager.currentRequestThreadFactory()");
 // GAE requests cannot exceed 10 threads per request
 int maxThreads = 10;
 long keepAlive = ApiProxy.getCurrentEnvironment().getRemainingMillis();
 ExecutorService pool = newScalingThreadPool(0, maxThreads, keepAlive, factory);
 return WithSubmissionTrace.wrap(MoreExecutors.listeningDecorator(pool));
}

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

public static ListeningExecutorService currentRequestExecutorService() {
 ThreadFactory factory = checkNotNull(ThreadManager.currentRequestThreadFactory(),
    "ThreadManager.currentRequestThreadFactory()");
 // GAE requests cannot exceed 10 threads per request
 int maxThreads = 10;
 long keepAlive = ApiProxy.getCurrentEnvironment().getRemainingMillis();
 ExecutorService pool = newScalingThreadPool(0, maxThreads, keepAlive, factory);
 return WithSubmissionTrace.wrap(MoreExecutors.listeningDecorator(pool));
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com