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

java.lang.Object
  extended by org.ehcache.core.config.loaderwriter.writebehind.DefaultWriteBehindConfiguration
All Implemented Interfaces:
WriteBehindConfiguration, ServiceConfiguration<WriteBehindProvider>

public class DefaultWriteBehindConfiguration
extends java.lang.Object
implements WriteBehindConfiguration


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ehcache.spi.loaderwriter.WriteBehindConfiguration
WriteBehindConfiguration.BatchingConfiguration
 
Constructor Summary
DefaultWriteBehindConfiguration(java.lang.String executorAlias, int concurrency, int queueSize, WriteBehindConfiguration.BatchingConfiguration batchingConfig)
           
 
Method Summary
 WriteBehindConfiguration.BatchingConfiguration getBatchingConfiguration()
          Returns the batching configuration or null if batching is not enabled.
 int getConcurrency()
          A number of bucket/thread pairs configured for this cache's write behind.
 int getMaxQueueSize()
          The maximum number of operations allowed on the write behind queue.
 java.lang.Class<WriteBehindProvider> getServiceType()
          Indicates which service this configuration works with.
 java.lang.String getThreadPoolAlias()
          Returns the alias of the thread resource pool to use for write behind task execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWriteBehindConfiguration

public DefaultWriteBehindConfiguration(java.lang.String executorAlias,
                                       int concurrency,
                                       int queueSize,
                                       WriteBehindConfiguration.BatchingConfiguration batchingConfig)
Method Detail

getConcurrency

public int getConcurrency()
Description copied from interface: WriteBehindConfiguration
A number of bucket/thread pairs configured for this cache's write behind.

Specified by:
getConcurrency in interface WriteBehindConfiguration
Returns:
Retrieves the amount of bucket/thread pairs configured for this cache's write behind

getMaxQueueSize

public int getMaxQueueSize()
Description copied from interface: WriteBehindConfiguration
The maximum number of operations allowed on the write behind queue. Only positive values are legal.

Specified by:
getMaxQueueSize in interface WriteBehindConfiguration
Returns:
Retrieves the maximum amount of operations allowed on the write behind queue

getThreadPoolAlias

public java.lang.String getThreadPoolAlias()
Description copied from interface: WriteBehindConfiguration
Returns the alias of the thread resource pool to use for write behind task execution.

Specified by:
getThreadPoolAlias in interface WriteBehindConfiguration
Returns:
the thread pool alias

getBatchingConfiguration

public WriteBehindConfiguration.BatchingConfiguration getBatchingConfiguration()
Description copied from interface: WriteBehindConfiguration
Returns the batching configuration or null if batching is not enabled.

Specified by:
getBatchingConfiguration in interface WriteBehindConfiguration
Returns:
the batching configuration

getServiceType

public java.lang.Class<WriteBehindProvider> getServiceType()
Description copied from interface: ServiceConfiguration
Indicates which service this configuration works with.

Specified by:
getServiceType in interface ServiceConfiguration<WriteBehindProvider>
Returns:
the service type