Skip to content

Commit

Permalink
Merge pull request #290 from ltsopensource/develop
Browse files Browse the repository at this point in the history
1.6.8
  • Loading branch information
qq254963746 committed May 13, 2016
2 parents fd848ff + 1f41927 commit 366902e
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 15 deletions.
Expand Up @@ -57,7 +57,6 @@ public static JobPo convert(Job job) {
} else if (job.isRepeatable()) {
jobPo.setCronExpression(null);
jobPo.setRepeatInterval(job.getRepeatInterval());
jobPo.setInternalExtParam(Constants.FIRST_FIRE_TIME, String.valueOf(jobPo.getTriggerTime()));
jobPo.setJobType(JobType.REPEAT);
} else if (job.getTriggerTime() == null) {
jobPo.setJobType(JobType.REAL_TIME);
Expand All @@ -77,6 +76,9 @@ public static JobPo convert(Job job) {
jobPo.setTriggerTime(job.getTriggerTime());
}
}
if (job.isRepeatable()) {
jobPo.setInternalExtParam(Constants.FIRST_FIRE_TIME, String.valueOf(jobPo.getTriggerTime()));
}
return jobPo;
}

Expand Down
Expand Up @@ -27,7 +27,7 @@
* Server与Client公用抽象类
*/
public abstract class AbstractRemoting {
private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractRemoting.class);

// 信号量,Oneway情况会使用,防止本地缓存请求过多
protected final Semaphore semaphoreOneway;
Expand Down
Expand Up @@ -11,7 +11,10 @@
import java.net.SocketAddress;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

Expand All @@ -20,7 +23,7 @@
* Remoting客户端实现
*/
public abstract class AbstractRemotingClient extends AbstractRemoting implements RemotingClient {
protected static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractRemotingClient.class);

private static final long LockTimeoutMillis = 3000;

Expand Down
Expand Up @@ -4,7 +4,6 @@
import com.github.ltsopensource.core.factory.NamedThreadFactory;
import com.github.ltsopensource.core.logger.Logger;
import com.github.ltsopensource.core.logger.LoggerFactory;
import com.github.ltsopensource.remoting.common.RemotingHelper;
import com.github.ltsopensource.remoting.exception.RemotingException;
import com.github.ltsopensource.remoting.exception.RemotingSendRequestException;
import com.github.ltsopensource.remoting.exception.RemotingTimeoutException;
Expand All @@ -21,7 +20,7 @@
* Remoting服务端实现
*/
public abstract class AbstractRemotingServer extends AbstractRemoting implements RemotingServer {
protected static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractRemotingServer.class);

protected final RemotingServerConfig remotingServerConfig;
// 处理Callback应答器
Expand Down
Expand Up @@ -15,9 +15,7 @@
*/
public class RemotingHelper {

private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);

public static final String RemotingLogName = "LtsRemoting";
private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.class);

/**
* IP:PORT
Expand Down
Expand Up @@ -18,7 +18,7 @@
*/
public class LtsCodecFactory {

private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(LtsCodecFactory.class);

private Codec codec;

Expand Down
Expand Up @@ -18,7 +18,7 @@
*/
public class LtsEventHandler implements com.github.ltsopensource.nio.handler.NioHandler {

private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(LtsEventHandler.class);

private AbstractRemoting remoting;
private String sideType; // SERVER , CLIENT
Expand Down
Expand Up @@ -19,7 +19,7 @@
*/
public class MinaCodecFactory implements ProtocolCodecFactory {

private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(MinaCodecFactory.class);

private Codec codec;

Expand Down
Expand Up @@ -17,7 +17,7 @@
*/
public class MinaHandler extends IoHandlerAdapter {

private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(MinaHandler.class);

private AbstractRemoting remoting;
private String sideType; // SERVER , CLIENT
Expand Down
Expand Up @@ -22,7 +22,7 @@
*/
public class NettyCodecFactory {

private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(NettyCodecFactory.class);

private Codec codec;
private AppContext appContext;
Expand Down
Expand Up @@ -25,7 +25,7 @@
* @author Robert HG (254963746@qq.com) on 11/3/15.
*/
public class NettyRemotingClient extends AbstractRemotingClient {
private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.RemotingLogName);
private static final Logger LOGGER = LoggerFactory.getLogger(NettyRemotingClient.class);

private final Bootstrap bootstrap = new Bootstrap();
private final EventLoopGroup eventLoopGroup;
Expand Down

0 comments on commit 366902e

Please sign in to comment.