Sentinel核心类图
2022-02-13 17:47:42 1 举报
Sentinel核心类图
作者其他创作
大纲/内容
统一资源在不同上下文中的汇总统计类ClusterNode
SystemSlot
span style=\"font-size: inherit;\
用户滑动窗口算法实现类LeapArray
# windowLengthInMs:int# sampleCount:int# intervalInMs:int- intervalInSecond:double# array:AtomicReferenceArray<WindowWrap<T>>-updateLock:ReentrantLock
DegradeSlot
FlowSlot
- checker:FlowRuleChecker
Wrapper entity class for a period of time window.WindowWrap
- windowLengthInMs:long- windowStart:long- value:T
ProcessorSlotChain
-next:AbstractLinkedProcessorSlot
+ addFirst(AbstractLinkedProcessorSlot<?> protocolProcessor):void+ addLast(AbstractLinkedProcessorSlot<?> protocolProcessor):void
Context
- name:String- entranceNode:DefaultNode- curEntry:Entry- origin:String- async:boolan
框架入口类CtSph
当前调用数据保存类 holds information of current invocationEntry
- OBJECTS0:Object[]- createTimestamp:long- completeTimestamp:long- curNode:Node- originNode:Node- error:Throwable- blockError:BlockException- resourceWrapper:ResourceWrapper
具体某个资源统计类DefaultNode
- id:ResourceWrapper- childList:Set<Node>- clusterNode:ClusterNode
+ getChildList():Set<Node>
核心类
总结:1、数据如何存储2、数据如何计算
滑动窗口支持接口<<Interface>>OccupySupport
测量桶MetricBucket
- counters:LongAdder[]- minRt:long
资源实时统计类StatisticNode
- rollingCounterInSecond:Metric- rollingCounterInMinute:Metric
-first:AbstractLinkedProcessorSlot-end:AbstractLinkedProcessorSlot
AuthoritySlot
AbstractLinkedProcessorSlot
ClusterBuilderSlot
资源的流控数据存储以及统计
资源实施统计接口<<Interface>>Node
统计类ArrayMetric
- data:LeapArray<MetricBucket>
success():longmaxSuccess():longexception():long....
OccupiableBucketLeapArray
<<Interface>>ProcessorSlot
<<Interface>>Sph
代表一个上下文里面的所有资源统计EntranceNode
Map里存放的是Context的EntranceNode,包含子Node(DefaultNode)
统计SlotStatisticSlot
<<Interface>>SphResourceTypeSupport
消息具体流控设计(调用链设计模式)
入口Client
<<Interface>>Metric
success():longmaxSuccess():longexception():long...
BucketLeapArray
0 条评论
下一页