K
- key typeV
- value typepublic class MapOptions<K,V> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MapOptions.WriteMode |
Modifier | Constructor and Description |
---|---|
protected |
MapOptions() |
protected |
MapOptions(MapOptions<K,V> copy) |
Modifier and Type | Method and Description |
---|---|
static <K,V> MapOptions<K,V> |
defaults()
Creates a new instance of MapOptions with default options.
|
MapLoader<K,V> |
getLoader() |
int |
getWriteBehindBatchSize() |
int |
getWriteBehindDelay() |
MapOptions.WriteMode |
getWriteMode() |
MapWriter<K,V> |
getWriter() |
MapOptions<K,V> |
loader(MapLoader<K,V> loader)
Sets
MapLoader 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> |
writer(MapWriter<K,V> writer)
Sets
MapWriter object. |
protected MapOptions()
protected MapOptions(MapOptions<K,V> copy)
public static <K,V> MapOptions<K,V> defaults()
This is equivalent to:
new MapOptions() .writer(null, null).loader(null);
K
- key typeV
- value typepublic MapOptions<K,V> writer(MapWriter<K,V> writer)
MapWriter
object.writer
- objectpublic MapOptions<K,V> writeBehindBatchSize(int writeBehindBatchSize)
Default is 50
writeBehindBatchSize
- - size of batchpublic int getWriteBehindBatchSize()
public MapOptions<K,V> writeBehindDelay(int writeBehindDelay)
Default is 1000
milliseconds
writeBehindDelay
- - delay in millisecondspublic int getWriteBehindDelay()
public MapOptions<K,V> writeMode(MapOptions.WriteMode writeMode)
Default is MapOptions.WriteMode.WRITE_THROUGH
writeMode
- - write modepublic MapOptions.WriteMode getWriteMode()
public MapOptions<K,V> loader(MapLoader<K,V> loader)
MapLoader
object.loader
- objectCopyright © 2014–2020 Redisson. All rights reserved.