|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.modules.ehcache.writebehind.WriteBehindAsyncConfig
public class WriteBehindAsyncConfig
An implementation of AsyncConfig that allows the configuration of the parameters that were set up for a
CacheWriterManager.
| Constructor Summary | |
|---|---|
WriteBehindAsyncConfig(long workDelay,
long maxAllowedFallBehind,
boolean batchingEnabled,
int batchSize,
boolean synchronousWrite,
int retryAttempts,
long retryAttemptDelay,
int rateLimit)
|
|
| Method Summary | |
|---|---|
int |
getBatchSize()
The number of items to include in each batch when batching is enabled. |
long |
getMaxAllowedFallBehind()
The maximum amount of time that a queue is allowed to fall behind on the work that it's processing. |
int |
getRateLimit()
Sets the maximum number of operations to allow per second when AsyncConfig.isBatchingEnabled() is enabled. |
long |
getRetryAttemptDelay()
Retrieves the number of milliseconds to wait before retrying a failed operation. |
int |
getRetryAttempts()
Retrieves the number of times the processing of an item os retried. |
long |
getWorkDelay()
Returns the amount of time to at least wait between individual work cycles. |
boolean |
isBatchingEnabled()
Indicates whether to batch items. |
boolean |
isStealingEnabled()
Indicates whether items can be stolen amongst queues or if each queue always has to process its own items |
boolean |
isSynchronousWrite()
Perform all writes to the Terracotta backend in a synchronous fashion, hence increasing reliability but decreasing performance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WriteBehindAsyncConfig(long workDelay,
long maxAllowedFallBehind,
boolean batchingEnabled,
int batchSize,
boolean synchronousWrite,
int retryAttempts,
long retryAttemptDelay,
int rateLimit)
| Method Detail |
|---|
public long getWorkDelay()
AsyncConfig
getWorkDelay in interface AsyncConfigpublic long getMaxAllowedFallBehind()
AsyncConfig
getMaxAllowedFallBehind in interface AsyncConfigpublic boolean isStealingEnabled()
AsyncConfig
isStealingEnabled in interface AsyncConfigtrue when stealing is enabled; or false otherwisepublic boolean isBatchingEnabled()
AsyncConfigtrue, ItemProcessor.process(java.util.Collection)
will be called rather than ItemProcessor.process(Object) being called for individual item. Resources such
as databases can perform more efficiently if updates are batched, thus reducing load.
isBatchingEnabled in interface AsyncConfigtrue if items should be batched; false otherwisepublic int getBatchSize()
AsyncConfig
getBatchSize in interface AsyncConfigpublic boolean isSynchronousWrite()
AsyncConfig
isSynchronousWrite in interface AsyncConfigtrue to enable synchronous writes; or false to perform the write asynchronouslypublic int getRetryAttempts()
AsyncConfig
getRetryAttempts in interface AsyncConfigpublic long getRetryAttemptDelay()
AsyncConfig
getRetryAttemptDelay in interface AsyncConfigpublic int getRateLimit()
AsyncConfigAsyncConfig.isBatchingEnabled() is enabled.
getRateLimit in interface AsyncConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||