@Override public void onMessage(CharSequence channel, AttributeMessage msg) { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } if (msg instanceof AttributesClearMessage) { RedissonSessionManager.super.remove(session); } if (msg instanceof AttributesPutAllMessage) { AttributesPutAllMessage m = (AttributesPutAllMessage) msg; for (Entry<String, Object> entry : m.getAttrs(applicationClassLoader).entrySet()) { session.superSetAttribute(entry.getKey(), entry.getValue(), true); } } if (msg instanceof AttributeUpdateMessage) { AttributeUpdateMessage m = (AttributeUpdateMessage)msg; session.superSetAttribute(m.getName(), m.getValue(applicationClassLoader), true); } } } catch (Exception e) { log.error("Can't handle topic message", e); } } });
@Override public void onMessage(CharSequence channel, AttributeMessage msg) { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } if (msg instanceof AttributesClearMessage) { RedissonSessionManager.super.remove(session, false); } if (msg instanceof AttributesPutAllMessage) { AttributesPutAllMessage m = (AttributesPutAllMessage) msg; for (Entry<String, Object> entry : m.getAttrs(applicationClassLoader).entrySet()) { session.superSetAttribute(entry.getKey(), entry.getValue(), true); } } if (msg instanceof AttributeUpdateMessage) { AttributeUpdateMessage m = (AttributeUpdateMessage)msg; session.superSetAttribute(m.getName(), m.getValue(applicationClassLoader), true); } } } catch (Exception e) { log.error("Can't handle topic message", e); } } });
@Override public void onMessage(CharSequence channel, AttributeMessage msg) { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } if (msg instanceof AttributesClearMessage) { RedissonSessionManager.super.remove(session, false); } if (msg instanceof AttributesPutAllMessage) { AttributesPutAllMessage m = (AttributesPutAllMessage) msg; for (Entry<String, Object> entry : m.getAttrs(applicationClassLoader).entrySet()) { session.superSetAttribute(entry.getKey(), entry.getValue(), true); } } if (msg instanceof AttributeUpdateMessage) { AttributeUpdateMessage m = (AttributeUpdateMessage)msg; session.superSetAttribute(m.getName(), m.getValue(applicationClassLoader), true); } } } catch (Exception e) { log.error("Can't handle topic message", e); } } });
@Override public void onMessage(CharSequence channel, AttributeMessage msg) { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } if (msg instanceof AttributesClearMessage) { RedissonSessionManager.super.remove(session, false); } if (msg instanceof AttributesPutAllMessage) { AttributesPutAllMessage m = (AttributesPutAllMessage) msg; for (Entry<String, Object> entry : m.getAttrs(applicationClassLoader).entrySet()) { session.superSetAttribute(entry.getKey(), entry.getValue(), true); } } if (msg instanceof AttributeUpdateMessage) { AttributeUpdateMessage m = (AttributeUpdateMessage)msg; session.superSetAttribute(m.getName(), m.getValue(applicationClassLoader), true); } } } catch (Exception e) { log.error("Can't handle topic message", e); } } });
@Override public void onMessage(CharSequence channel, AttributeMessage msg) { try { // TODO make it thread-safe RedissonSession session = (RedissonSession) RedissonSessionManager.super.findSession(msg.getSessionId()); if (session != null && !msg.getNodeId().equals(nodeId)) { if (msg instanceof AttributeRemoveMessage) { session.superRemoveAttributeInternal(((AttributeRemoveMessage)msg).getName(), true); } if (msg instanceof AttributesClearMessage) { RedissonSessionManager.super.remove(session, false); } if (msg instanceof AttributesPutAllMessage) { AttributesPutAllMessage m = (AttributesPutAllMessage) msg; for (Entry<String, Object> entry : m.getAttrs(applicationClassLoader).entrySet()) { session.superSetAttribute(entry.getKey(), entry.getValue(), true); } } if (msg instanceof AttributeUpdateMessage) { AttributeUpdateMessage m = (AttributeUpdateMessage)msg; session.superSetAttribute(m.getName(), m.getValue(applicationClassLoader), true); } } } catch (Exception e) { log.error("Can't handle topic message", e); } } });