Class DeephavenLeaseImpl

java.lang.Object
io.deephaven.kv.etcd.lease.DeephavenLeaseImpl
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, DeephavenLease

public abstract class DeephavenLeaseImpl extends Object implements DeephavenLease
Basic implementation of DeephavenLease interface
  • Constructor Details

    • DeephavenLeaseImpl

      protected DeephavenLeaseImpl(long leaseId, @NotNull @NotNull String dataIdentifier)
    • DeephavenLeaseImpl

      protected DeephavenLeaseImpl(long leaseId, @NotNull @NotNull String dataIdentifier, int leaseTtlSeconds, int leaseRenewSeconds, int leaseRenewRetryDelaySeconds)
  • Method Details

    • getLeaseId

      public long getLeaseId()
      Description copied from interface: DeephavenLease
      Returns a long value identifying the granted lease.
      Specified by:
      getLeaseId in interface DeephavenLease
    • getDataIdentifier

      @NotNull public @NotNull String getDataIdentifier()
      Description copied from interface: DeephavenLease
      Returns the identifier used to store data.
      Specified by:
      getDataIdentifier in interface DeephavenLease
    • getLeaseTtlSeconds

      public int getLeaseTtlSeconds()
      Description copied from interface: DeephavenLease
      Returns the Time to live of the lease in seconds. This is the time the lease will be active from the start or from the time it was last renewed. If not renewed within this timeframe backing store will automatically revoke the lease.
      Specified by:
      getLeaseTtlSeconds in interface DeephavenLease
    • getLeaseRenewSeconds

      public int getLeaseRenewSeconds()
      Description copied from interface: DeephavenLease
      Returns how often, in seconds, should the lease be renewed This must be less than DeephavenLease.getLeaseTtlSeconds(); for safety it should be no more than 50% of the TTL value.
      Specified by:
      getLeaseRenewSeconds in interface DeephavenLease
    • getLeaseRenewRetryDelaySeconds

      public int getLeaseRenewRetryDelaySeconds()
      Description copied from interface: DeephavenLease
      Returns the maximum frequency in seconds should be used to renew a lease. If a lease renewal times out, then try again more quickly than the standard DeephavenLease.getLeaseRenewSeconds();.
      Specified by:
      getLeaseRenewRetryDelaySeconds in interface DeephavenLease
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • append

      public com.fishlib.base.log.LogOutput append(@NotNull @NotNull com.fishlib.base.log.LogOutput logOutput)
      Specified by:
      append in interface com.fishlib.base.log.LogOutputAppendable