Package org.redisson.api.options
Class MapCacheParams<K,V>
java.lang.Object
org.redisson.api.options.MapCacheParams<K,V>
- Type Parameters:
K
- type of keyV
- type of value
- All Implemented Interfaces:
CodecOptions<MapCacheOptions<K,
,V>, Codec> ExMapOptions<MapCacheOptions<K,
,V>, K, V> InvocationOptions<MapCacheOptions<K,
,V>> MapCacheOptions<K,
,V> ObjectParams
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionDefines codec used for data stored in RedisgetCodec()
getName()
int
int
int
int
int
int
long
boolean
SetsMapLoader
object.loaderAsync
(MapLoaderAsync<K, V> loaderAsync) SetsMapLoaderAsync
object.Removes eviction task from memory if map is empty upon entries eviction process completion.retryAttempts
(int retryAttempts) Defines command retry attempts.retryInterval
(Duration interval) Defines time interval for another one attempt to send a Redis command if it hasn't already been sent.Defines Redis server response timeout.writeBehindBatchSize
(int writeBehindBatchSize) Sets write behind tasks batch size.writeBehindDelay
(int writeBehindDelay) Sets write behind tasks execution delay.Sets write mode.DefinesMapWriter
object which is invoked during write operation.writerAsync
(MapWriterAsync<K, V> writer) DefinesMapWriterAsync
object which is invoked during write operation.writeRetryAttempts
(int writerRetryAttempts) Sets max retry attempts forRetryableMapWriter
orRetryableMapWriterAsync
writeRetryInterval
(Duration writerRetryInterval) Sets write retry intervalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.redisson.api.options.CodecOptions
codec
Methods inherited from interface org.redisson.api.options.ExMapOptions
loader, loaderAsync, writeBehindBatchSize, writeBehindDelay, writeMode, writer, writerAsync, writeRetryAttempts, writeRetryInterval
Methods inherited from interface org.redisson.api.options.InvocationOptions
retryAttempts, retryInterval, timeout
-
Method Details
-
getName
-
removeEmptyEvictionTask
Description copied from interface:MapCacheOptions
Removes eviction task from memory if map is empty upon entries eviction process completion.- Specified by:
removeEmptyEvictionTask
in interfaceMapCacheOptions<K,
V> - Returns:
- MapCacheOptions instance
-
isRemoveEmptyEvictionTask
public boolean isRemoveEmptyEvictionTask() -
writer
Description copied from interface:ExMapOptions
DefinesMapWriter
object which is invoked during write operation.- Specified by:
writer
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writer
- object- Returns:
- MapOptions instance
-
getWriter
-
writerAsync
Description copied from interface:ExMapOptions
DefinesMapWriterAsync
object which is invoked during write operation.- Specified by:
writerAsync
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writer
- object- Returns:
- MapOptions instance
-
getWriterAsync
-
writeBehindBatchSize
Description copied from interface:ExMapOptions
Sets write behind tasks batch size. All updates accumulated into a batch of specified size and written withMapWriter
.Default is
50
- Specified by:
writeBehindBatchSize
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writeBehindBatchSize
- size of batch- Returns:
- MapOptions instance
-
getWriteBehindBatchSize
public int getWriteBehindBatchSize() -
writeBehindDelay
Description copied from interface:ExMapOptions
Sets write behind tasks execution delay. All updates written withMapWriter
and lag not more than specified delay.Default is
1000
milliseconds- Specified by:
writeBehindDelay
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writeBehindDelay
- delay in milliseconds- Returns:
- MapOptions instance
-
getWriteBehindDelay
public int getWriteBehindDelay() -
writeMode
Description copied from interface:ExMapOptions
Sets write mode.Default is
WriteMode.WRITE_THROUGH
- Specified by:
writeMode
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writeMode
- write mode- Returns:
- MapOptions instance
-
getWriteMode
-
getWriteRetryAttempts
public int getWriteRetryAttempts() -
writeRetryAttempts
Sets max retry attempts forRetryableMapWriter
orRetryableMapWriterAsync
- Specified by:
writeRetryAttempts
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writerRetryAttempts
- object- Returns:
- MapOptions instance
-
getWriteRetryInterval
public long getWriteRetryInterval() -
writeRetryInterval
Description copied from interface:ExMapOptions
Sets write retry interval- Specified by:
writeRetryInterval
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
writerRetryInterval
-Duration
- Returns:
- MapOptions instance
-
loader
SetsMapLoader
object.- Specified by:
loader
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
loader
- object- Returns:
- MapOptions instance
-
getLoader
-
loaderAsync
Description copied from interface:ExMapOptions
SetsMapLoaderAsync
object.- Specified by:
loaderAsync
in interfaceExMapOptions<T extends ExMapOptions<T,
K, V>, K, V> - Parameters:
loaderAsync
- object- Returns:
- MapOptions instance
-
getLoaderAsync
-
codec
Description copied from interface:CodecOptions
Defines codec used for data stored in Redis- Specified by:
codec
in interfaceCodecOptions<T extends InvocationOptions<T>,
C> - Parameters:
codec
- applied to object instance- Returns:
- options object
-
timeout
Description copied from interface:InvocationOptions
Defines Redis server response timeout. Starts to countdown when a Redis command was successfully sent.Default is the value specified for the same parameter in Redisson configuration
- Specified by:
timeout
in interfaceInvocationOptions<T extends InvocationOptions<T>>
- Parameters:
timeout
- Redis server response timeout- Returns:
- options instance
-
retryAttempts
Description copied from interface:InvocationOptions
Defines command retry attempts. Error is thrown if the Redis command can't be sent to Redis server afterretryAttempts
. But if it sent successfully thenresponseTimeout
is started.Default is the value specified for the same parameter in Redisson configuration
- Specified by:
retryAttempts
in interfaceInvocationOptions<T extends InvocationOptions<T>>
- Parameters:
retryAttempts
- command retry attempts- Returns:
- options instance
-
retryInterval
Description copied from interface:InvocationOptions
Defines time interval for another one attempt to send a Redis command if it hasn't already been sent.- Specified by:
retryInterval
in interfaceInvocationOptions<T extends InvocationOptions<T>>
- Parameters:
interval
- retry time interval- Returns:
- options instance
-
getTimeout
public int getTimeout()- Specified by:
getTimeout
in interfaceObjectParams
-
getRetryAttempts
public int getRetryAttempts()- Specified by:
getRetryAttempts
in interfaceObjectParams
-
getRetryInterval
public int getRetryInterval()- Specified by:
getRetryInterval
in interfaceObjectParams
-
getCodec
-