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 |
getWriteBehindThreads() |
MapOptions.WriteMode |
getWriteMode() |
MapWriter<K,V> |
getWriter() |
MapOptions<K,V> |
loader(MapLoader<K,V> loader)
Sets
MapLoader object. |
MapOptions<K,V> |
writeBehindThreads(int writeBehindThreads)
Sets threads amount used in write behind mode.
|
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> writeBehindThreads(int writeBehindThreads)
Default is 1
writeBehindThreads
- - threads amountpublic int getWriteBehindThreads()
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–2019 The Redisson Project. All rights reserved.