public class ClusterNode extends StatisticNode
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.
| Constructor and Description |
|---|
ClusterNode(String name) |
ClusterNode(String name,
int resourceType) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Get resource name of the resource node.
|
Node |
getOrCreateOriginNode(String origin)
Get
Node of the specific origin. |
Map<String,StatisticNode> |
getOriginCountMap() |
int |
getResourceType()
Get classification (type) of the resource.
|
void |
trace(Throwable throwable,
int count)
Add exception count only when given
throwable is not a BlockException. |
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, waitingpublic ClusterNode(String name)
public ClusterNode(String name, int resourceType)
public String getName()
public int getResourceType()
public Node getOrCreateOriginNode(String origin)
Get Node of 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 StatisticNode
for the origin will be created and returned.
origin - The caller's name, which is designated in the parameter parameter
ContextUtil.enter(String name, String origin).Node of the specific originpublic Map<String,StatisticNode> getOriginCountMap()
public void trace(Throwable throwable, int count)
throwable is not a BlockException.throwable - target exceptioncount - count to addCopyright © 2019 Alibaba Group. All rights reserved.