Tabnine Logo
Executors.unconfigurableExecutorService
Code IndexAdd Tabnine to your IDE (free)

How to use
unconfigurableExecutorService
method
in
java.util.concurrent.Executors

Best Java code snippets using java.util.concurrent.Executors.unconfigurableExecutorService (Showing top 20 results out of 477)

origin: google/guava

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(executor, terminationTimeout, timeUnit);
 return service;
}
origin: prestodb/presto

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(executor, terminationTimeout, timeUnit);
 return service;
}
origin: google/j2objc

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(executor, terminationTimeout, timeUnit);
 return service;
}
origin: spring-projects/spring-framework

@Override
protected ExecutorService initializeExecutor(
    ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) {
  BlockingQueue<Runnable> queue = createQueue(this.queueCapacity);
  ThreadPoolExecutor executor  = createExecutor(this.corePoolSize, this.maxPoolSize,
      this.keepAliveSeconds, queue, threadFactory, rejectedExecutionHandler);
  if (this.allowCoreThreadTimeOut) {
    executor.allowCoreThreadTimeOut(true);
  }
  // Wrap executor with an unconfigurable decorator.
  this.exposedExecutor = (this.exposeUnconfigurableExecutor ?
      Executors.unconfigurableExecutorService(executor) : executor);
  return executor;
}
origin: wildfly/wildfly

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(executor, terminationTimeout, timeUnit);
 return service;
}
origin: ehcache/ehcache3

@Override
public ExecutorService getOrderedExecutor(String poolAlias, BlockingQueue<Runnable> queue) {
 ThreadPoolExecutor executor = new ThreadPoolExecutor(1, 1, 30, TimeUnit.SECONDS, queue, ThreadFactoryUtil.threadFactory(poolAlias),  OnDemandExecutionService::rejectedExecutionHandler);
 executor.allowCoreThreadTimeOut(true);
 return unconfigurableExecutorService(executor);
}
origin: ehcache/ehcache3

@Override
public ExecutorService getUnorderedExecutor(String poolAlias, BlockingQueue<Runnable> queue) {
 ThreadPoolExecutor executor = new ThreadPoolExecutor(1, Runtime.getRuntime().availableProcessors(), 30, TimeUnit.SECONDS, queue, ThreadFactoryUtil.threadFactory(poolAlias), OnDemandExecutionService::rejectedExecutionHandler);
 executor.allowCoreThreadTimeOut(true);
 return unconfigurableExecutorService(executor);
}
origin: org.springframework/spring-context

@Override
protected ExecutorService initializeExecutor(
    ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) {
  BlockingQueue<Runnable> queue = createQueue(this.queueCapacity);
  ThreadPoolExecutor executor  = createExecutor(this.corePoolSize, this.maxPoolSize,
      this.keepAliveSeconds, queue, threadFactory, rejectedExecutionHandler);
  if (this.allowCoreThreadTimeOut) {
    executor.allowCoreThreadTimeOut(true);
  }
  // Wrap executor with an unconfigurable decorator.
  this.exposedExecutor = (this.exposeUnconfigurableExecutor ?
      Executors.unconfigurableExecutorService(executor) : executor);
  return executor;
}
origin: reactor/reactor-core

ExecutorService executorService6 = Executors.newWorkStealingPool(4);
ExecutorService executorService7 =
    Executors.unconfigurableExecutorService(executorService4);
ExecutorService executorService8 =
    Executors.unconfigurableScheduledExecutorService(executorService5);
origin: palantir/atlasdb

/**
 * Creates an Executor that uses a single worker thread operating off an unbounded queue. (Note
 * however that if this single thread terminates due to a failure during execution prior to
 * shutdown, a new one will take its place if needed to execute subsequent tasks.)  Tasks are
 * guaranteed to execute sequentially, and no more than one task will be active at any given
 * time. Unlike the otherwise equivalent <tt>newFixedThreadPool(1)</tt> the returned executor is
 * guaranteed not to be reconfigurable to use additional threads.
 *
 * @return the newly created single-threaded Executor
 */
