public interface Sph extends SphResourceTypeSupport
Entry for resource protection. If any block criteria is met,
a BlockException or its subclasses will be thrown. Successfully getting a entry
indicates permitting the invocation pass.| Modifier and Type | Method and Description |
|---|---|
AsyncEntry |
asyncEntry(String name,
EntryType type,
int count,
Object... args)
Create a protected asynchronous resource.
|
Entry |
entry(Method method)
Create a protected method.
|
Entry |
entry(Method method,
EntryType type)
Create a protected method.
|
Entry |
entry(Method method,
EntryType type,
int count)
Create a protected method.
|
Entry |
entry(Method method,
EntryType type,
int count,
Object... args)
Create a protected resource.
|
Entry |
entry(Method method,
int count)
Create a protected method.
|
Entry |
entry(String name)
Create a protected resource.
|
Entry |
entry(String name,
EntryType type)
Create a protected resource.
|
Entry |
entry(String name,
EntryType type,
int count)
Create a protected resource.
|
Entry |
entry(String name,
EntryType type,
int count,
Object... args)
Create a protected resource.
|
Entry |
entry(String name,
int count)
Create a protected resource.
|
Entry |
entryWithPriority(String name,
EntryType type,
int count,
boolean prioritized)
Create a protected resource with priority.
|
Entry |
entryWithPriority(String name,
EntryType type,
int count,
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 resourceBlockException - if the block criteria is metEntry entry(Method method) throws BlockException
method - the protected methodBlockException - if the block criteria is metEntry entry(Method method, int count) throws BlockException
method - the protected methodcount - the count that the resource requiresBlockException - if the block criteria is metEntry entry(String name, int count) throws BlockException
name - the unique string for the resourcecount - the count that the resource requiresBlockException - if the block criteria is metEntry entry(Method method, EntryType type) throws BlockException
method - the protected methodtype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstableBlockException - if the block criteria is metEntry entry(String name, EntryType type) throws BlockException
name - the unique name for the protected resourcetype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstableBlockException - if the block criteria is metEntry entry(Method method, EntryType type, int count) throws BlockException
method - the protected methodtype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresBlockException - if the block criteria is metEntry entry(String name, EntryType type, int count) throws BlockException
name - the unique name for the protected resourcetype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresBlockException - if the block criteria is metEntry entry(Method method, EntryType type, int count, Object... args) throws BlockException
method - the protected methodtype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresargs - the parameters of the method. It can also be counted by setting
hot parameter ruleBlockException - if the block criteria is metEntry entry(String name, EntryType type, int count, Object... args) throws BlockException
name - the unique name for the protected resourcetype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresargs - the parameters of the method. It can also be counted by setting hot parameter ruleBlockException - if the block criteria is metAsyncEntry asyncEntry(String name, EntryType type, int count, Object... args) throws BlockException
name - the unique name for the protected resourcetype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresargs - the parameters of the method. It can also be counted by setting hot parameter ruleBlockException - if the block criteria is metEntry entryWithPriority(String name, EntryType type, int count, boolean prioritized) throws BlockException
name - the unique name for the protected resourcetype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresprioritized - whether the entry is prioritizedBlockException - if the block criteria is metEntry entryWithPriority(String name, EntryType type, int count, boolean prioritized, Object... args) throws BlockException
name - the unique name for the protected resourcetype - the resource is an inbound or an outbound method. This is used
to mark whether it can be blocked when the system is unstablecount - the count that the resource requiresprioritized - whether the entry is prioritizedargs - the parameters of the method. It can also be counted by setting hot parameter
ruleBlockException - if the block criteria is metCopyright © 2019 Alibaba Group. All rights reserved.