类 ClusterBuilderSlot
java.lang.Object
com.alibaba.csp.sentinel.slotchain.AbstractLinkedProcessorSlot<DefaultNode>
com.alibaba.csp.sentinel.slots.clusterbuilder.ClusterBuilderSlot
- 所有已实现的接口:
ProcessorSlot<DefaultNode>
@Spi(isSingleton=false,
order=-9000)
public class ClusterBuilderSlot
extends AbstractLinkedProcessorSlot<DefaultNode>
This slot maintains resource running statistics (response time, qps, thread
count, exception), and a list of callers as well which is marked by
ContextUtil.enter(String origin)
One resource has only one cluster node, while one resource can have multiple default nodes.
- 作者:
- jialiang.linjl
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidentry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) Entrance of this slot.voidexit(Context context, ResourceWrapper resourceWrapper, int count, Object... args) Exit of this slot.static ClusterNodegetClusterNode(String id) GetClusterNodeof the resource name.static ClusterNodegetClusterNode(String id, EntryType type) GetClusterNodeof the resource of the specific type.static Map<ResourceWrapper,ClusterNode> GetClusterNodes map, this map holds allClusterNodes, it's key is resource name, value is the relatedClusterNode.static voidReset allClusterNodes.从类继承的方法 com.alibaba.csp.sentinel.slotchain.AbstractLinkedProcessorSlot
fireEntry, fireExit, getNext, setNext
-
构造器详细资料
-
ClusterBuilderSlot
public ClusterBuilderSlot()
-
-
方法详细资料
-
entry
public void entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count, boolean prioritized, Object... args) throws Throwable 从接口复制的说明:ProcessorSlotEntrance of this slot. -
exit
从接口复制的说明:ProcessorSlotExit of this slot.- 参数:
context- currentContextresourceWrapper- current resourcecount- tokens neededargs- parameters of the original call
-
getClusterNode
GetClusterNodeof the resource of the specific type.- 参数:
id- resource name.type- invoke type.- 返回:
- the
ClusterNode
-
getClusterNode
GetClusterNodeof the resource name.- 参数:
id- resource name.- 返回:
- the
ClusterNode.
-
getClusterNodeMap
GetClusterNodes map, this map holds allClusterNodes, it's key is resource name, value is the relatedClusterNode.
DO NOT MODIFY the map returned.- 返回:
- all
ClusterNodes
-
resetClusterNodes
public static void resetClusterNodes()Reset allClusterNodes. Reset is needed whenIntervalProperty.INTERVALorSampleCountProperty.SAMPLE_COUNTis changed.
-