Package org.redisson.api
Class BatchOptions
java.lang.Object
org.redisson.api.BatchOptions
Configuration for Batch object.
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BatchOptions
defaults()
executionMode
(BatchOptions.ExecutionMode executionMode) Sets execution mode.long
int
long
int
int
long
boolean
boolean
responseTimeout
(long timeout, TimeUnit unit) Defines timeout for Redis response.retryAttempts
(int retryAttempts) Defines attempts amount to send Redis commands batch if it hasn't been sent already.retryInterval
(long retryInterval, TimeUnit retryIntervalUnit) Defines time interval for each attempt to send Redis commands batch if it hasn't been sent already.Inform Redis not to send reply.Synchronize write operations execution within defined timeout across specified amount of Redis slave nodes.Synchronize write operations to the AOF within defined timeout across specified amount of Redis slave nodes and local Redis.syncSlaves
(int slaves, long timeout, TimeUnit unit) Deprecated.toString()
-
Method Details
-
defaults
-
getResponseTimeout
public long getResponseTimeout() -
responseTimeout
Defines timeout for Redis response. Starts to countdown when Redis command has been successfully sent.Default is
3000 milliseconds
- Parameters:
timeout
- valueunit
- value- Returns:
- self instance
-
getRetryAttempts
public int getRetryAttempts() -
retryAttempts
Defines attempts amount to send Redis commands batch if it hasn't been sent already.Default is
3 attempts
- Parameters:
retryAttempts
- value- Returns:
- self instance
-
getRetryInterval
public long getRetryInterval() -
retryInterval
Defines time interval for each attempt to send Redis commands batch if it hasn't been sent already.Default is
1500 milliseconds
- Parameters:
retryInterval
- time intervalretryIntervalUnit
- time interval unit- Returns:
- self instance
-
syncSlaves
Deprecated.Usesync(int, Duration)
instead -
sync
Synchronize write operations execution within defined timeout across specified amount of Redis slave nodes.NOTE: Redis 3.0+ required
- Parameters:
slaves
- slaves amount for synchronizationtimeout
- synchronization timeout- Returns:
- self instance
-
getSyncTimeout
public long getSyncTimeout() -
getSyncSlaves
public int getSyncSlaves() -
skipResult
Inform Redis not to send reply. This allows to save network traffic for commands with batch with big response.NOTE: Redis 3.2+ required
- Returns:
- self instance
-
syncAOF
Synchronize write operations to the AOF within defined timeout across specified amount of Redis slave nodes and local Redis.NOTE: Redis 7.2+ required
- Parameters:
localNum
- local Redis amount for synchronizationslaves
- slaves amount for synchronizationtimeout
- synchronization timeout- Returns:
- self instance
-
isSkipResult
public boolean isSkipResult() -
getSyncLocals
public int getSyncLocals() -
isSyncAOF
public boolean isSyncAOF() -
executionMode
Sets execution mode.- Parameters:
executionMode
- batch execution mode- Returns:
- self instance
- See Also:
-
getExecutionMode
-
toString
-