类 SlidingWindow<T>
java.lang.Object
com.aizuda.easy.retry.client.common.window.SlidingWindow<T>
滑动窗口组件
- 从以下版本开始:
- 2.1.0
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器构造器说明SlidingWindow(int totalThreshold, int windowTotalThreshold, List<Listener<T>> listeners, ScheduledExecutorService threadPoolExecutor, long duration, ChronoUnit chronoUnit) -
方法概要
-
字段详细资料
-
saveData
滑动窗口存储数据
-
-
构造器详细资料
-
SlidingWindow
public SlidingWindow(int totalThreshold, int windowTotalThreshold, List<Listener<T>> listeners, ScheduledExecutorService threadPoolExecutor, long duration, ChronoUnit chronoUnit)
-
-
方法详细资料
-
add
添加数据- 参数:
data- 需要保存到窗口期内的数据
-
start
public void start()滑动窗口启动 -
end
public void end()滑动窗口关闭
-