public static ExecutorService newSingleThreadExecutor() {
  return Executors.unconfigurableExecutorService(newFixedThreadPool(1));
}
origin: palantir/atlasdb

/**
 * Creates an Executor that uses a single worker thread operating off an unbounded queue, and
 * uses the provided ThreadFactory to create a new thread when needed. Unlike the otherwise
 * equivalent <tt>newFixedThreadPool(1, threadFactory)</tt> the returned executor is guaranteed
 * not to be reconfigurable to use additional threads.
 *
 * @param threadFactory the factory to use when creating new threads
 * @return the newly created single-threaded Executor
 * @throws NullPointerException if threadFactory is null
 */
public static ExecutorService newSingleThreadExecutor(ThreadFactory threadFactory) {
  return Executors.unconfigurableExecutorService(newFixedThreadPool(1, threadFactory));
}
origin: palantir/atlasdb

/**
 * Creates an Executor that uses a single worker thread operating off an unbounded queue. (Note
 * however that if this single thread terminates due to a failure during execution prior to
 * shutdown, a new one will take its place if needed to execute subsequent tasks.)  Tasks are
 * guaranteed to execute sequentially, and no more than one task will be active at any given
 * time. Unlike the otherwise equivalent <tt>newFixedThreadPool(1)</tt> the returned executor is
 * guaranteed not to be reconfigurable to use additional threads.
 *
 * @param isDaemon denotes if the thread should be run as a daemon or not
 * @return the newly created single-threaded Executor
 */
public static ExecutorService newSingleThreadExecutor(boolean isDaemon) {
  return Executors.unconfigurableExecutorService(newFixedThreadPool(1, newNamedThreadFactory(isDaemon)));
}
origin: com.facebook.presto.cassandra/cassandra-server

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: hstaudacher/osgi-jax-rs-connector

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: ottogroup/flink-spector

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: KostyaSha/yet-another-docker-plugin

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: org.apache.hbase.thirdparty/hbase-shaded-miscellaneous

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: org.hudsonci.lib.guava/guava

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: com.alibaba.edas.acm/acm-sdk

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
origin: com.atlassian.guava/guava

final ExecutorService getExitingExecutorService(
  ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) {
 useDaemonThreadFactory(executor);
 ExecutorService service = Executors.unconfigurableExecutorService(executor);
 addDelayedShutdownHook(service, terminationTimeout, timeUnit);
 return service;
}
java.util.concurrentExecutorsunconfigurableExecutorService

Javadoc

Returns an object that delegates all defined ExecutorService methods to the given executor, but not any other methods that might otherwise be accessible using casts. This provides a way to safely "freeze" configuration and disallow tuning of a given concrete implementation.

Popular methods of Executors

  • newFixedThreadPool
    Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue,
  • newSingleThreadExecutor
    Creates an Executor that uses a single worker thread operating off an unbounded queue, and uses the
  • newCachedThreadPool
    Creates a thread pool that creates new threads as needed, but will reuse previously constructed thre
  • newSingleThreadScheduledExecutor
    Creates a single-threaded executor that can schedule commands to run after a given delay, or to exec
  • newScheduledThreadPool
    Creates a thread pool that can schedule commands to run after a given delay, or to execute periodica
  • defaultThreadFactory
    Returns a default thread factory used to create new threads. This factory creates all new threads us
  • callable
    Returns a Callable object that, when called, runs the given privileged exception action and returns
  • unconfigurableScheduledExecutorService
    Returns an object that delegates all defined ScheduledExecutorService methods to the given executor,
  • newWorkStealingPool
    Creates a thread pool that maintains enough threads to support the given parallelism level, and may
  • privilegedThreadFactory
    Legacy security code; do not use.
  • privilegedCallable
    Legacy security code; do not use.
  • privilegedCallableUsingCurrentClassLoader
    Legacy security code; do not use.
  • privilegedCallable,
  • privilegedCallableUsingCurrentClassLoader

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JFrame (javax.swing)
  • JPanel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now