Package org.redisson.api
Class MapOptions<K,V>
java.lang.Object
org.redisson.api.MapOptions<K,V>
- Type Parameters:
K
- key typeV
- value type
- Direct Known Subclasses:
LocalCachedMapOptions
Configuration for Map object.
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> MapOptions<K, V> defaults()
Creates a new instance of MapOptions with default options.int
int
MapOptions<K,
V> SetsMapLoader
object.MapOptions<K,
V> writeBehindBatchSize
(int writeBehindBatchSize) Sets write behind tasks batch size.MapOptions<K,
V> writeBehindDelay
(int writeBehindDelay) Sets write behind tasks execution delay.MapOptions<K,
V> writeMode
(MapOptions.WriteMode writeMode) Sets write mode.MapOptions<K,
V> SetsMapWriter
object.
-
Constructor Details
-
MapOptions
protected MapOptions() -
MapOptions
-
-
Method Details
-
defaults
Creates a new instance of MapOptions with default options.This is equivalent to:
new MapOptions() .writer(null, null).loader(null);
- Type Parameters:
K
- key typeV
- value type- Returns:
- MapOptions instance
-
writer
SetsMapWriter
object.- Parameters:
writer
- object- Returns:
- MapOptions instance
-
getWriter
-
writeBehindBatchSize
Sets write behind tasks batch size. All updates accumulated into a batch of specified size and written withMapWriter
.Default is
50
- Parameters:
writeBehindBatchSize
- - size of batch- Returns:
- MapOptions instance
-
getWriteBehindBatchSize
public int getWriteBehindBatchSize() -
writeBehindDelay
Sets write behind tasks execution delay. All updates written withMapWriter
and lag not more than specified delay.Default is
1000
milliseconds- Parameters:
writeBehindDelay
- - delay in milliseconds- Returns:
- MapOptions instance
-
getWriteBehindDelay
public int getWriteBehindDelay() -
writeMode
Sets write mode.Default is
MapOptions.WriteMode.WRITE_THROUGH
- Parameters:
writeMode
- - write mode- Returns:
- MapOptions instance
-
getWriteMode
-
loader
SetsMapLoader
object.- Parameters:
loader
- object- Returns:
- MapOptions instance
-
getLoader
-