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