Class WaitCommandKt
-
- All Implemented Interfaces:
public final class WaitCommandKt
-
-
Method Summary
Modifier and Type Method Description final static RedisRequestwaitCommand(Long numReplicas, Long timeoutMillis, Function1<Long, Unit> onResult)Blocks until all previous write commands of this connection were acknowledged by at least numReplicas replicas, or until timeoutMillis is reached. -
-
Method Detail
-
waitCommand
final static RedisRequest waitCommand(Long numReplicas, Long timeoutMillis, Function1<Long, Unit> onResult)
Blocks until all previous write commands of this connection were acknowledged by at least numReplicas replicas, or until timeoutMillis is reached.
- Parameters:
timeoutMillis-must be lower than the read timeout of the connection, otherwise the connection fails with a SocketTimeoutException before Redis replies. 0 (blocks forever in Redis) is therefore not supported unless the read timeout is infinite (0) as well
onResult-called with the number of replicas that acknowledged the writes
-
-
-
-