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

com.jd.blockchain.contract.model.ContractEventContextThreadLocal Maven / Gradle / Ivy

There is a newer version: 0.8.3.RELEASE
Show newest version
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