类 ClusterNode
java.lang.Object
com.alibaba.csp.sentinel.node.StatisticNode
com.alibaba.csp.sentinel.node.ClusterNode
- 所有已实现的接口:
Node,OccupySupport,DebugSupport
This class stores summary runtime statistics of the resource, including rt, thread count, qps
and so on. Same resource shares the same ClusterNode globally, no matter in which
Context.
To distinguish invocation from different origin (declared in
ContextUtil.enter(String name, String origin)),
one ClusterNode holds an originCountMap, this map holds StatisticNode
of different origin. Use getOrCreateOriginNode(String) to get Node of the specific
origin.
Note that 'origin' usually is Service Consumer's app name.
- 作者:
- qinan.qn, jialiang.linjl
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明getName()Get resource name of the resource node.getOrCreateOriginNode(String origin) GetNodeof the specific origin.intGet classification (type) of the resource.从类继承的方法 com.alibaba.csp.sentinel.node.StatisticNode
addOccupiedPass, addPassRequest, addRtAndSuccess, addWaitingRequest, avgRt, blockQps, blockRequest, curThreadNum, debug, decreaseThreadNum, exceptionQps, increaseBlockQps, increaseExceptionQps, increaseThreadNum, maxSuccessQps, metrics, minRt, occupiedPassQps, passQps, previousBlockQps, previousPassQps, rawMetricsInMin, reset, successQps, totalException, totalPass, totalQps, totalRequest, totalSuccess, tryOccupyNext, waiting
-
构造器详细资料
-
ClusterNode
-
ClusterNode
-
-
方法详细资料
-
getName
Get resource name of the resource node.- 返回:
- resource name
- 从以下版本开始:
- 1.7.0
-
getResourceType
public int getResourceType()Get classification (type) of the resource.- 返回:
- resource type
- 从以下版本开始:
- 1.7.0
-
getOrCreateOriginNode
Get
Nodeof the specific origin. Usually the origin is the Service Consumer's app name.If the origin node for given origin is absent, then a new
StatisticNodefor the origin will be created and returned.- 参数:
origin- The caller's name, which is designated in theparameterparameterContextUtil.enter(String name, String origin).- 返回:
- the
Nodeof the specific origin
-
getOriginCountMap
-