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

com.aliyun.openservices.ons.api.exactlyonce.aop.model.LocalTxContext Maven / Gradle / Ivy

There is a newer version: 1.9.3.Final
Show newest version
package com.aliyun.openservices.ons.api.exactlyonce.aop.model;

/**
 * @author gongshi
 */
public class LocalTxContext {
    private static final ThreadLocal MQTXCONTEXT_THREAD_LOCAL = new ThreadLocal();

    public static void set(MQTxContext transactionContext) {
        LocalTxContext.MQTXCONTEXT_THREAD_LOCAL.set(transactionContext);
    }

    public static void clear() {
        LocalTxContext.MQTXCONTEXT_THREAD_LOCAL.remove();
    }

    public static MQTxContext get() {
        return LocalTxContext.MQTXCONTEXT_THREAD_LOCAL.get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy