Class TtlUtils


  • public class TtlUtils
    extends Object
    Common functions related to State TTL.
    • Constructor Detail

      • TtlUtils

        public TtlUtils()
    • Method Detail

      • expired

        public static <V> boolean expired​(@Nullable
                                          TtlValue<V> ttlValue,
                                          long ttl,
                                          TtlTimeProvider timeProvider)
      • expired

        public static <V> boolean expired​(@Nullable
                                          TtlValue<V> ttlValue,
                                          long ttl,
                                          long currentTimestamp)
      • expired

        public static boolean expired​(long ts,
                                      long ttl,
                                      TtlTimeProvider timeProvider)
      • expired

        public static boolean expired​(long ts,
                                      long ttl,
                                      long currentTimestamp)
      • wrapWithTs

        public static <V> TtlValue<V> wrapWithTs​(V value,
                                                 long ts)