Class TimeEvictionPolicy<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      TimeEvictionPolicy​(long windowLength)
      Constructs a TimeEvictionPolicy that evicts events older than the given window length in millis.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EvictionPolicy.Action evict​(Event<T> event)
      Decides if an event should be expired from the window, processed in the current window or kept for later processing.
      EvictionContext getContext()
      Returns the current context that is part of this eviction policy.
      EvictionContext getState()
      Return runtime state to be checkpointed by the framework for restoring the eviction policy in case of failures.
      void reset()
      Resets the eviction policy.
      void restoreState​(EvictionContext state)
      Restore the eviction policy from the state that was earlier checkpointed by the framework.
      void setContext​(EvictionContext context)
      Sets a context in the eviction policy that can be used while evicting the events.
      java.lang.String toString()  
      void track​(Event<T> event)
      Tracks the event to later decide whether EvictionPolicy.evict(Event) should evict it or not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait