Class TimerCache

java.lang.Object
de.fraunhofer.iese.mydata.pmp.cache.TimerCache
All Implemented Interfaces:
ITimerCache

public class TimerCache extends Object implements ITimerCache
Keeps a copy of a timer list
Author:
kelbert
  • Constructor Details

  • Method Details

    • getTimers

      public Optional<Set<Timer>> getTimers()
      Specified by:
      getTimers in interface ITimerCache
      Returns:
      the cached timers if cache is valid or else empty Optional
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface ITimerCache
      Returns:
      whether the cache is valid
    • invalidate

      public void invalidate()
      Description copied from interface: ITimerCache
      invalidates the cache
      Specified by:
      invalidate in interface ITimerCache
    • validate

      public void validate()
      Description copied from interface: ITimerCache
      refreshes validation time of the cache without changing its contents
      Specified by:
      validate in interface ITimerCache
    • updateCache

      public boolean updateCache(Set<Timer> policies)
      Description copied from interface: ITimerCache
      updates cache content and refreshes validation time
      Specified by:
      updateCache in interface ITimerCache
      Returns:
      whether updating the cache succeeded