Package org.redisson.api
Class MapCacheOptions<K,V>
java.lang.Object
org.redisson.api.MapOptions<K,V>
org.redisson.api.MapCacheOptions<K,V>
- Type Parameters:
K
- key typeV
- value type
Configuration for RMapCache object.
- Author:
- Nikita Koksharov
-
Nested Class Summary
Nested classes/interfaces inherited from class org.redisson.api.MapOptions
MapOptions.WriteMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> MapCacheOptions <K, V> defaults()
boolean
SetsMapLoader
object.loaderAsync
(MapLoaderAsync<K, V> loaderAsync) SetsMapLoaderAsync
object.Removes eviction task from memory if map is empty upon entries eviction process completion.writeBehindBatchSize
(int writeBehindBatchSize) Sets write behind tasks batch size.writeBehindDelay
(int writeBehindDelay) Sets write behind tasks execution delay.writeMode
(MapOptions.WriteMode writeMode) Sets write mode.DefinesMapWriter
object which is invoked during write operation.writerAsync
(MapWriterAsync<K, V> writer) DefinesMapWriterAsync
object which is invoked during write operation.writerRetryAttempts
(int writerRetryAttempts) Sets max retry attempts forRetryableMapWriter
orRetryableMapWriterAsync
writerRetryInterval
(Duration writerRetryInterval) Sets retry interval forRetryableMapWriter
orRetryableMapWriterAsync
Methods inherited from class org.redisson.api.MapOptions
getLoader, getLoaderAsync, getWriteBehindBatchSize, getWriteBehindDelay, getWriteMode, getWriter, getWriterAsync, getWriterRetryAttempts, getWriterRetryInterval
-
Constructor Details
-
MapCacheOptions
public MapCacheOptions()
-
-
Method Details
-
defaults
-
writer
Description copied from class:MapOptions
DefinesMapWriter
object which is invoked during write operation.- Overrides:
writer
in classMapOptions<K,
V> - Parameters:
writer
- object- Returns:
- MapOptions instance
-
writerAsync
Description copied from class:MapOptions
DefinesMapWriterAsync
object which is invoked during write operation.- Overrides:
writerAsync
in classMapOptions<K,
V> - Parameters:
writer
- object- Returns:
- MapOptions instance
-
writeBehindBatchSize
Description copied from class:MapOptions
Sets write behind tasks batch size. All updates accumulated into a batch of specified size and written withMapWriter
.Default is
50
- Overrides:
writeBehindBatchSize
in classMapOptions<K,
V> - Parameters:
writeBehindBatchSize
- - size of batch- Returns:
- MapOptions instance
-
writeBehindDelay
Description copied from class:MapOptions
Sets write behind tasks execution delay. All updates written withMapWriter
and lag not more than specified delay.Default is
1000
milliseconds- Overrides:
writeBehindDelay
in classMapOptions<K,
V> - Parameters:
writeBehindDelay
- - delay in milliseconds- Returns:
- MapOptions instance
-
writeMode
Description copied from class:MapOptions
Sets write mode.Default is
MapOptions.WriteMode.WRITE_THROUGH
- Overrides:
writeMode
in classMapOptions<K,
V> - Parameters:
writeMode
- - write mode- Returns:
- MapOptions instance
-
loader
Description copied from class:MapOptions
SetsMapLoader
object.- Overrides:
loader
in classMapOptions<K,
V> - Parameters:
loader
- object- Returns:
- MapOptions instance
-
loaderAsync
Description copied from class:MapOptions
SetsMapLoaderAsync
object.- Overrides:
loaderAsync
in classMapOptions<K,
V> - Parameters:
loaderAsync
- object- Returns:
- MapOptions instance
-
writerRetryAttempts
Description copied from class:MapOptions
Sets max retry attempts forRetryableMapWriter
orRetryableMapWriterAsync
- Overrides:
writerRetryAttempts
in classMapOptions<K,
V> - Parameters:
writerRetryAttempts
- object- Returns:
- MapOptions instance
-
writerRetryInterval
Description copied from class:MapOptions
Sets retry interval forRetryableMapWriter
orRetryableMapWriterAsync
- Overrides:
writerRetryInterval
in classMapOptions<K,
V> - Parameters:
writerRetryInterval
-Duration
- Returns:
- MapOptions instance
-
isRemoveEmptyEvictionTask
public boolean isRemoveEmptyEvictionTask() -
removeEmptyEvictionTask
Removes eviction task from memory if map is empty upon entries eviction process completion.- Returns:
- MapOptions instance
-