Package org.ehcache.config.builders
Class WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder
java.lang.Object
org.ehcache.config.builders.WriteBehindConfigurationBuilder
org.ehcache.config.builders.WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder
- All Implemented Interfaces:
org.ehcache.config.Builder<org.ehcache.spi.loaderwriter.WriteBehindConfiguration<?>>
- Enclosing class:
- WriteBehindConfigurationBuilder
public static class WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder
extends WriteBehindConfigurationBuilder
Specialized
WriteBehindConfigurationBuilder for WriteBehindConfigurations without batching support-
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
Modifier and TypeMethodDescriptionorg.ehcache.spi.loaderwriter.WriteBehindConfiguration<?>build()Builds theWriteBehindConfigurationconcurrencyLevel(int concurrency) Sets the concurrency level on the returned builder.queueSize(int size) Sets the batch queue size on the returned builder.useThreadPool(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
-
Method Details
-
build
public org.ehcache.spi.loaderwriter.WriteBehindConfiguration<?> build()Builds theWriteBehindConfiguration- Returns:
- the write behind configuration
-
queueSize
Sets the batch queue size on the returned builder.Default queue size is
Integer.MAX_VALUE.- Specified by:
queueSizein classWriteBehindConfigurationBuilder- Parameters:
size- the new queue size- Returns:
- a new builder with updated queue size
-
concurrencyLevel
public WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder concurrencyLevel(int concurrency) Sets the concurrency level on the returned builder.Default concurrency is
1.- Specified by:
concurrencyLevelin classWriteBehindConfigurationBuilder- Parameters:
concurrency- the concurrency level- Returns:
- a new builder with the new concurrency level
-
useThreadPool
public WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder useThreadPool(String alias) Sets the thread pool to use for write behind on the returned builder.- Specified by:
useThreadPoolin classWriteBehindConfigurationBuilder- Parameters:
alias- the thread pool alias- Returns:
- a new builer with the configured thread pool alias
- See Also:
-