com.aliyun.openservices.ons.api.exactlyonce.aop.model.LocalTxContext Maven / Gradle / Ivy
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