com.jd.blockchain.contract.model.ContractEventContextThreadLocal Maven / Gradle / Ivy
package com.jd.blockchain.contract.model;
/**
* 将ContractEventContext放入ThreadLocal中,便于在不同方法之间使用;
* @Author zhaogw
* @Date 2018/6/21 9:49
*/
public class ContractEventContextThreadLocal {
private static final ThreadLocal eventContextThreadLocal = new ThreadLocal<>();
public static ContractEventContext get(){
return eventContextThreadLocal.get();
}
public static void set(ContractEventContext contractEventContext){
eventContextThreadLocal.set(contractEventContext);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy