org.ehcache.core.config.loaderwriter.writebehind
Class DefaultBatchingConfiguration

java.lang.Object
  extended by org.ehcache.core.config.loaderwriter.writebehind.DefaultBatchingConfiguration
All Implemented Interfaces:
WriteBehindConfiguration.BatchingConfiguration

public class DefaultBatchingConfiguration
extends java.lang.Object
implements WriteBehindConfiguration.BatchingConfiguration


Constructor Summary
DefaultBatchingConfiguration(long maxDelay, java.util.concurrent.TimeUnit maxDelayUnit, int batchSize, boolean coalescing)
           
 
Method Summary
 int getBatchSize()
          The recommended size of a batch of operations.
 long getMaxDelay()
          The maximum time to wait before writing behind.
 java.util.concurrent.TimeUnit getMaxDelayUnit()
          The time unit for the maximum delay.
 boolean isCoalescing()
          Whether write operations can be coalesced.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBatchingConfiguration

public DefaultBatchingConfiguration(long maxDelay,
                                    java.util.concurrent.TimeUnit maxDelayUnit,
                                    int batchSize,
                                    boolean coalescing)
Method Detail

getMaxDelay

public long getMaxDelay()
Description copied from interface: WriteBehindConfiguration.BatchingConfiguration
The maximum time to wait before writing behind.

Specified by:
getMaxDelay in interface WriteBehindConfiguration.BatchingConfiguration
Returns:
Retrieves the maximum time to wait before writing behind

getMaxDelayUnit

public java.util.concurrent.TimeUnit getMaxDelayUnit()
Description copied from interface: WriteBehindConfiguration.BatchingConfiguration
The time unit for the maximum delay.

Specified by:
getMaxDelayUnit in interface WriteBehindConfiguration.BatchingConfiguration
Returns:
Retrieves the unit for the maximum delay

isCoalescing

public boolean isCoalescing()
Description copied from interface: WriteBehindConfiguration.BatchingConfiguration
Whether write operations can be coalesced.

Specified by:
isCoalescing in interface WriteBehindConfiguration.BatchingConfiguration
Returns:
Retrieves the write coalescing behavior is enabled or not

getBatchSize

public int getBatchSize()
Description copied from interface: WriteBehindConfiguration.BatchingConfiguration
The recommended size of a batch of operations. Only positive values are legal. A value of 1 indicates that no batching should happen. Real batch size will be influenced by arrival frequency of operations and max write delay.

Specified by:
getBatchSize in interface WriteBehindConfiguration.BatchingConfiguration
Returns:
Retrieves the size of the batch operation.