public interface Sph extends SphResourceTypeSupport
| Modifier and Type | Method and Description |
|---|---|
AsyncEntry |
asyncEntry(String name,
EntryType trafficType,
int batchCount,
Object... args)
Create a protected asynchronous resource.
|
Entry |
entry(Method method)
Record statistics and perform rule checking for the given method.
|
Entry |
entry(Method method,
EntryType trafficType)
Record statistics and perform rule checking for the given method.
|
Entry |
entry(Method method,
EntryType trafficType,
int batchCount)
Record statistics and perform rule checking for the given method.
|
Entry |
entry(Method method,
EntryType trafficType,
int batchCount,
Object... args)
Record statistics and perform rule checking for the given resource.
|
Entry |
entry(Method method,
int batchCount)
Record statistics and perform rule checking for the given method.
|
Entry |
entry(String name)
Record statistics and perform rule checking for the given resource.
|
Entry |
entry(String name,
EntryType trafficType)
Record statistics and perform rule checking for the given resource.
|
Entry |
entry(String name,
EntryType trafficType,
int batchCount)
Record statistics and perform rule checking for the given resource.
|
Entry |
entry(String name,
EntryType trafficType,
int batchCount,
Object... args)
Record statistics and perform rule checking for the given resource.
|
Entry |
entry(String name,
int batchCount)
Record statistics and perform rule checking for the given resource.
|
Entry |
entryWithPriority(String name,
EntryType trafficType,
int batchCount,
boolean prioritized)
Create a protected resource with priority.
|
Entry |
entryWithPriority(String name,
EntryType trafficType,
int batchCount,
boolean prioritized,
Object... args)
Create a protected resource with priority.
|
asyncEntryWithType, entryWithType, entryWithTypeEntry entry(String name) throws BlockException
name - the unique name of the protected resourceEntry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(Method method) throws BlockException
method - the protected methodEntry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(Method method, int batchCount) throws BlockException
method - the protected methodbatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)Entry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(String name, int batchCount) throws BlockException
name - the unique string for the resourcebatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)Entry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(Method method, EntryType trafficType) throws BlockException
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 by SystemRuleEntry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(String name, EntryType trafficType) throws BlockException
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 by SystemRuleEntry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(Method method, EntryType trafficType, int batchCount) throws BlockException
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 by SystemRulebatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)Entry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(String name, EntryType trafficType, int batchCount) throws BlockException
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 by SystemRulebatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)Entry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(Method method, EntryType trafficType, int batchCount, Object... args) throws BlockException
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 by SystemRulebatchCount - 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 slotsEntry of this invocation (used for mark the invocation complete and get context data).BlockException - if the block criteria is metEntry entry(String name, EntryType trafficType, int batchCount, Object... args) throws BlockException
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 by SystemRulebatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)args - args for parameter flow control or customized slotsEntry of this invocation (used for mark the invocation complete and get context data)BlockException - if the block criteria is metAsyncEntry asyncEntry(String name, EntryType trafficType, int batchCount, Object... args) throws BlockException
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 by SystemRulebatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)args - args for parameter flow control or customized slotsBlockException - if the block criteria is metEntry entryWithPriority(String name, EntryType trafficType, int batchCount, boolean prioritized) throws BlockException
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 by SystemRulebatchCount - the amount of calls within the invocation (e.g. batchCount=2 means request for 2 tokens)prioritized - whether the entry is prioritizedEntry of this invocation (used for mark the invocation complete and get context data)BlockException - if the block criteria is metEntry entryWithPriority(String name, EntryType trafficType, int batchCount, boolean prioritized, Object... args) throws BlockException
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 by SystemRulebatchCount - 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 slotsEntry of this invocation (used for mark the invocation complete and get context data)BlockException - if the block criteria is metCopyright © 2021 Alibaba Group. All rights reserved.