Package org.redisson.api.options
Class MapParams<K,V>
java.lang.Object
org.redisson.api.options.MapParams<K,V>
- Type Parameters:
K-V-
- All Implemented Interfaces:
CodecOptions<MapOptions<K,,V>, Codec> ExMapOptions<MapOptions<K,,V>, K, V> InvocationOptions<MapOptions<K,,V>> MapOptions<K,,V> ObjectParams
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionMapOptions<K, V> Defines codec used for data stored in RedisgetCodec()getName()intintintintintintlongMapOptions<K, V> SetsMapLoaderobject.MapOptions<K, V> loaderAsync(MapLoaderAsync<K, V> loaderAsync) SetsMapLoaderAsyncobject.MapOptions<K, V> retryAttempts(int retryAttempts) Defines command retry attempts.MapOptions<K, V> retryInterval(Duration interval) Defines time interval for another one attempt to send a Redis command if it hasn't already been sent.MapOptions<K, V> Defines Redis server response timeout.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> Sets write mode.MapOptions<K, V> DefinesMapWriterobject which is invoked during write operation.MapOptions<K, V> writerAsync(MapWriterAsync<K, V> writer) DefinesMapWriterAsyncobject which is invoked during write operation.MapOptions<K, V> writeRetryAttempts(int writerRetryAttempts) Sets max retry attempts forRetryableMapWriterorRetryableMapWriterAsyncMapOptions<K, V> writeRetryInterval(Duration writerRetryInterval) Sets write retry intervalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.redisson.api.options.CodecOptions
codecMethods inherited from interface org.redisson.api.options.ExMapOptions
loader, loaderAsync, writeBehindBatchSize, writeBehindDelay, writeMode, writer, writerAsync, writeRetryAttempts, writeRetryIntervalMethods inherited from interface org.redisson.api.options.InvocationOptions
retryAttempts, retryInterval, timeout
-
Method Details
-
getName
-
writer
Description copied from interface:ExMapOptionsDefinesMapWriterobject which is invoked during write operation.- Specified by:
writerin interfaceExMapOptions<T extends ExMapOptions<T,K, V>, K, V> - Parameters:
writer- object- Returns:
- MapOptions instance
-
getWriter
-
writerAsync
Description copied from interface:ExMapOptionsDefinesMapWriterAsyncobject which is invoked during write operation.- Specified by:
writerAsyncin interfaceExMapOptions<T extends ExMapOptions<T,K, V>, K, V> - Parameters:
writer- object- Returns:
- MapOptions instance
-
getWriterAsync
-
writeBehindBatchSize
Description copied from interface:ExMapOptionsSets write behind tasks batch size. All updates accumulated into a batch of specified size and written withMapWriter.Default is
50- Specified by:
writeBehindBatchSizein 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:ExMapOptionsSets write behind tasks execution delay. All updates written withMapWriterand lag not more than specified delay.Default is
1000milliseconds- Specified by:
writeBehindDelayin 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:ExMapOptionsSets write mode.Default is
WriteMode.WRITE_THROUGH- Specified by:
writeModein 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 forRetryableMapWriterorRetryableMapWriterAsync- Specified by:
writeRetryAttemptsin interfaceExMapOptions<T extends ExMapOptions<T,K, V>, K, V> - Parameters:
writerRetryAttempts- object- Returns:
- MapOptions instance
-
getWriteRetryInterval
public long getWriteRetryInterval() -
writeRetryInterval
Description copied from interface:ExMapOptionsSets write retry interval- Specified by:
writeRetryIntervalin interfaceExMapOptions<T extends ExMapOptions<T,K, V>, K, V> - Parameters:
writerRetryInterval-Duration- Returns:
- MapOptions instance
-
loader
SetsMapLoaderobject.- Specified by:
loaderin interfaceExMapOptions<T extends ExMapOptions<T,K, V>, K, V> - Parameters:
loader- object- Returns:
- MapOptions instance
-
getLoader
-
loaderAsync
Description copied from interface:ExMapOptionsSetsMapLoaderAsyncobject.- Specified by:
loaderAsyncin interfaceExMapOptions<T extends ExMapOptions<T,K, V>, K, V> - Parameters:
loaderAsync- object- Returns:
- MapOptions instance
-
getLoaderAsync
-
codec
Description copied from interface:CodecOptionsDefines codec used for data stored in Redis- Specified by:
codecin interfaceCodecOptions<T extends InvocationOptions<T>,C> - Parameters:
codec- applied to object instance- Returns:
- options object
-
timeout
Description copied from interface:InvocationOptionsDefines 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:
timeoutin interfaceInvocationOptions<T extends InvocationOptions<T>>- Parameters:
timeout- Redis server response timeout- Returns:
- options instance
-
retryAttempts
Description copied from interface:InvocationOptionsDefines command retry attempts. Error is thrown if the Redis command can't be sent to Redis server afterretryAttempts. But if it sent successfully thenresponseTimeoutis started.Default is the value specified for the same parameter in Redisson configuration
- Specified by:
retryAttemptsin interfaceInvocationOptions<T extends InvocationOptions<T>>- Parameters:
retryAttempts- command retry attempts- Returns:
- options instance
-
retryInterval
Description copied from interface:InvocationOptionsDefines time interval for another one attempt to send a Redis command if it hasn't already been sent.- Specified by:
retryIntervalin interfaceInvocationOptions<T extends InvocationOptions<T>>- Parameters:
interval- retry time interval- Returns:
- options instance
-
getTimeout
public int getTimeout()- Specified by:
getTimeoutin interfaceObjectParams
-
getRetryAttempts
public int getRetryAttempts()- Specified by:
getRetryAttemptsin interfaceObjectParams
-
getRetryInterval
public int getRetryInterval()- Specified by:
getRetryIntervalin interfaceObjectParams
-
getCodec
-