wait method

Future<int> wait(
  1. int numReplicas,
  2. int timeout
)

WAIT numreplicas timeout

Blocks the current client until all the previous write commands are successfully transferred and acknowledged by at least the specified number of replicas. Returns the number of replicas reached.

Implementation

Future<int> wait(int numReplicas, int timeout) async {
  final cmd = <String>['WAIT', numReplicas.toString(), timeout.toString()];
  return executeInt(cmd);
}