类 WindowWrap<T>
java.lang.Object
com.alibaba.csp.sentinel.slots.statistic.base.WindowWrap<T>
- 类型参数:
T- data type
Wrapper entity class for a period of time window.
- 作者:
- jialiang.linjl, Eric Zhao
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanisTimeInWindow(long timeMillis) Check whether given timestamp is in current bucket.resetTo(long startTime) Reset start timestamp of current bucket to provided time.voidtoString()value()longlong
-
构造器详细资料
-
WindowWrap
- 参数:
windowLengthInMs- a single window bucket's time length in milliseconds.windowStart- the start timestamp of the windowvalue- statistic data
-
-
方法详细资料
-
windowLength
public long windowLength() -
windowStart
public long windowStart() -
value
-
setValue
-
resetTo
Reset start timestamp of current bucket to provided time.- 参数:
startTime- valid start timestamp- 返回:
- bucket after reset
-
isTimeInWindow
public boolean isTimeInWindow(long timeMillis) Check whether given timestamp is in current bucket.- 参数:
timeMillis- valid timestamp in ms- 返回:
- true if the given time is in current bucket, otherwise false
- 从以下版本开始:
- 1.5.0
-
toString
-