public abstract class WriteBehindConfigurationBuilder extends java.lang.Object implements Builder<WriteBehindConfiguration>
WriteBehindConfigurationBuilder enables building WriteBehindConfigurations 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.
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder
Specialized  
WriteBehindConfigurationBuilder for WriteBehindConfigurations that supports batching | 
static class  | 
WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder
Specialized  
WriteBehindConfigurationBuilder for WriteBehindConfigurations without batching support | 
| Modifier and Type | Field and Description | 
|---|---|
protected int | 
concurrency  | 
protected int | 
queueSize  | 
protected java.lang.String | 
threadPoolAlias  | 
| Modifier and Type | Method and Description | 
|---|---|
abstract WriteBehindConfigurationBuilder | 
concurrencyLevel(int concurrency)
Sets the concurrency level on the returned builder. 
 | 
static WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder | 
newBatchedWriteBehindConfiguration(long maxDelay,
                                  java.util.concurrent.TimeUnit maxDelayUnit,
                                  int batchSize)
Creates a new builder for  
WriteBehindConfiguration that supports batching. | 
static WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder | 
newUnBatchedWriteBehindConfiguration()
Creates a new builder for  
WriteBehindConfiguration without batching support. | 
abstract WriteBehindConfigurationBuilder | 
queueSize(int size)
Sets the batch queue size on the returned builder. 
 | 
abstract WriteBehindConfigurationBuilder | 
useThreadPool(java.lang.String alias)
Sets the thread pool to use for write behind on the returned builder. 
 | 
protected int concurrency
protected int queueSize
protected java.lang.String threadPoolAlias
public static WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder newBatchedWriteBehindConfiguration(long maxDelay, java.util.concurrent.TimeUnit maxDelayUnit, int batchSize)
WriteBehindConfiguration that supports batching.maxDelay - the max delay for a batchmaxDelayUnit - the max delay unitbatchSize - the batch sizepublic static WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder newUnBatchedWriteBehindConfiguration()
WriteBehindConfiguration without batching support.public abstract WriteBehindConfigurationBuilder queueSize(int size)
   Default queue size is Integer.MAX_VALUE.
 
size - the new queue sizepublic abstract WriteBehindConfigurationBuilder concurrencyLevel(int concurrency)
   Default concurrency is 1.
 
concurrency - the concurrency levelpublic abstract WriteBehindConfigurationBuilder useThreadPool(java.lang.String alias)
alias - the thread pool aliasPooledExecutionServiceConfigurationBuilder