Class PresenceKvLeaseHandlerEtcd
java.lang.Object
io.deephaven.enterprise.etcdclient.lease.LeaseHandlerEtcd
io.deephaven.enterprise.etcdclient.presence.PresenceKvLeaseHandlerEtcd
- All Implemented Interfaces:
LeaseHandler,PresenceKvLeaseHandler
An etcd server backed implementation of PresenceLeaseHandler.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.enterprise.etcdclient.lease.LeaseHandlerEtcd
LeaseHandlerEtcd.WithLeaseLostCallbackNested classes/interfaces inherited from interface io.deephaven.enterprise.etcdclient.presence.PresenceKvLeaseHandler
PresenceKvLeaseHandler.Factory, PresenceKvLeaseHandler.LeaseRecreationListener -
Field Summary
FieldsFields inherited from class io.deephaven.enterprise.etcdclient.lease.LeaseHandlerEtcd
log, logNameFields inherited from interface io.deephaven.enterprise.etcdclient.lease.LeaseHandler
NULLFields inherited from interface io.deephaven.enterprise.etcdclient.presence.PresenceKvLeaseHandler
NULL, NULL_FACTORY -
Constructor Summary
ConstructorsConstructorDescriptionPresenceKvLeaseHandlerEtcd(String who, com.fishlib.io.logger.Logger log, io.deephaven.shadow.jetcd.io.etcd.jetcd.Client client, PresenceKvLeaseHandler.LeaseRecreationListener leaseRecreationListener, int clientTtlSeconds, int leaseTtlSeconds, int leaseRenewSeconds, int leaseRenewRetryDelaySeconds, long leaseKeepaliveTimeoutMillis) -
Method Summary
Modifier and TypeMethodDescriptionvoidA hook for derived classes to react to put failures.protected voidprotected voidHook invoked when we have definitively failed to renew the lease before its TTL elapsed: the lease is lost and this handler is giving up (the renewal timer is not rescheduled afterwards, so this fires at most once per handler).setLeaseRecreationListener(PresenceKvLeaseHandler.LeaseRecreationListener leaseRecreationListener) Methods inherited from class io.deephaven.enterprise.etcdclient.lease.LeaseHandlerEtcd
abort, abort, cancelTimedJob, close, closeWithoutRevokingLease, createLease, deleteKv, ensureNotClosedOrThrow, expectedLeaseExpirationTimeMillis, getLeaseId, isClosed, putKv, putKvConditional, renewLeaseNowMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.enterprise.etcdclient.lease.LeaseHandler
close, closeWithoutRevokingLease, deleteKv, isClosedMethods inherited from interface io.deephaven.enterprise.etcdclient.presence.PresenceKvLeaseHandler
putKv, putKvConditional
-
Field Details
-
FACTORY
-
-
Constructor Details
-
PresenceKvLeaseHandlerEtcd
public PresenceKvLeaseHandlerEtcd(String who, com.fishlib.io.logger.Logger log, io.deephaven.shadow.jetcd.io.etcd.jetcd.Client client, PresenceKvLeaseHandler.LeaseRecreationListener leaseRecreationListener, int clientTtlSeconds, int leaseTtlSeconds, int leaseRenewSeconds, int leaseRenewRetryDelaySeconds, long leaseKeepaliveTimeoutMillis) throws ExecutionException, InterruptedException, TimeoutException
-
-
Method Details
-
onRenewalException
- Overrides:
onRenewalExceptionin classLeaseHandlerEtcd
-
onRenewalFailure
protected void onRenewalFailure()Description copied from class:LeaseHandlerEtcdHook invoked when we have definitively failed to renew the lease before its TTL elapsed: the lease is lost and this handler is giving up (the renewal timer is not rescheduled afterwards, so this fires at most once per handler).- Specified by:
onRenewalFailurein classLeaseHandlerEtcd
-
onPutFailure
Description copied from class:LeaseHandlerEtcdA hook for derived classes to react to put failures. Do nothing (other than logging) by default.- Overrides:
onPutFailurein classLeaseHandlerEtcd- Parameters:
e- The exception that we got on the put attempt.
-
setLeaseRecreationListener
public PresenceKvLeaseHandler.LeaseRecreationListener setLeaseRecreationListener(PresenceKvLeaseHandler.LeaseRecreationListener leaseRecreationListener) - Specified by:
setLeaseRecreationListenerin interfacePresenceKvLeaseHandler
-