Class GExpiringCacheList<T>

Type Parameters:
T - Type of item.
All Implemented Interfaces:
Iterable<T>, Collection<T>, List<T>, SequencedCollection<T>

public class GExpiringCacheList<T> extends AbstractSequentialList<T>
List with expiring items.
  • Constructor Details

    • GExpiringCacheList

      public GExpiringCacheList(TemporalAmount timeToLive)
      Creates a cache with the given time-to-live.
      Parameters:
      timeToLive - Time to live for a given item.
    • GExpiringCacheList

      public GExpiringCacheList(long amount, TemporalUnit unit)
      Creates a cache with the given time-to-live.
      Parameters:
      amount - The amount of TTL duration.
      unit - The unit TLL is measured in.
  • Method Details