public interface Sph
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 |
|---|---|
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 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 metCopyright © 2018 Alibaba Group. All rights reserved.