public class DefaultNode extends StatisticNode
A Node used to hold statistics for specific resource name in the specific context.
Each distinct resource in each distinct Context will corresponding to a DefaultNode.
This class may have a list of sub DefaultNodes. Child nodes will be created when
calling SphU#entry() or SphO@entry() multiple times in the same Context.
NodeSelectorSlot| Constructor and Description |
|---|
DefaultNode(ResourceWrapper id,
ClusterNode clusterNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Node node)
Add child node to current node.
|
void |
addPassRequest(int count)
Add pass count.
|
void |
addRtAndSuccess(long rt,
int successCount)
Add rt and success count.
|
void |
decreaseThreadNum()
Decrease current thread count.
|
Set<Node> |
getChildList() |
ClusterNode |
getClusterNode() |
ResourceWrapper |
getId() |
void |
increaseBlockQps(int count)
Increase the block count.
|
void |
increaseExceptionQps(int count)
Add the biz exception count.
|
void |
increaseThreadNum()
Increase current thread count.
|
void |
printDefaultNode() |
void |
removeChildList()
Reset the child node list.
|
void |
setClusterNode(ClusterNode clusterNode) |
addOccupiedPass, addWaitingRequest, avgRt, blockQps, blockRequest, curThreadNum, debug, exceptionQps, maxSuccessQps, metrics, minRt, occupiedPassQps, passQps, previousBlockQps, previousPassQps, rawMetricsInMin, reset, successQps, totalException, totalPass, totalQps, totalRequest, totalSuccess, tryOccupyNext, waitingpublic DefaultNode(ResourceWrapper id, ClusterNode clusterNode)
public ResourceWrapper getId()
public ClusterNode getClusterNode()
public void setClusterNode(ClusterNode clusterNode)
public void addChild(Node node)
node - valid child nodepublic void removeChildList()
public void increaseBlockQps(int count)
NodeincreaseBlockQps in interface NodeincreaseBlockQps in class StatisticNodecount - count to addpublic void increaseExceptionQps(int count)
NodeincreaseExceptionQps in interface NodeincreaseExceptionQps in class StatisticNodecount - count to addpublic void addRtAndSuccess(long rt,
int successCount)
NodeaddRtAndSuccess in interface NodeaddRtAndSuccess in class StatisticNodert - response timesuccessCount - success count to addpublic void increaseThreadNum()
NodeincreaseThreadNum in interface NodeincreaseThreadNum in class StatisticNodepublic void decreaseThreadNum()
NodedecreaseThreadNum in interface NodedecreaseThreadNum in class StatisticNodepublic void addPassRequest(int count)
NodeaddPassRequest in interface NodeaddPassRequest in class StatisticNodecount - count to add passpublic void printDefaultNode()
Copyright © 2021 Alibaba Group. All rights reserved.