Class InactiveExpiringValue<V>


  • public class InactiveExpiringValue<V>
    extends SimpleExpiringValue<V>
    ExpiringValue implementation which will expire the current value if it has not been "used" for a given amount of time (based on the last call to get())
    • Constructor Detail

      • InactiveExpiringValue

        public InactiveExpiringValue​(long valueTimeout)
      • InactiveExpiringValue

        public InactiveExpiringValue​(V value,
                                     long valueTimeout)
    • Method Detail

      • get

        public V get()
        Gets the current, valid value, null otherwise. If the current value is not valid, it will be cleared by this call before returning.

        Updates the expiration time via SimpleExpiringValue.updateExpireTime() if the current value is non-null.

        Overrides:
        get in class ExpiringValue<V>