cloud-etl-rule/lib/com/muyu/rule/common/basic/handler/DataEngineHandler.java

37 lines
591 B
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.muyu.rule.common.basic.handler;
/**
* @Author张承志
* @Packagecom.muyu.rule.server.basic
* @Projectcloud-etl-rule
* @name规则引擎作用域
* @Date2024/8/29 14:21
*/
public class DataEngineHandler {
private static final ThreadLocal<Object> dataEngineHandler = new ThreadLocal<>();
public static void set(final Object handler){
dataEngineHandler.set(handler);
}
public static <T> T get(){
return (T) dataEngineHandler.get();
}
public static void remove(){
dataEngineHandler.remove();
}
}