提交 1018981f 编写于 作者: A ascrutae

修改key

上级 c1d3407d
...@@ -29,7 +29,7 @@ public class CollectionServerDataHandler extends SimpleChannelInboundHandler<byt ...@@ -29,7 +29,7 @@ public class CollectionServerDataHandler extends SimpleChannelInboundHandler<byt
DataBufferThreadContainer.getDataBufferThread().saveTemporarily(data.getBytes()); DataBufferThreadContainer.getDataBufferThread().saveTemporarily(data.getBytes());
} else { } else {
InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().localAddress(); InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().localAddress();
String key = socketAddress.getHostName() + ":" + socketAddress.getPort(); String key = ctx.name() + "-" + socketAddress.getHostName() + ":" + socketAddress.getPort();
Jedis jedis = AlarmRedisConnector.getJedis(); Jedis jedis = AlarmRedisConnector.getJedis();
// 如果不存在,则置为0,并且设置生失效时间 // 如果不存在,则置为0,并且设置生失效时间
if (jedis.setnx(key, 0 + "") == 1) { if (jedis.setnx(key, 0 + "") == 1) {
...@@ -44,7 +44,6 @@ public class CollectionServerDataHandler extends SimpleChannelInboundHandler<byt ...@@ -44,7 +44,6 @@ public class CollectionServerDataHandler extends SimpleChannelInboundHandler<byt
} }
} }
/** /**
* 生成校验和参数 * 生成校验和参数
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册