package cn.axzo.workflow.common.util;


import cn.axzo.workflow.common.enums.RpcInvokeModeEnum;

/**
 * TODO
 *
 * @author wangli
 * @since 2024/5/29 23:57
 */
public class ThreadUtil {

    final static InheritableThreadLocal<RpcInvokeModeEnum> threadLocal = new InheritableThreadLocal<>();

    public static void set(RpcInvokeModeEnum rpcInvokeMode) {
        threadLocal.set(rpcInvokeMode);
    }

    public static RpcInvokeModeEnum get() {
        return threadLocal.get();
    }

    public static void clear() {
        threadLocal.remove();
    }
}
