commit | author | age
|
a18bfa
|
1 |
package com.codingapi.tm.model; |
Z |
2 |
|
|
3 |
/** |
|
4 |
* Created by lorne on 2017/7/1. |
|
5 |
*/ |
|
6 |
public class TxServer { |
|
7 |
|
|
8 |
private String ip; |
|
9 |
private int port; |
|
10 |
private int heart; |
|
11 |
private int delay; |
|
12 |
private int compensateMaxWaitTime; |
|
13 |
|
|
14 |
public static TxServer format(TxState state) { |
|
15 |
TxServer txServer = new TxServer(); |
|
16 |
txServer.setIp(state.getIp()); |
|
17 |
txServer.setPort(state.getPort()); |
|
18 |
txServer.setHeart(state.getTransactionNettyHeartTime()); |
|
19 |
txServer.setDelay(state.getTransactionNettyDelayTime()); |
|
20 |
txServer.setCompensateMaxWaitTime(state.getCompensateMaxWaitTime()); |
|
21 |
return txServer; |
|
22 |
} |
|
23 |
|
|
24 |
|
|
25 |
public String getIp() { |
|
26 |
return ip; |
|
27 |
} |
|
28 |
|
|
29 |
public void setIp(String ip) { |
|
30 |
this.ip = ip; |
|
31 |
} |
|
32 |
|
|
33 |
|
|
34 |
public int getPort() { |
|
35 |
return port; |
|
36 |
} |
|
37 |
|
|
38 |
public void setPort(int port) { |
|
39 |
this.port = port; |
|
40 |
} |
|
41 |
|
|
42 |
public int getHeart() { |
|
43 |
return heart; |
|
44 |
} |
|
45 |
|
|
46 |
public void setHeart(int heart) { |
|
47 |
this.heart = heart; |
|
48 |
} |
|
49 |
|
|
50 |
public int getDelay() { |
|
51 |
return delay; |
|
52 |
} |
|
53 |
|
|
54 |
public void setDelay(int delay) { |
|
55 |
this.delay = delay; |
|
56 |
} |
|
57 |
|
|
58 |
|
|
59 |
public int getCompensateMaxWaitTime() { |
|
60 |
return compensateMaxWaitTime; |
|
61 |
} |
|
62 |
|
|
63 |
|
|
64 |
public void setCompensateMaxWaitTime(int compensateMaxWaitTime) { |
|
65 |
this.compensateMaxWaitTime = compensateMaxWaitTime; |
|
66 |
} |
|
67 |
|
|
68 |
|
|
69 |
} |