-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathTxCompensateLocal.java
More file actions
50 lines (35 loc) · 995 Bytes
/
TxCompensateLocal.java
File metadata and controls
50 lines (35 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.codingapi.tx.aop.bean;
/**
* 分布式事务远程调用控制对象
* Created by lorne on 2017/6/5.
*/
public class TxCompensateLocal {
private final static ThreadLocal<TxCompensateLocal> currentLocal = new InheritableThreadLocal<TxCompensateLocal>();
private String groupId;
private String type;
private int startState;
public int getStartState() {
return startState;
}
public void setStartState(int startState) {
this.startState = startState;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static TxCompensateLocal current() {
return currentLocal.get();
}
public static void setCurrent(TxCompensateLocal current) {
currentLocal.set(current);
}
}