public final class BatchOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BatchOptions.ExecutionMode |
Modifier and Type | Method and Description |
---|---|
static BatchOptions |
defaults() |
BatchOptions |
executionMode(BatchOptions.ExecutionMode executionMode)
Sets execution mode.
|
BatchOptions.ExecutionMode |
getExecutionMode() |
long |
getResponseTimeout() |
int |
getRetryAttempts() |
long |
getRetryInterval() |
int |
getSyncSlaves() |
long |
getSyncTimeout() |
boolean |
isSkipResult() |
BatchOptions |
responseTimeout(long timeout,
TimeUnit unit)
Defines timeout for Redis response.
|
BatchOptions |
retryAttempts(int retryAttempts)
Defines attempts amount to send Redis commands batch
if it hasn't been sent already.
|
BatchOptions |
retryInterval(long retryInterval,
TimeUnit retryIntervalUnit)
Defines time interval for each attempt to send Redis commands batch
if it hasn't been sent already.
|
BatchOptions |
skipResult()
Inform Redis not to send reply.
|
BatchOptions |
syncSlaves(int slaves,
long timeout,
TimeUnit unit)
Synchronize write operations execution within defined timeout
across specified amount of Redis slave nodes.
|
String |
toString() |
public static BatchOptions defaults()
public long getResponseTimeout()
public BatchOptions responseTimeout(long timeout, TimeUnit unit)
Default is 3000 milliseconds
timeout
- valueunit
- valuepublic int getRetryAttempts()
public BatchOptions retryAttempts(int retryAttempts)
Default is 3 attempts
retryAttempts
- valuepublic long getRetryInterval()
public BatchOptions retryInterval(long retryInterval, TimeUnit retryIntervalUnit)
Default is 1500 milliseconds
retryInterval
- - time intervalretryIntervalUnit
- - time interval unitpublic BatchOptions syncSlaves(int slaves, long timeout, TimeUnit unit)
NOTE: Redis 3.0+ required
slaves
- - synchronization timeouttimeout
- - synchronization timeoutunit
- - synchronization timeout time unitpublic long getSyncTimeout()
public int getSyncSlaves()
public BatchOptions skipResult()
NOTE: Redis 3.2+ required
public boolean isSkipResult()
public BatchOptions executionMode(BatchOptions.ExecutionMode executionMode)
executionMode
- - batch execution modeBatchOptions.ExecutionMode
public BatchOptions.ExecutionMode getExecutionMode()
Copyright © 2014–2020 Redisson. All rights reserved.