com.taobao.csp.sentinel.SphU Maven / Gradle / Ivy
/**
*
*/
package com.taobao.csp.sentinel;
import java.lang.reflect.Method;
import com.taobao.csp.sentinel.slotchain.ResourceWraper;
import com.taobao.csp.sentinel.slots.block.BlockException;
/**
* @author [email protected] 2014��5��29��
* @author [email protected]
* @author jialiang.linjl([email protected] ����Ϊ��Ӧ�÷����ټ����û�����
*/
public class SphU {
public static Entry entry(Method m, NodeType type, Object... args) throws BlockException {
return Env.sph.entry(m, type, args);
}
public static Entry entry(Method m, Object... args) throws BlockException {
return Env.sph.entry(m, NodeType.CUSTOM, args);
}
public static Entry entry(Method m) throws BlockException {
return entry(m, NodeType.CUSTOM.name(), m.getName(), new Object[0]);
}
public static Entry entry(String s, NodeType type, Object... args) throws BlockException {
return Env.sph.entry(s, type, args);
}
public static Entry entry(String s, Object... args) throws BlockException {
return Env.sph.entry(s, NodeType.CUSTOM, args);
}
public static Entry entry(String s) throws BlockException {
return entry(s, NodeType.CUSTOM, new Object[0]);
}
public static Entry entry(ResourceWraper resourceWraper, Object... args) throws BlockException {
return Env.sph.entry(resourceWraper, args);
}
public static Entry entry(ResourceWraper resourceWraper) throws BlockException {
return entry(resourceWraper, new Object[0]);
}
}