| Modifier and Type | Class and Description |
|---|---|
| public static class | CacheWriterConfiguration.CacheWriterFactoryConfiguration
Configuration for the CacheWriterFactoryConfiguration. |
| public static enum | CacheWriterConfiguration.WriteMode
Represents how elements are written to the |
| Modifier and Type | Field and Description |
|---|---|
| private CacheWriterConfiguration. | |
| public static final int | DEFAULT_MAX_WRITE_DELAY
Default maximum write delay |
| public static final int | DEFAULT_MIN_WRITE_DELAY
Default minimum write delay |
| public static final boolean | DEFAULT_NOTIFY_LISTENERS_ON_EXCEPTION
Default notifyListenersOnException behavior |
| public static final int | DEFAULT_RATE_LIMIT_PER_SECOND
Default rate limit per second |
| public static final int | DEFAULT_RETRY_ATTEMPT_DELAY_SECONDS
Default retry attempt delay |
| public static final int | DEFAULT_RETRY_ATTEMPTS
Default retry attempts |
| public static final int | DEFAULT_WRITE_BATCH_SIZE
Default write batch size |
| public static final boolean | DEFAULT_WRITE_BATCHING
Default writeBatching behavior |
| public static final int | DEFAULT_WRITE_BEHIND_CONCURRENCY
Default concurrency level for write behind |
| public static final int | DEFAULT_WRITE_BEHIND_MAX_QUEUE_SIZE
Default max queue size for write behind |
| public static final boolean | DEFAULT_WRITE_COALESCING
Default write coalescing behavior |
| public static final CacheWriterConfiguration. | DEFAULT_WRITE_MODE
Default writeMode |
| private int | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private int | |
| private boolean | |
| private CacheWriterConfiguration. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | addCacheWriterFactory(CacheWriterConfiguration.
Allows BeanHandler to add the CacheWriterFactory to the configuration. |
| public CacheWriterConfiguration | Returns: this configuration instance
|
| public CacheWriterConfiguration | Returns: a copy, which independent other than configurations than cannot change.Overrides java. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public CacheWriterConfiguration. | |
| public int | |
| public int | |
| public boolean | getNotifyListenersOnException()
Check whether listeners should be notified when an exception occurs on a writer operation |
| public int | |
| public int | getRetryAttemptDelaySeconds()
Retrieves the number of seconds to wait before retrying an failed operation. |
| public int | |
| public boolean | |
| public int | |
| public int | Returns: the amount of bucket/thread pairs configured for this cache's write behindAccessor |
| public int | Returns: the maximum amount of operations allowed on the write behind queueAccessor |
| public boolean | |
| public CacheWriterConfiguration. | |
| public int | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public void | setMaxWriteDelay(int
the maximum number of seconds to wait before writing behind maxWriteDelay)Set the maximum number of seconds to wait before writing behind. |
| public void | setMinWriteDelay(int
the minimum number of seconds to wait before writing behind minWriteDelay)Set the minimum number of seconds to wait before writing behind. |
| public void | setNotifyListenersOnException(boolean
true if listeners should be notified when an exception occurs on a writer operation; false otherwiseSets whether to notify listeners when an exception occurs on a writer operation. |
| public void | setRateLimitPerSecond(int
the number of write operations to allow; use a number rateLimitPerSecond)<=0 to disable rate limiting.Sets the maximum number of write operations to allow per second when |
| public void | setRetryAttemptDelaySeconds(int
the number of seconds to wait before retrying an operation retryAttemptDelaySeconds)Sets the number of seconds to wait before retrying an failed operation. |
| public void | setRetryAttempts(int
the number of retries for a particular element retryAttempts)Sets the number of times the operation is retried in the |
| public void | setWriteBatching(boolean
true if write operations should be batched; false otherwiseSets whether to batch write operations. |
| public void | setWriteBatchSize(int
the number of operations to include in each batch; numbers smaller than writeBatchSize)1 will cause
the default batch size to be usedSets the number of operations to include in each batch when |
| public void | setWriteBehindConcurrency(int
Amount of thread/bucket pairs, has to be at least 1 concurrency)Configures the amount of thread/bucket pairs WriteBehind should use |
| public void | setWriteBehindMaxQueueSize(final int
maximum amount of operations allowed on the waiting queue writeBehindMaxQueueSize)Configures the maximum amount of operations to be on the waiting queue, before it blocks |
| public void | setWriteCoalescing(boolean
true to enable write coalescing; or false to disable itSets whether to use write coalescing. |
| public void | setWriteMode(String writeMode)
Converts the |
| public void | validate(Collection<ConfigError>
collection to add errors to. errors)Check for errors/inconsistencies in this configuration. |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | Returns: this configuration instanceAmount of thread/bucket pairs, has to be at least 1 concurrency)
|
| public CacheWriterConfiguration | Returns: this configuration instancemaximum amount of operations allowed on the waiting queue writeBehindMaxQueueSize)
|
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration | |
| public CacheWriterConfiguration |
| cacheWriterFactoryConfiguration | back to summary |
|---|---|
| private CacheWriterConfiguration. | |
| DEFAULT_MAX_WRITE_DELAY | back to summary |
|---|---|
| public static final int DEFAULT_MAX_WRITE_DELAY Default maximum write delay | |
| DEFAULT_MIN_WRITE_DELAY | back to summary |
|---|---|
| public static final int DEFAULT_MIN_WRITE_DELAY Default minimum write delay | |
| DEFAULT_NOTIFY_LISTENERS_ON_EXCEPTION | back to summary |
|---|---|
| public static final boolean DEFAULT_NOTIFY_LISTENERS_ON_EXCEPTION Default notifyListenersOnException behavior | |
| DEFAULT_RATE_LIMIT_PER_SECOND | back to summary |
|---|---|
| public static final int DEFAULT_RATE_LIMIT_PER_SECOND Default rate limit per second | |
| DEFAULT_RETRY_ATTEMPT_DELAY_SECONDS | back to summary |
|---|---|
| public static final int DEFAULT_RETRY_ATTEMPT_DELAY_SECONDS Default retry attempt delay | |
| DEFAULT_RETRY_ATTEMPTS | back to summary |
|---|---|
| public static final int DEFAULT_RETRY_ATTEMPTS Default retry attempts | |
| DEFAULT_WRITE_BATCH_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_WRITE_BATCH_SIZE Default write batch size | |
| DEFAULT_WRITE_BATCHING | back to summary |
|---|---|
| public static final boolean DEFAULT_WRITE_BATCHING Default writeBatching behavior | |
| DEFAULT_WRITE_BEHIND_CONCURRENCY | back to summary |
|---|---|
| public static final int DEFAULT_WRITE_BEHIND_CONCURRENCY Default concurrency level for write behind | |
| DEFAULT_WRITE_BEHIND_MAX_QUEUE_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_WRITE_BEHIND_MAX_QUEUE_SIZE Default max queue size for write behind | |
| DEFAULT_WRITE_COALESCING | back to summary |
|---|---|
| public static final boolean DEFAULT_WRITE_COALESCING Default write coalescing behavior | |
| DEFAULT_WRITE_MODE | back to summary |
|---|---|
| public static final CacheWriterConfiguration. Default writeMode | |
| maxWriteDelay | back to summary |
|---|---|
| private int maxWriteDelay | |
| minWriteDelay | back to summary |
|---|---|
| private int minWriteDelay | |
| notifyListenersOnException | back to summary |
|---|---|
| private boolean notifyListenersOnException | |
| rateLimitPerSecond | back to summary |
|---|---|
| private int rateLimitPerSecond | |
| retryAttemptDelaySeconds | back to summary |
|---|---|
| private int retryAttemptDelaySeconds | |
| retryAttempts | back to summary |
|---|---|
| private int retryAttempts | |
| writeBatching | back to summary |
|---|---|
| private boolean writeBatching | |
| writeBatchSize | back to summary |
|---|---|
| private int writeBatchSize | |
| writeBehindConcurrency | back to summary |
|---|---|
| private int writeBehindConcurrency | |
| writeBehindMaxQueueSize | back to summary |
|---|---|
| private int writeBehindMaxQueueSize | |
| writeCoalescing | back to summary |
|---|---|
| private boolean writeCoalescing | |
| writeMode | back to summary |
|---|---|
| private CacheWriterConfiguration. | |
| CacheWriterConfiguration | back to summary |
|---|---|
| public CacheWriterConfiguration() | |
| addCacheWriterFactory | back to summary |
|---|---|
| public final void addCacheWriterFactory(CacheWriterConfiguration. Allows BeanHandler to add the CacheWriterFactory to the configuration. | |
| cacheWriterFactory | back to summary |
|---|---|
public CacheWriterConfiguration cacheWriterFactory(CacheWriterConfiguration.
| |
| clone | back to summary |
|---|---|
| public CacheWriterConfiguration clone() Overrides java. Clones this object, following the usual contract.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Overrided equals()
| |
| getCacheWriterFactoryConfiguration | back to summary |
|---|---|
| public CacheWriterConfiguration. Accessor
| |
| getMaxWriteDelay | back to summary |
|---|---|
| public int getMaxWriteDelay() Get the maximum number of seconds to wait before writing behind | |
| getMinWriteDelay | back to summary |
|---|---|
| public int getMinWriteDelay() Get the minimum number of seconds to wait before writing behind | |
| getNotifyListenersOnException | back to summary |
|---|---|
| public boolean getNotifyListenersOnException() Check whether listeners should be notified when an exception occurs on a writer operation | |
| getRateLimitPerSecond | back to summary |
|---|---|
| public int getRateLimitPerSecond() Get the maximum number of write operations to allow per second. | |
| getRetryAttemptDelaySeconds | back to summary |
|---|---|
| public int getRetryAttemptDelaySeconds() Retrieves the number of seconds to wait before retrying an failed operation. | |
| getRetryAttempts | back to summary |
|---|---|
| public int getRetryAttempts() Retrieves the number of times the write of element is retried. | |
| getWriteBatching | back to summary |
|---|---|
| public boolean getWriteBatching() Check whether write operations should be batched | |
| getWriteBatchSize | back to summary |
|---|---|
| public int getWriteBatchSize() Retrieves the size of the batch operation. | |
| getWriteBehindConcurrency | back to summary |
|---|---|
| public int getWriteBehindConcurrency() Accessor
| |
| getWriteBehindMaxQueueSize | back to summary |
|---|---|
| public int getWriteBehindMaxQueueSize() Accessor
| |
| getWriteCoalescing | back to summary |
|---|---|
public boolean getWriteCoalescing()
| |
| getWriteMode | back to summary |
|---|---|
| public CacheWriterConfiguration. Get the write mode in terms of the mode enum | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Overrided hashCode()
| |
| maxWriteDelay | back to summary |
|---|---|
public CacheWriterConfiguration maxWriteDelay(int maxWriteDelay)
| |
| minWriteDelay | back to summary |
|---|---|
public CacheWriterConfiguration minWriteDelay(int minWriteDelay)
| |
| notifyListenersOnException | back to summary |
|---|---|
public CacheWriterConfiguration notifyListenersOnException(boolean notifyListenersOnException)
| |
| rateLimitPerSecond | back to summary |
|---|---|
public CacheWriterConfiguration rateLimitPerSecond(int rateLimitPerSecond)
| |
| retryAttemptDelaySeconds | back to summary |
|---|---|
public CacheWriterConfiguration retryAttemptDelaySeconds(int retryAttemptDelaySeconds)
| |
| retryAttempts | back to summary |
|---|---|
public CacheWriterConfiguration retryAttempts(int retryAttempts)
| |
| setMaxWriteDelay | back to summary |
|---|---|
| public void setMaxWriteDelay(int maxWriteDelay) Set the maximum number of seconds to wait before writing behind. If set to a value greater than 0, it permits operations to build up in the queue to enable effective coalescing and batching optimisations. This is only applicable to write behind mode. Defaults to 1).
| |
| setMinWriteDelay | back to summary |
|---|---|
| public void setMinWriteDelay(int minWriteDelay) Set the minimum number of seconds to wait before writing behind. If set to a value greater than 0, it permits
operations to build up in the queue. This is different from the maximum write delay in that by waiting a minimum
amount of time, work is always being built up. If the minimum write delay is set to zero and the This is only applicable to write behind mode. Defaults to 1).
| |
| setNotifyListenersOnException | back to summary |
|---|---|
| public void setNotifyListenersOnException(boolean notifyListenersOnException) Sets whether to notify listeners when an exception occurs on a writer operation. This is only applicable to write through mode. Defaults to false.
| |
| setRateLimitPerSecond | back to summary |
|---|---|
| public void setRateLimitPerSecond(int rateLimitPerSecond) Sets the maximum number of write operations to allow per second when This is only applicable to write behind mode. Defaults to 0.
| |
| setRetryAttemptDelaySeconds | back to summary |
|---|---|
| public void setRetryAttemptDelaySeconds(int retryAttemptDelaySeconds) Sets the number of seconds to wait before retrying an failed operation. This is only applicable to write behind mode. Defaults to 1.
| |
| setRetryAttempts | back to summary |
|---|---|
| public void setRetryAttempts(int retryAttempts) Sets the number of times the operation is retried in the This is only applicable to write behind mode. Defaults to 0.
| |
| setWriteBatching | back to summary |
|---|---|
| public void setWriteBatching(boolean writeBatching) Sets whether to batch write operations. If set to This is only applicable to write behind mode. Defaults to false.
| |
| setWriteBatchSize | back to summary |
|---|---|
| public void setWriteBatchSize(int writeBatchSize) Sets the number of operations to include in each batch when This is only applicable to write behind mode. Defaults to 1.
| |
| setWriteBehindConcurrency | back to summary |
|---|---|
| public void setWriteBehindConcurrency(int concurrency) Configures the amount of thread/bucket pairs WriteBehind should use
| |
| setWriteBehindMaxQueueSize | back to summary |
|---|---|
| public void setWriteBehindMaxQueueSize(final int writeBehindMaxQueueSize) Configures the maximum amount of operations to be on the waiting queue, before it blocks
| |
| setWriteCoalescing | back to summary |
|---|---|
| public void setWriteCoalescing(boolean writeCoalescing) Sets whether to use write coalescing. If set to This is only applicable to write behind mode. Defaults to false.
| |
| setWriteMode | back to summary |
|---|---|
| public void setWriteMode(String writeMode) Converts the | |
| validate | back to summary |
|---|---|
| public void validate(Collection<ConfigError> errors) Check for errors/inconsistencies in this configuration. Add any erros found as
| |
| writeBatching | back to summary |
|---|---|
public CacheWriterConfiguration writeBatching(boolean writeBatching)
| |
| writeBatchSize | back to summary |
|---|---|
public CacheWriterConfiguration writeBatchSize(int writeBatchSize)
| |
| writeBehindConcurrency | back to summary |
|---|---|
public CacheWriterConfiguration writeBehindConcurrency(int concurrency)
| |
| writeBehindMaxQueueSize | back to summary |
|---|---|
public CacheWriterConfiguration writeBehindMaxQueueSize(int writeBehindMaxQueueSize)
| |
| writeCoalescing | back to summary |
|---|---|
public CacheWriterConfiguration writeCoalescing(boolean writeCoalescing)
| |
| writeMode | back to summary |
|---|---|
public CacheWriterConfiguration writeMode(String writeMode)
| |
| writeMode | back to summary |
|---|---|
public CacheWriterConfiguration writeMode(CacheWriterConfiguration.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides net. |
| public int |
| CacheWriterFactoryConfiguration | back to summary |
|---|---|
| public CacheWriterFactoryConfiguration() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides net. Overrided equals
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides net. Overrided hashCode()
| |
net.sf.ehcache.writer.CacheWriter
| Modifier and Type | Field and Description |
|---|---|
| public static final CacheWriterConfiguration. | WRITE_BEHIND
Write mode enum constant that can be used to configure a cache writer to use write behind |
| public static final CacheWriterConfiguration. | WRITE_THROUGH
Write mode enum constant that can be used to configure a cache writer to use write through |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public abstract CacheWriterManager | Returns: the newly createdWriterManagerthe cache instance for which the cache, Store store)WriterManager should be createdCreate a new |
| public static CacheWriterConfiguration. | |
| public static CacheWriterConfiguration. |
| WRITE_BEHIND | back to summary |
|---|---|
| public static final CacheWriterConfiguration. Write mode enum constant that can be used to configure a cache writer to use write behind | |
| WRITE_THROUGH | back to summary |
|---|---|
| public static final CacheWriterConfiguration. Write mode enum constant that can be used to configure a cache writer to use write through | |
| WriteMode | back to summary |
|---|---|
| private WriteMode() | |
| createWriterManager | back to summary |
|---|---|
| public abstract CacheWriterManager createWriterManager(Cache cache, Store store) Create a new
| |
| valueOf | back to summary |
|---|---|
| public static CacheWriterConfiguration. | |
| values | back to summary |
|---|---|
| public static CacheWriterConfiguration. | |