org.ehcache.config.builders
Class PooledExecutionServiceConfigurationBuilder

java.lang.Object
  extended by org.ehcache.config.builders.PooledExecutionServiceConfigurationBuilder
All Implemented Interfaces:
Builder<PooledExecutionServiceConfiguration>

public class PooledExecutionServiceConfigurationBuilder
extends java.lang.Object
implements Builder<PooledExecutionServiceConfiguration>

The PooledExecutionServiceConfigurationBuilder enables building configurations for an ExecutionService that is pool based using a fluent style.

As with all Ehcache builders, all instances are immutable and calling any method on the builder will return a new instance without modifying the one on which the method was called. This enables the sharing of builder instances without any risk of seeing them modified by code elsewhere.


Method Summary
 PooledExecutionServiceConfiguration build()
          Builds the PooledExecutionServiceConfiguration
 PooledExecutionServiceConfigurationBuilder defaultPool(java.lang.String alias, int minSize, int maxSize)
          Adds a default pool configuration to the returned builder.
static PooledExecutionServiceConfigurationBuilder newPooledExecutionServiceConfigurationBuilder()
          Creates a new instance of PooledExecutionServiceConfigurationBuilder
 PooledExecutionServiceConfigurationBuilder pool(java.lang.String alias, int minSize, int maxSize)
          Adds a pool configuration to the returned builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newPooledExecutionServiceConfigurationBuilder

public static PooledExecutionServiceConfigurationBuilder newPooledExecutionServiceConfigurationBuilder()
Creates a new instance of PooledExecutionServiceConfigurationBuilder

Returns:
the builder

defaultPool

public PooledExecutionServiceConfigurationBuilder defaultPool(java.lang.String alias,
                                                              int minSize,
                                                              int maxSize)
Adds a default pool configuration to the returned builder.

Parameters:
alias - the pool alias
minSize - the minimum number of threads in the pool
maxSize - the maximum number of threads in the pool
Returns:
a new builder with the added default pool

pool

public PooledExecutionServiceConfigurationBuilder pool(java.lang.String alias,
                                                       int minSize,
                                                       int maxSize)
Adds a pool configuration to the returned builder.

Parameters:
alias - the pool alias
minSize - the minimum number of threads in the pool
maxSize - the maximum number of threads in the pool
Returns:
a new builder with the added default pool

build

public PooledExecutionServiceConfiguration build()
Builds the PooledExecutionServiceConfiguration

Specified by:
build in interface Builder<PooledExecutionServiceConfiguration>
Returns:
the built configuration