Class LifecycleAwareSessionManagerSupport.FixedTimeoutRefreshTrigger

java.lang.Object
org.springframework.vault.authentication.LifecycleAwareSessionManagerSupport.FixedTimeoutRefreshTrigger
All Implemented Interfaces:
LifecycleAwareSessionManagerSupport.RefreshTrigger
Enclosing class:
LifecycleAwareSessionManagerSupport

public static class LifecycleAwareSessionManagerSupport.FixedTimeoutRefreshTrigger extends Object implements LifecycleAwareSessionManagerSupport.RefreshTrigger
LifecycleAwareSessionManagerSupport.RefreshTrigger implementation using a fixed timeout to schedule renewal before a LoginToken expires.
Since:
1.0.1
Author:
Mark Paluch
  • Constructor Details

    • FixedTimeoutRefreshTrigger

      public FixedTimeoutRefreshTrigger(long refreshBeforeExpiry, TimeUnit timeUnit)
      Create a new LifecycleAwareSessionManagerSupport.FixedTimeoutRefreshTrigger to calculate execution times of timeout before the LoginToken expires
      Parameters:
      refreshBeforeExpiry - timeout value, non-negative long value that schedules an execution of lease duration - refreshBeforeExpiry.
      timeUnit - must not be null.
    • FixedTimeoutRefreshTrigger

      public FixedTimeoutRefreshTrigger(Duration refreshBeforeExpiry)
      Create a new LifecycleAwareSessionManagerSupport.FixedTimeoutRefreshTrigger to calculate execution times of refreshBeforeExpiry before the LoginToken expires. Valid TTL threshold is set to two seconds longer to compensate for timing issues during scheduling.
      Parameters:
      refreshBeforeExpiry - timeout value for the trigger that schedules an execution of lease duration - refreshBeforeExpiry.
      Since:
      2.0
    • FixedTimeoutRefreshTrigger

      public FixedTimeoutRefreshTrigger(Duration refreshBeforeExpiry, Duration expiryThreshold)
      Create a new LifecycleAwareSessionManagerSupport.FixedTimeoutRefreshTrigger to calculate execution times of timeout before the LoginToken expires.
      Parameters:
      refreshBeforeExpiry - timeout value for the trigger that schedules an execution of lease duration - refreshBeforeExpiry.
      expiryThreshold - minimum TTL duration to consider a Token as valid. Tokens with a shorter TTL are considered expired and are not used anymore. Should be greater than Tokens with a shorter TTL are not used anymore. Should be greater than timeout to prevent token expiry.
      Since:
      2.0
  • Method Details