|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ehcache.config.builders.WriteBehindConfigurationBuilder
public abstract class WriteBehindConfigurationBuilder
The 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.
| Nested Class Summary | |
|---|---|
static class |
WriteBehindConfigurationBuilder.BatchedWriteBehindConfigurationBuilder
Specialized WriteBehindConfigurationBuilder for WriteBehindConfigurations that supports batching |
static class |
WriteBehindConfigurationBuilder.UnBatchedWriteBehindConfigurationBuilder
Specialized WriteBehindConfigurationBuilder for WriteBehindConfigurations without batching support |
| Field Summary | |
|---|---|
protected int |
concurrency
|
protected int |
queueSize
|
protected java.lang.String |
threadPoolAlias
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.ehcache.config.Builder |
|---|
build |
| Field Detail |
|---|
protected int concurrency
protected int queueSize
protected java.lang.String threadPoolAlias
| Method Detail |
|---|
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 size
public 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 size
public abstract WriteBehindConfigurationBuilder concurrencyLevel(int concurrency)
Default concurrency is 1.
concurrency - the concurrency level
public abstract WriteBehindConfigurationBuilder useThreadPool(java.lang.String alias)
alias - the thread pool alias
PooledExecutionServiceConfigurationBuilder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||