Class TimestampedItem<T>

java.lang.Object
com.hazelcast.jet.datamodel.TimestampedItem<T>
Type Parameters:
T -

public class TimestampedItem<T> extends Object
Mutable wrapper around an item that adds a timestamp. Useful for LRU caching.
  • Constructor Details

    • TimestampedItem

      public TimestampedItem(long timestamp, T item)
      Creates a new timestamped item.
  • Method Details

    • timestamp

      public long timestamp()
      Returns the timestamp.
    • item

      public T item()
      Returns the item.
    • setTimestamp

      public TimestampedItem<T> setTimestamp(long timestamp)
      Sets the timestamp.
      Returns:
      this
    • setItem

      public TimestampedItem<T> setItem(T item)
      Sets the item.
      Returns:
      this
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object