org.apache.storm.windowing

## Class DefaultEvictionContext

- java.lang.Object
- - org.apache.storm.windowing.DefaultEvictionContext

- All Implemented Interfaces:
    EvictionContext

      public class DefaultEvictionContext
      extends Object
      implements EvictionContext

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEvictionContext(Long referenceTime)`
    `DefaultEvictionContext(Long referenceTime, Long currentCount)`
    `DefaultEvictionContext(Long referenceTime, Long currentCount, Long slidingCount)`
    `DefaultEvictionContext(Long referenceTime, Long currentCount, Long slidingCount, Long slidingInterval)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Long` | `getCurrentCount()` Returns the current count of events in the queue up to the reference time based on which count based evictions can be performed.
    `Long` | `getReferenceTime()` Returns the reference time that the eviction policy could use to evict the events.
    `Long` | `getSlidingCount()` Returns the sliding count for count based windows.
    `Long` | `getSlidingInterval()` Returns the sliding interval for time based windows.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### DefaultEvictionContext

          public DefaultEvictionContext(Long referenceTime)

    - #### DefaultEvictionContext

          public DefaultEvictionContext(Long referenceTime,
                                        Long currentCount)

    - #### DefaultEvictionContext

          public DefaultEvictionContext(Long referenceTime,
                                        Long currentCount,
                                        Long slidingCount)

    - #### DefaultEvictionContext

          public DefaultEvictionContext(Long referenceTime,
                                        Long currentCount,
                                        Long slidingCount,
                                        Long slidingInterval)

  - ### Method Detail

    - #### getReferenceTime

          public Long getReferenceTime()

      Description copied from interface: `EvictionContext`

      Returns the reference time that the eviction policy could use to evict the events. In the case of event time processing, this would be the watermark time.

      Specified by:
        `getReferenceTime` in interface `EvictionContext`
      Returns:
        the reference time in millis

    - #### getCurrentCount

          public Long getCurrentCount()

      Description copied from interface: `EvictionContext`

      Returns the current count of events in the queue up to the reference time based on which count based evictions can be performed.

      Specified by:
        `getCurrentCount` in interface `EvictionContext`
      Returns:
        the current count

    - #### getSlidingCount

          public Long getSlidingCount()

      Description copied from interface: `EvictionContext`

      Returns the sliding count for count based windows.

      Specified by:
        `getSlidingCount` in interface `EvictionContext`
      Returns:
        the sliding count

    - #### getSlidingInterval

          public Long getSlidingInterval()

      Description copied from interface: `EvictionContext`

      Returns the sliding interval for time based windows.

      Specified by:
        `getSlidingInterval` in interface `EvictionContext`
      Returns:
        the sliding interval

Copyright © 2019 The Apache Software Foundation. All rights reserved.