File tree 11 files changed +17
-15
lines changed
lts-core/src/main/java/com/github/ltsopensource
11 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ public static JobPo convert(Job job) {
57
57
} else if (job .isRepeatable ()) {
58
58
jobPo .setCronExpression (null );
59
59
jobPo .setRepeatInterval (job .getRepeatInterval ());
60
- jobPo .setInternalExtParam (Constants .FIRST_FIRE_TIME , String .valueOf (jobPo .getTriggerTime ()));
61
60
jobPo .setJobType (JobType .REPEAT );
62
61
} else if (job .getTriggerTime () == null ) {
63
62
jobPo .setJobType (JobType .REAL_TIME );
@@ -77,6 +76,9 @@ public static JobPo convert(Job job) {
77
76
jobPo .setTriggerTime (job .getTriggerTime ());
78
77
}
79
78
}
79
+ if (job .isRepeatable ()) {
80
+ jobPo .setInternalExtParam (Constants .FIRST_FIRE_TIME , String .valueOf (jobPo .getTriggerTime ()));
81
+ }
80
82
return jobPo ;
81
83
}
82
84
Original file line number Diff line number Diff line change 27
27
* Server与Client公用抽象类
28
28
*/
29
29
public abstract class AbstractRemoting {
30
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
30
+ private static final Logger LOGGER = LoggerFactory .getLogger (AbstractRemoting . class );
31
31
32
32
// 信号量,Oneway情况会使用,防止本地缓存请求过多
33
33
protected final Semaphore semaphoreOneway ;
Original file line number Diff line number Diff line change 11
11
import java .net .SocketAddress ;
12
12
import java .util .Timer ;
13
13
import java .util .TimerTask ;
14
- import java .util .concurrent .*;
14
+ import java .util .concurrent .ConcurrentHashMap ;
15
+ import java .util .concurrent .ExecutorService ;
16
+ import java .util .concurrent .Executors ;
17
+ import java .util .concurrent .TimeUnit ;
15
18
import java .util .concurrent .locks .Lock ;
16
19
import java .util .concurrent .locks .ReentrantLock ;
17
20
20
23
* Remoting客户端实现
21
24
*/
22
25
public abstract class AbstractRemotingClient extends AbstractRemoting implements RemotingClient {
23
- protected static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
26
+ protected static final Logger LOGGER = LoggerFactory .getLogger (AbstractRemotingClient . class );
24
27
25
28
private static final long LockTimeoutMillis = 3000 ;
26
29
Original file line number Diff line number Diff line change 4
4
import com .github .ltsopensource .core .factory .NamedThreadFactory ;
5
5
import com .github .ltsopensource .core .logger .Logger ;
6
6
import com .github .ltsopensource .core .logger .LoggerFactory ;
7
- import com .github .ltsopensource .remoting .common .RemotingHelper ;
8
7
import com .github .ltsopensource .remoting .exception .RemotingException ;
9
8
import com .github .ltsopensource .remoting .exception .RemotingSendRequestException ;
10
9
import com .github .ltsopensource .remoting .exception .RemotingTimeoutException ;
21
20
* Remoting服务端实现
22
21
*/
23
22
public abstract class AbstractRemotingServer extends AbstractRemoting implements RemotingServer {
24
- protected static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
23
+ protected static final Logger LOGGER = LoggerFactory .getLogger (AbstractRemotingServer . class );
25
24
26
25
protected final RemotingServerConfig remotingServerConfig ;
27
26
// 处理Callback应答器
Original file line number Diff line number Diff line change 15
15
*/
16
16
public class RemotingHelper {
17
17
18
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper .RemotingLogName );
19
-
20
- public static final String RemotingLogName = "LtsRemoting" ;
18
+ private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper .class );
21
19
22
20
/**
23
21
* IP:PORT
Original file line number Diff line number Diff line change 18
18
*/
19
19
public class LtsCodecFactory {
20
20
21
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
21
+ private static final Logger LOGGER = LoggerFactory .getLogger (LtsCodecFactory . class );
22
22
23
23
private Codec codec ;
24
24
Original file line number Diff line number Diff line change 18
18
*/
19
19
public class LtsEventHandler implements com .github .ltsopensource .nio .handler .NioHandler {
20
20
21
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
21
+ private static final Logger LOGGER = LoggerFactory .getLogger (LtsEventHandler . class );
22
22
23
23
private AbstractRemoting remoting ;
24
24
private String sideType ; // SERVER , CLIENT
Original file line number Diff line number Diff line change 19
19
*/
20
20
public class MinaCodecFactory implements ProtocolCodecFactory {
21
21
22
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
22
+ private static final Logger LOGGER = LoggerFactory .getLogger (MinaCodecFactory . class );
23
23
24
24
private Codec codec ;
25
25
Original file line number Diff line number Diff line change 17
17
*/
18
18
public class MinaHandler extends IoHandlerAdapter {
19
19
20
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
20
+ private static final Logger LOGGER = LoggerFactory .getLogger (MinaHandler . class );
21
21
22
22
private AbstractRemoting remoting ;
23
23
private String sideType ; // SERVER , CLIENT
Original file line number Diff line number Diff line change 22
22
*/
23
23
public class NettyCodecFactory {
24
24
25
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
25
+ private static final Logger LOGGER = LoggerFactory .getLogger (NettyCodecFactory . class );
26
26
27
27
private Codec codec ;
28
28
private AppContext appContext ;
Original file line number Diff line number Diff line change 25
25
* @author Robert HG ([email protected] ) on 11/3/15.
26
26
*/
27
27
public class NettyRemotingClient extends AbstractRemotingClient {
28
- private static final Logger LOGGER = LoggerFactory .getLogger (RemotingHelper . RemotingLogName );
28
+ private static final Logger LOGGER = LoggerFactory .getLogger (NettyRemotingClient . class );
29
29
30
30
private final Bootstrap bootstrap = new Bootstrap ();
31
31
private final EventLoopGroup eventLoopGroup ;
You can’t perform that action at this time.
0 commit comments