public void setServerStatus(long serverStatus) { String key = ApplicaRuntime.globalFlag + itemId + "-" + bindAddress + "-ServerStatus-" + ApplicaRuntime.globalFlag; RedisUtil.setLong(key, serverStatus); }
public long getServerStatus() { String key = ApplicaRuntime.globalFlag + itemId + "-" + bindAddress + "-ServerStatus-" + ApplicaRuntime.globalFlag; Long serverStatus = RedisUtil.getLong(key); logger.info("key:" + key + ", serverStatus:" + serverStatus); if (serverStatus == null) return ServerStatus.UNKNOWN; else return serverStatus; }