接口 SphResourceTypeSupport
- 所有已知子接口:
Sph
- 所有已知实现类:
CtSph
public interface SphResourceTypeSupport
- 从以下版本开始:
- 1.7.0
- 作者:
- Eric Zhao
-
方法概要
修饰符和类型方法说明asyncEntryWithType(String name, int resourceType, EntryType trafficType, int batchCount, boolean prioritized, Object[] args) Record statistics and perform rule checking for the given resource that indicates an async invocation.entryWithType(String name, int resourceType, EntryType trafficType, int batchCount, boolean prioritized, Object[] args) Record statistics and perform rule checking for the given resource with the provided classification.entryWithType(String name, int resourceType, EntryType trafficType, int batchCount, Object[] args) Record statistics and perform rule checking for the given resource with provided classification.
-
方法详细资料
-
entryWithType
Entry entryWithType(String name, int resourceType, EntryType trafficType, int batchCount, Object[] args) throws BlockException Record statistics and perform rule checking for the given resource with provided classification.- 参数:
name- the unique name of the protected resourceresourceType- the classification of the 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
-
entryWithType
Entry entryWithType(String name, int resourceType, EntryType trafficType, int batchCount, boolean prioritized, Object[] args) throws BlockException Record statistics and perform rule checking for the given resource with the provided classification.- 参数:
name- the unique name of the protected resourceresourceType- classification of the resource (e.g. Web or RPC)trafficType- 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
-
asyncEntryWithType
AsyncEntry asyncEntryWithType(String name, int resourceType, EntryType trafficType, int batchCount, boolean prioritized, Object[] args) throws BlockException Record statistics and perform rule checking for the given resource that indicates an async invocation.- 参数:
name- the unique name for the protected resourceresourceType- classification of the resource (e.g. Web or RPC)trafficType- 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
-