use of io.etcd.jetcd.api.lock.LockRequest in project jetcd by coreos.
the class LockImpl method lock.
@Override
public CompletableFuture<LockResponse> lock(ByteSequence name, long leaseId) {
checkNotNull(name);
LockRequest request = LockRequest.newBuilder().setName(Util.prefixNamespace(name, namespace)).setLease(leaseId).build();
return execute(() -> stub.lock(request), response -> new LockResponse(response, namespace), Errors::isRetryable);
}
Aggregations