接口 Sph

所有超级接口:
SphResourceTypeSupport
所有已知实现类:
CtSph

public interface Sph extends SphResourceTypeSupport
The basic interface for recording statistics and performing rule checking for resources.
作者:
qinan.qn, jialiang.linjl, leyou, Eric Zhao
  • 方法详细资料

    • entry

      Entry entry(String name) throws BlockException
      Record statistics and perform rule checking for the given resource.
      参数:
      name - the unique name of the protected resource
      返回:
      the Entry of this invocation (used for mark the invocation complete and get context data).
      抛出:
      BlockException - if the block criteria is met
    • entry

      Entry entry(Method method) throws BlockException
      Record statistics and perform rule checking for the given method.
      参数:
      method - the protected method
      返回:
      the Entry of this invocation (used for mark the invocation complete and get context data).
      抛出:
      BlockException - if the block criteria is met
    • entry

      Entry entry(Method method, int batchCount) throws BlockException
      Record statistics and perform rule checking for the given method.
      参数:
      method - the protected method
      batchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)
      返回:
      the Entry of this invocation (used for mark the invocation complete and get context data).
      抛出:
      BlockException - if the block criteria is met
    • entry

      Entry entry(String name, int batchCount) throws BlockException
      Record statistics and perform rule checking for the given resource.
      参数:
      name - the unique string for the resource
      batchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)
      返回:
      the Entry of 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) throws BlockException
      Record statistics and perform rule checking for the given method.
      参数:
      method - the protected method
      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 by SystemRule
      返回:
      the Entry of 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) throws BlockException
      Record statistics and perform rule checking for the given resource.
      参数:
      name - the unique name for the protected resource
      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 by SystemRule
      返回:
      the Entry of 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) throws BlockException
      Record statistics and perform rule checking for the given method.
      参数:
      method - the protected method
      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 by SystemRule
      batchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)
      返回:
      the Entry of 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) throws BlockException
      Record statistics and perform rule checking for the given resource.
      参数:
      name - the unique name for the protected resource
      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 by SystemRule
      batchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)
      返回:
      the Entry of 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 method
      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 by SystemRule
      batchCount - 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 Entry of 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 resource
      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 by SystemRule
      batchCount - 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 Entry of 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 resource
      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 by SystemRule
      batchCount - 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 resource
      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 by SystemRule
      batchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)
      prioritized - whether the entry is prioritized
      返回:
      the Entry of 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 resource
      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 by SystemRule
      batchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)
      prioritized - whether the entry is prioritized
      args - args for parameter flow control or customized slots
      返回:
      the Entry of this invocation (used for mark the invocation complete and get context data)
      抛出:
      BlockException - if the block criteria is met
      从以下版本开始:
      1.5.0