public final class EtcdLeaseClient extends Object implements LeaseClient, Closeable
LeaseClient.FluentGrantRequest, LeaseClient.FluentMaintainRequest| Modifier and Type | Field and Description |
|---|---|
protected Set<com.ibm.etcd.client.lease.EtcdLeaseClient.LeaseRecord> |
allLeases |
protected static int |
DEFAULT_INTERVAL_SECS |
protected static int |
DEFAULT_MIN_EXPIRY_SECS |
protected LeaseKeepAliveRequest.Builder |
KAR_BUILDER |
protected Executor |
kaReqExecutor |
protected io.grpc.stub.StreamObserver<LeaseKeepAliveRequest> |
kaReqStream |
protected int |
leaseCount |
protected ConcurrentMap<Long,com.ibm.etcd.client.lease.EtcdLeaseClient.LeaseRecord> |
leaseMap |
protected static int |
MIN_INTERVAL_SECS |
protected static int |
MIN_MIN_EXPIRY_SECS |
protected ConcurrentMap<Long,List<com.ibm.etcd.client.lease.EtcdLeaseClient.KeepAliveFuture>> |
oneTimeMap |
protected Executor |
respExecutor |
protected GrpcClient.ResilientResponseObserver<LeaseKeepAliveRequest,LeaseKeepAliveResponse> |
responseObserver |
| Constructor and Description |
|---|
EtcdLeaseClient(GrpcClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.google.common.util.concurrent.ListenableFuture<LeaseGrantResponse> |
create(long leaseId,
long ttlSecs)
Deprecated.
|
LeaseClient.FluentGrantRequest |
grant(long ttlSecs) |
com.google.common.util.concurrent.ListenableFuture<LeaseKeepAliveResponse> |
keepAliveOnce(long leaseId) |
protected void |
leaseClosed(com.ibm.etcd.client.lease.EtcdLeaseClient.LeaseRecord rec) |
com.google.common.util.concurrent.ListenableFuture<LeaseLeasesResponse> |
list() |
LeaseClient.FluentMaintainRequest |
maintain() |
protected PersistentLease |
newPersisentLease(long leaseId,
int minExpirySecs,
int keepAliveFreqSecs,
io.grpc.stub.StreamObserver<PersistentLease.LeaseState> observer,
Executor executor,
boolean protect) |
com.google.common.util.concurrent.ListenableFuture<LeaseRevokeResponse> |
revoke(long leaseId) |
com.google.common.util.concurrent.ListenableFuture<LeaseRevokeResponse> |
revoke(long leaseId,
boolean ensureWithRetries) |
protected void |
sendKeepAlive(long leaseId) |
com.google.common.util.concurrent.ListenableFuture<LeaseTimeToLiveResponse> |
ttl(long leaseId,
boolean includeKeys) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, ttlprotected static final int MIN_MIN_EXPIRY_SECS
protected static final int MIN_INTERVAL_SECS
protected static final int DEFAULT_MIN_EXPIRY_SECS
protected static final int DEFAULT_INTERVAL_SECS
protected final LeaseKeepAliveRequest.Builder KAR_BUILDER
protected io.grpc.stub.StreamObserver<LeaseKeepAliveRequest> kaReqStream
protected int leaseCount
protected final Executor kaReqExecutor
protected final Executor respExecutor
protected final Set<com.ibm.etcd.client.lease.EtcdLeaseClient.LeaseRecord> allLeases
protected final ConcurrentMap<Long,com.ibm.etcd.client.lease.EtcdLeaseClient.LeaseRecord> leaseMap
protected final ConcurrentMap<Long,List<com.ibm.etcd.client.lease.EtcdLeaseClient.KeepAliveFuture>> oneTimeMap
protected final GrpcClient.ResilientResponseObserver<LeaseKeepAliveRequest,LeaseKeepAliveResponse> responseObserver
public EtcdLeaseClient(GrpcClient client)
@Deprecated public com.google.common.util.concurrent.ListenableFuture<LeaseGrantResponse> create(long leaseId, long ttlSecs)
public LeaseClient.FluentGrantRequest grant(long ttlSecs)
public com.google.common.util.concurrent.ListenableFuture<LeaseRevokeResponse> revoke(long leaseId)
public com.google.common.util.concurrent.ListenableFuture<LeaseRevokeResponse> revoke(long leaseId, boolean ensureWithRetries)
public com.google.common.util.concurrent.ListenableFuture<LeaseTimeToLiveResponse> ttl(long leaseId, boolean includeKeys)
public com.google.common.util.concurrent.ListenableFuture<LeaseKeepAliveResponse> keepAliveOnce(long leaseId)
public com.google.common.util.concurrent.ListenableFuture<LeaseLeasesResponse> list()
public LeaseClient.FluentMaintainRequest maintain()
protected PersistentLease newPersisentLease(long leaseId, int minExpirySecs, int keepAliveFreqSecs, io.grpc.stub.StreamObserver<PersistentLease.LeaseState> observer, Executor executor, boolean protect)
protected void leaseClosed(com.ibm.etcd.client.lease.EtcdLeaseClient.LeaseRecord rec)
protected void sendKeepAlive(long leaseId)
public void close()
Copyright © 2020. All rights reserved.