* the name prefix for threads created by this executor.
* @return a new ExecutorService with the specified configuration.
*/
- public static ExecutorService newBoundedFastThreadPool( int maximumPoolSize,
- int maximumQueueSize, String threadPrefix ) {
- return new FastThreadPoolExecutor( maximumPoolSize, maximumQueueSize, threadPrefix );
+ public static ExecutorService newBoundedFastThreadPool(int maximumPoolSize,
+ int maximumQueueSize, String threadPrefix) {
+ return new FastThreadPoolExecutor(maximumPoolSize, maximumQueueSize, threadPrefix);
}
/**
* the name prefix for threads created by this executor.
* @return a new ExecutorService with the specified configuration.
*/
- public static ExecutorService newBlockingBoundedFastThreadPool( int maximumPoolSize,
- int maximumQueueSize, String threadPrefix ) {
+ public static ExecutorService newBlockingBoundedFastThreadPool(int maximumPoolSize,
+ int maximumQueueSize, String threadPrefix) {
FastThreadPoolExecutor executor =
- new FastThreadPoolExecutor( maximumPoolSize, maximumQueueSize, threadPrefix );
- executor.setRejectedExecutionHandler( CountingRejectedExecutionHandler.newCallerRunsPolicy() );
+ new FastThreadPoolExecutor(maximumPoolSize, maximumQueueSize, threadPrefix);
+ executor.setRejectedExecutionHandler(CountingRejectedExecutionHandler.newCallerRunsPolicy());
return executor;
}
* the name prefix for threads created by this executor.
* @return a new ExecutorService with the specified configuration.
*/
- public static ExecutorService newBoundedCachedThreadPool( int maximumPoolSize,
- int maximumQueueSize, String threadPrefix ) {
- return new CachedThreadPoolExecutor( maximumPoolSize, maximumQueueSize, threadPrefix );
+ public static ExecutorService newBoundedCachedThreadPool(int maximumPoolSize,
+ int maximumQueueSize, String threadPrefix) {
+ return new CachedThreadPoolExecutor(maximumPoolSize, maximumQueueSize, threadPrefix);
}
/**
* the name prefix for threads created by this executor.
* @return a new ExecutorService with the specified configuration.
*/
- public static ExecutorService newBlockingBoundedCachedThreadPool( int maximumPoolSize,
- int maximumQueueSize, String threadPrefix ) {
+ public static ExecutorService newBlockingBoundedCachedThreadPool(int maximumPoolSize,
+ int maximumQueueSize, String threadPrefix) {
CachedThreadPoolExecutor executor =
- new CachedThreadPoolExecutor( maximumPoolSize, maximumQueueSize, threadPrefix );
- executor.setRejectedExecutionHandler( CountingRejectedExecutionHandler.newCallerRunsPolicy() );
+ new CachedThreadPoolExecutor(maximumPoolSize, maximumQueueSize, threadPrefix);
+ executor.setRejectedExecutionHandler(CountingRejectedExecutionHandler.newCallerRunsPolicy());
return executor;
}
* the name prefix for the thread created by this executor.
* @return a new ExecutorService with the specified configuration.
*/
- public static ExecutorService newBoundedSingleThreadExecutor( int maximumQueueSize,
- String threadPrefix ) {
- return new FastThreadPoolExecutor( 1, maximumQueueSize, Long.MAX_VALUE, TimeUnit.SECONDS,
- threadPrefix );
+ public static ExecutorService newBoundedSingleThreadExecutor(int maximumQueueSize,
+ String threadPrefix) {
+ return new FastThreadPoolExecutor(1, maximumQueueSize, Long.MAX_VALUE, TimeUnit.SECONDS,
+ threadPrefix);
}
}