public final class SlidingDurationWindowStrategy<T> extends BaseWindowStrategy<T>
This class represents sliding window strategy based on the sliding window duration and sliding interval from the given slidingCountWindow
configuration.
windowConfig
Constructor and Description |
---|
SlidingDurationWindowStrategy(WindowConfig slidingDurationWindow) |
Modifier and Type | Method and Description |
---|---|
EvictionPolicy<T,?> |
getEvictionPolicy()
Returns an
EvictionPolicy instance which evicts elements after window duration is reached. |
TriggerPolicy<T,?> |
getTriggerPolicy(TriggerHandler triggerHandler,
EvictionPolicy<T,?> evictionPolicy)
Returns a
TriggerPolicy which triggers for every configured sliding window duration. |
public SlidingDurationWindowStrategy(WindowConfig slidingDurationWindow)
public TriggerPolicy<T,?> getTriggerPolicy(TriggerHandler triggerHandler, EvictionPolicy<T,?> evictionPolicy)
Returns a TriggerPolicy
which triggers for every configured sliding window duration.
public EvictionPolicy<T,?> getEvictionPolicy()
Returns an EvictionPolicy
instance which evicts elements after window duration is reached.
Copyright © 2022 The Apache Software Foundation. All rights reserved.