public class DefaultBatchingConfiguration
extends java.lang.Object
implements org.ehcache.spi.loaderwriter.WriteBehindConfiguration.BatchingConfiguration
Enables configuring write-behind batching, first by specifying the batch size. Then a write delay must be configured. It will indicate how long an incomplete batch will wait for extra operations. Finally coalescing can be configure which will make the batch forget all but the last operation on a per key basis.
| Constructor and Description |
|---|
DefaultBatchingConfiguration(long maxDelay,
java.util.concurrent.TimeUnit maxDelayUnit,
int batchSize,
boolean coalescing)
Creates a new configuration with the provided parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize() |
long |
getMaxDelay() |
java.util.concurrent.TimeUnit |
getMaxDelayUnit() |
boolean |
isCoalescing() |
public DefaultBatchingConfiguration(long maxDelay,
java.util.concurrent.TimeUnit maxDelayUnit,
int batchSize,
boolean coalescing)
maxDelay - the maximum write delay quantitymaxDelayUnit - the maximu write delay unitbatchSize - the batch sizecoalescing - whether the batch is to be coalescedpublic long getMaxDelay()
getMaxDelay in interface org.ehcache.spi.loaderwriter.WriteBehindConfiguration.BatchingConfigurationpublic java.util.concurrent.TimeUnit getMaxDelayUnit()
getMaxDelayUnit in interface org.ehcache.spi.loaderwriter.WriteBehindConfiguration.BatchingConfigurationpublic boolean isCoalescing()
isCoalescing in interface org.ehcache.spi.loaderwriter.WriteBehindConfiguration.BatchingConfigurationpublic int getBatchSize()
getBatchSize in interface org.ehcache.spi.loaderwriter.WriteBehindConfiguration.BatchingConfiguration