Class TimeLimitedBase

java.lang.Object
io.quarkus.vault.runtime.TimeLimitedBase
Direct Known Subclasses:
LeaseBase

public abstract class TimeLimitedBase extends Object
  • Field Details

    • renewable

      public boolean renewable
    • leaseDurationSecs

      public long leaseDurationSecs
  • Constructor Details

    • TimeLimitedBase

      public TimeLimitedBase(boolean renewable, long leaseDurationSecs)
    • TimeLimitedBase

      public TimeLimitedBase(TimeLimitedBase other)
  • Method Details

    • isExpired

      public boolean isExpired()
    • shouldExtend

      public boolean shouldExtend(Duration gracePeriod)
    • getExpireInstant

      public Instant getExpireInstant()
    • getExpiredDate

      public Date getExpiredDate()
    • expiresSoon

      public boolean expiresSoon(Duration gracePeriod)
      true if the lease is smaller than the grace period. as long as we are far away fro the ttl, lease durations will be a constant value (e.g. 3600 secs). if we are less than 'lease duration' away from ttl, lease durations will start to reduce to not go over the ttl.
      Parameters:
      gracePeriod -
      Returns:
    • info

      public String info()
    • leaseDurationSanityCheck

      public void leaseDurationSanityCheck(String nickname, Duration gracePeriod)