All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.csp.sentinel.SphU Maven / Gradle / Ivy

There is a newer version: 1.8.3
Show newest version
/**
 * 
 */
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]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy