Class CachedElement<T>


  • public class CachedElement<T>
    extends java.lang.Object
    Cached element is a container of an arbitrary object, enriched with a creation timestamp.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long creationTs  
      private T element  
    • Constructor Summary

      Constructors 
      Constructor Description
      CachedElement​(T element)  
    • Field Detail

      • creationTs

        private long creationTs
      • element

        private T element
    • Constructor Detail

      • CachedElement

        public CachedElement​(T element)
    • Method Detail

      • getCreationTs

        public long getCreationTs()
      • getElement

        public T getElement()
      • isExpired

        public boolean isExpired​(long ttl)