org.ehcache.config.builders
Class WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder

java.lang.Object
  extended by org.ehcache.config.builders.WriteBehindConfigurationBuilder
      extended by org.ehcache.config.builders.WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder
All Implemented Interfaces:
Builder<WriteBehindConfiguration>
Enclosing class:
WriteBehindConfigurationBuilder

public static final class WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder
extends WriteBehindConfigurationBuilder

Specialized WriteBehindConfigurationBuilder for WriteBehindConfigurations that supports batching


Nested Class Summary
 
Nested classes/interfaces inherited from class org.ehcache.config.builders.WriteBehindConfigurationBuilder
WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder, WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder
 
Field Summary
 
Fields inherited from class org.ehcache.config.builders.WriteBehindConfigurationBuilder
concurrency, queueSize, threadPoolAlias
 
Method Summary
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder batchSize(int batchSize)
          Updates the batch size on the returned builder.
 WriteBehindConfiguration build()
          Builds the WriteBehindConfiguration
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder concurrencyLevel(int concurrency)
          Sets the concurrency level on the returned builder.
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder disableCoalescing()
          Disables batch coalescing on the returned builder.
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder enableCoalescing()
          Enables batch coalescing on the returned builder.
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder maxWriteDelay(long maxDelay, java.util.concurrent.TimeUnit maxDelayUnit)
          Updates the max write delay on the returned builder.
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder queueSize(int size)
          Sets the batch queue size on the returned builder.
 WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder useThreadPool(java.lang.String alias)
          Sets the thread pool to use for write behind on the returned builder.
 
Methods inherited from class org.ehcache.config.builders.WriteBehindConfigurationBuilder
newBatchedWriteBehindConfiguration, newUnBatchedWriteBehindConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

enableCoalescing

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder enableCoalescing()
Enables batch coalescing on the returned builder.

Returns:
a new builder with batch coalescing enabled
See Also:
disableCoalescing()

disableCoalescing

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder disableCoalescing()
Disables batch coalescing on the returned builder.

Returns:
a new buidler with batch coalescing disabled
See Also:
enableCoalescing()

batchSize

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder batchSize(int batchSize)
Updates the batch size on the returned builder.

Parameters:
batchSize - the new batch size
Returns:
a new builder with updated batch size

maxWriteDelay

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder maxWriteDelay(long maxDelay,
                                                                                            java.util.concurrent.TimeUnit maxDelayUnit)
Updates the max write delay on the returned builder.

Parameters:
maxDelay - the max delay amount
maxDelayUnit - the max delay unit
Returns:
a new builder with updated max write delay

queueSize

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder queueSize(int size)
Sets the batch queue size on the returned builder.

Default queue size is Integer.MAX_VALUE.

Specified by:
queueSize in class WriteBehindConfigurationBuilder
Parameters:
size - the new queue size
Returns:
a new builder with updated queue size

concurrencyLevel

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder concurrencyLevel(int concurrency)
Sets the concurrency level on the returned builder.

Default concurrency is 1.

Specified by:
concurrencyLevel in class WriteBehindConfigurationBuilder
Parameters:
concurrency - the concurrency level
Returns:
a new builder with the new concurrency level

useThreadPool

public WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder useThreadPool(java.lang.String alias)
Sets the thread pool to use for write behind on the returned builder.

Specified by:
useThreadPool in class WriteBehindConfigurationBuilder
Parameters:
alias - the thread pool alias
Returns:
a new builer with the configured thread pool alias
See Also:
PooledExecutionServiceConfigurationBuilder

build

public WriteBehindConfiguration build()
Builds the WriteBehindConfiguration

Returns:
the write behind configuration