Search in sources :

Example 1 with LeaseTimeToLiveRequest

use of io.etcd.jetcd.api.LeaseTimeToLiveRequest in project jetcd by coreos.

the class LeaseImpl method timeToLive.

@Override
public CompletableFuture<LeaseTimeToLiveResponse> timeToLive(long leaseId, LeaseOption option) {
    checkNotNull(option, "LeaseOption should not be null");
    LeaseTimeToLiveRequest leaseTimeToLiveRequest = LeaseTimeToLiveRequest.newBuilder().setID(leaseId).setKeys(option.isAttachedKeys()).build();
    return execute(() -> this.stub.leaseTimeToLive(leaseTimeToLiveRequest), LeaseTimeToLiveResponse::new);
}
Also used : LeaseTimeToLiveResponse(io.etcd.jetcd.lease.LeaseTimeToLiveResponse) LeaseTimeToLiveRequest(io.etcd.jetcd.api.LeaseTimeToLiveRequest)

Aggregations

LeaseTimeToLiveRequest (io.etcd.jetcd.api.LeaseTimeToLiveRequest)1 LeaseTimeToLiveResponse (io.etcd.jetcd.lease.LeaseTimeToLiveResponse)1