org.ehcache.config.writebehind
Class DefaultWriteBehindConfiguration

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

public class DefaultWriteBehindConfiguration
extends java.lang.Object
implements WriteBehindConfiguration


Constructor Summary
DefaultWriteBehindConfiguration()
           
 
Method Summary
 int getMaxWriteDelay()
          the maximum number of seconds to wait before writing behind
 int getMinWriteDelay()
          the minimum number of seconds to wait before writing behind
 int getRateLimitPerSecond()
          the maximum number of write operations to allow per second.
 int getRetryAttemptDelaySeconds()
          the number of seconds to wait before retrying an failed operation.
 int getRetryAttempts()
          the number of times the write of element is retried.
 java.lang.Class<WriteBehindDecoratorLoaderWriterProvider> getServiceType()
          Indicates which service this configuration works with.
 int getWriteBatchSize()
          the size of the batch operation.
 int getWriteBehindConcurrency()
          the amount of bucket/thread pairs configured for this cache's write behind
 int getWriteBehindMaxQueueSize()
          the maximum amount of operations allowed on the write behind queue
 boolean isWriteBatching()
          whether write operations should be batched
 boolean isWriteCoalescing()
          write coalescing behavior
 void setMaxWriteDelay(int maxWriteDelay)
           
 void setMinWriteDelay(int minWriteDelay)
           
 void setRateLimitPerSecond(int rateLimitPerSecond)
           
 void setRetryAttemptDelaySeconds(int retryAttemptDelaySeconds)
           
 void setRetryAttempts(int retryAttempts)
           
 void setWriteBatchSize(int writeBatchSize)
           
 void setWriteBehindConcurrency(int writeBehindConcurrency)
           
 void setWriteBehindMaxQueueSize(int writeBehindMaxQueueSize)
           
 void setWriteCoalescing(boolean writeCoalescing)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWriteBehindConfiguration

public DefaultWriteBehindConfiguration()
Method Detail

getMinWriteDelay

public int getMinWriteDelay()
Description copied from interface: WriteBehindConfiguration
the minimum number of seconds to wait before writing behind

Specified by:
getMinWriteDelay in interface WriteBehindConfiguration
Returns:
Retrieves the minimum number of seconds to wait before writing behind

getMaxWriteDelay

public int getMaxWriteDelay()
Description copied from interface: WriteBehindConfiguration
the maximum number of seconds to wait before writing behind

Specified by:
getMaxWriteDelay in interface WriteBehindConfiguration
Returns:
Retrieves the maximum number of seconds to wait before writing behind

getRateLimitPerSecond

public int getRateLimitPerSecond()
Description copied from interface: WriteBehindConfiguration
the maximum number of write operations to allow per second.

Specified by:
getRateLimitPerSecond in interface WriteBehindConfiguration
Returns:
Retrieves the maximum number of write operations to allow per second.

isWriteCoalescing

public boolean isWriteCoalescing()
Description copied from interface: WriteBehindConfiguration
write coalescing behavior

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

isWriteBatching

public boolean isWriteBatching()
Description copied from interface: WriteBehindConfiguration
whether write operations should be batched

Specified by:
isWriteBatching in interface WriteBehindConfiguration
Returns:
Retrieves whether write operations should be batched

getWriteBatchSize

public int getWriteBatchSize()
Description copied from interface: WriteBehindConfiguration
the size of the batch operation.

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

getRetryAttempts

public int getRetryAttempts()
Description copied from interface: WriteBehindConfiguration
the number of times the write of element is retried.

Specified by:
getRetryAttempts in interface WriteBehindConfiguration
Returns:
Retrieves the number of times the write of element is retried.

getRetryAttemptDelaySeconds

public int getRetryAttemptDelaySeconds()
Description copied from interface: WriteBehindConfiguration
the number of seconds to wait before retrying an failed operation.

Specified by:
getRetryAttemptDelaySeconds in interface WriteBehindConfiguration
Returns:
Retrieves the number of seconds to wait before retrying an failed operation.

getWriteBehindConcurrency

public int getWriteBehindConcurrency()
Description copied from interface: WriteBehindConfiguration
the amount of bucket/thread pairs configured for this cache's write behind

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

getWriteBehindMaxQueueSize

public int getWriteBehindMaxQueueSize()
Description copied from interface: WriteBehindConfiguration
the maximum amount of operations allowed on the write behind queue

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

setMinWriteDelay

public void setMinWriteDelay(int minWriteDelay)

setMaxWriteDelay

public void setMaxWriteDelay(int maxWriteDelay)

setRateLimitPerSecond

public void setRateLimitPerSecond(int rateLimitPerSecond)

setWriteCoalescing

public void setWriteCoalescing(boolean writeCoalescing)

setWriteBatchSize

public void setWriteBatchSize(int writeBatchSize)

setRetryAttempts

public void setRetryAttempts(int retryAttempts)

setRetryAttemptDelaySeconds

public void setRetryAttemptDelaySeconds(int retryAttemptDelaySeconds)

setWriteBehindConcurrency

public void setWriteBehindConcurrency(int writeBehindConcurrency)

setWriteBehindMaxQueueSize

public void setWriteBehindMaxQueueSize(int writeBehindMaxQueueSize)

getServiceType

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

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