接口 Sph
- 所有超级接口:
SphResourceTypeSupport
- 所有已知实现类:
CtSph
The basic interface for recording statistics and performing rule checking for resources.
- 作者:
- qinan.qn, jialiang.linjl, leyou, Eric Zhao
-
方法概要
修饰符和类型方法说明asyncEntry(String name, EntryType trafficType, int batchCount, Object... args) Create a protected asynchronous resource.Record statistics and perform rule checking for the given method.Record statistics and perform rule checking for the given method.Record statistics and perform rule checking for the given method.Record statistics and perform rule checking for the given method.Record statistics and perform rule checking for the given resource.Record statistics and perform rule checking for the given resource.Record statistics and perform rule checking for the given resource.Record statistics and perform rule checking for the given resource.Record statistics and perform rule checking for the given resource.Record statistics and perform rule checking for the given resource.entryWithPriority(String name, EntryType trafficType, int batchCount, boolean prioritized) Create a protected resource with priority.entryWithPriority(String name, EntryType trafficType, int batchCount, boolean prioritized, Object... args) Create a protected resource with priority.从接口继承的方法 com.alibaba.csp.sentinel.SphResourceTypeSupport
asyncEntryWithType, entryWithType, entryWithType
-
方法详细资料
-
entry
Record statistics and perform rule checking for the given resource.- 参数:
name- the unique name of the protected resource- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given method.- 参数:
method- the protected method- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given method.- 参数:
method- the protected methodbatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given resource.- 参数:
name- the unique string for the resourcebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given method.- 参数:
method- the protected methodtrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRule- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given resource.- 参数:
name- the unique name for the protected resourcetrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRule- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given method.- 参数:
method- the protected methodtrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Record statistics and perform rule checking for the given resource.- 参数:
name- the unique name for the protected resourcetrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Entry entry(Method method, EntryType trafficType, int batchCount, Object... args) throws BlockException Record statistics and perform rule checking for the given resource.- 参数:
method- the protected methodtrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)args- parameters of the method for flow control or customized slots- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data). - 抛出:
BlockException- if the block criteria is met
-
entry
Entry entry(String name, EntryType trafficType, int batchCount, Object... args) throws BlockException Record statistics and perform rule checking for the given resource.- 参数:
name- the unique name for the protected resourcetrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)args- args for parameter flow control or customized slots- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data) - 抛出:
BlockException- if the block criteria is met
-
asyncEntry
AsyncEntry asyncEntry(String name, EntryType trafficType, int batchCount, Object... args) throws BlockException Create a protected asynchronous resource.- 参数:
name- the unique name for the protected resourcetrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)args- args for parameter flow control or customized slots- 返回:
- created asynchronous entry
- 抛出:
BlockException- if the block criteria is met- 从以下版本开始:
- 0.2.0
-
entryWithPriority
Entry entryWithPriority(String name, EntryType trafficType, int batchCount, boolean prioritized) throws BlockException Create a protected resource with priority.- 参数:
name- the unique name for the protected resourcetrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)prioritized- whether the entry is prioritized- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data) - 抛出:
BlockException- if the block criteria is met- 从以下版本开始:
- 1.4.0
-
entryWithPriority
Entry entryWithPriority(String name, EntryType trafficType, int batchCount, boolean prioritized, Object... args) throws BlockException Create a protected resource with priority.- 参数:
name- the unique name for the protected resourcetrafficType- the traffic type (inbound, outbound or internal). This is used to mark whether it can be blocked when the system is unstable, only inbound traffic could be blocked bySystemRulebatchCount- the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)prioritized- whether the entry is prioritizedargs- args for parameter flow control or customized slots- 返回:
- the
Entryof this invocation (used for mark the invocation complete and get context data) - 抛出:
BlockException- if the block criteria is met- 从以下版本开始:
- 1.5.0
-