@Override public void setCreationTime(long time) { super.setCreationTime(time); if (map != null) { Map<String, Object> newMap = new HashMap<String, Object>(3); newMap.put(CREATION_TIME_ATTR, creationTime); newMap.put(LAST_ACCESSED_TIME_ATTR, lastAccessedTime); newMap.put(THIS_ACCESSED_TIME_ATTR, thisAccessedTime); map.putAll(newMap); if (readMode == ReadMode.MEMORY) { topic.publish(createPutAllMessage(newMap)); } } }
@Override public void setCreationTime(long time) { super.setCreationTime(time); if (map != null) { Map<String, Object> newMap = new HashMap<String, Object>(3); newMap.put(CREATION_TIME_ATTR, creationTime); newMap.put(LAST_ACCESSED_TIME_ATTR, lastAccessedTime); newMap.put(THIS_ACCESSED_TIME_ATTR, thisAccessedTime); map.putAll(newMap); if (readMode == ReadMode.MEMORY) { topic.publish(createPutAllMessage(newMap)); } } }
@Override public void setCreationTime(long time) { super.setCreationTime(time); if (map != null) { Map<String, Object> newMap = new HashMap<String, Object>(3); newMap.put(CREATION_TIME_ATTR, creationTime); newMap.put(LAST_ACCESSED_TIME_ATTR, lastAccessedTime); newMap.put(THIS_ACCESSED_TIME_ATTR, thisAccessedTime); map.putAll(newMap); if (readMode == ReadMode.MEMORY) { topic.publish(createPutAllMessage(newMap)); } } }
@Override public void access() { super.access(); if (map != null) { Map<String, Object> newMap = new HashMap<String, Object>(2); newMap.put(LAST_ACCESSED_TIME_ATTR, lastAccessedTime); newMap.put(THIS_ACCESSED_TIME_ATTR, thisAccessedTime); map.putAll(newMap); if (readMode == ReadMode.MEMORY) { topic.publish(createPutAllMessage(newMap)); } expireSession(); } }
@Override public void access() { super.access(); if (map != null) { Map<String, Object> newMap = new HashMap<String, Object>(2); newMap.put(LAST_ACCESSED_TIME_ATTR, lastAccessedTime); newMap.put(THIS_ACCESSED_TIME_ATTR, thisAccessedTime); map.putAll(newMap); if (readMode == ReadMode.MEMORY) { topic.publish(createPutAllMessage(newMap)); } expireSession(); } }
@Override public void access() { super.access(); if (map != null) { Map<String, Object> newMap = new HashMap<String, Object>(2); newMap.put(LAST_ACCESSED_TIME_ATTR, lastAccessedTime); newMap.put(THIS_ACCESSED_TIME_ATTR, thisAccessedTime); map.putAll(newMap); if (readMode == ReadMode.MEMORY) { topic.publish(createPutAllMessage(newMap)); } expireSession(); } }
private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { try { topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } catch (IOException e) { throw new IllegalStateException(e); } } }
private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { try { topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } catch (IOException e) { throw new IllegalStateException(e); } } }
private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { try { topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } catch (IOException e) { throw new IllegalStateException(e); } } }
private void fastPut(String name, Object value) { map.fastPut(name, value); if (readMode == ReadMode.MEMORY) { try { topic.publish(new AttributeUpdateMessage(redissonManager.getNodeId(), getId(), name, value)); } catch (IOException e) { throw new IllegalStateException(e); } } }
public void delete() { if (map == null) { map = redissonManager.getMap(id); } map.delete(); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; }
public void delete() { if (map == null) { map = redissonManager.getMap(id); } map.delete(); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; }
@Override protected void removeAttributeInternal(String name, boolean notify) { super.removeAttributeInternal(name, notify); if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } }
@Override protected void removeAttributeInternal(String name, boolean notify) { super.removeAttributeInternal(name, notify); if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } }
@Override protected void removeAttributeInternal(String name, boolean notify) { super.removeAttributeInternal(name, notify); if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } }
public void delete() { if (map == null) { map = redissonManager.getMap(id); } map.delete(); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; }
public void delete() { if (map == null) { map = redissonManager.getMap(id); } map.delete(); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributesClearMessage(redissonManager.getNodeId(), getId())); } map = null; }
@Override protected void removeAttributeInternal(String name, boolean notify) { super.removeAttributeInternal(name, notify); if (updateMode == UpdateMode.DEFAULT && map != null) { map.fastRemove(name); if (readMode == ReadMode.MEMORY) { topic.publish(new AttributeRemoveMessage(redissonManager.getNodeId(), getId(), name)); } } }
public RedissonSession(String keyPrefix) { this.delegate = new MapSession(); map = redisson.getMap(keyPrefix + delegate.getId(), new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec())); principalName = resolvePrincipal(delegate); Map<String, Object> newMap = new HashMap<String, Object>(3); newMap.put("session:creationTime", delegate.getCreationTime()); newMap.put("session:lastAccessedTime", delegate.getLastAccessedTime()); newMap.put("session:maxInactiveInterval", delegate.getMaxInactiveIntervalInSeconds()); map.putAll(newMap); updateExpiration(); String channelName = getEventsChannelName(delegate.getId()); RTopic topic = redisson.getTopic(channelName, StringCodec.INSTANCE); topic.publish(delegate.getId()); }
public RedissonSession(String keyPrefix) { this.delegate = new MapSession(); map = redisson.getMap(keyPrefix + delegate.getId(), new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec())); principalName = resolvePrincipal(delegate); Map<String, Object> newMap = new HashMap<String, Object>(3); newMap.put("session:creationTime", delegate.getCreationTime()); newMap.put("session:lastAccessedTime", delegate.getLastAccessedTime()); newMap.put("session:maxInactiveInterval", delegate.getMaxInactiveIntervalInSeconds()); map.putAll(newMap); updateExpiration(); String channelName = getEventsChannelName(delegate.getId()); RTopic topic = redisson.getTopic(channelName, StringCodec.INSTANCE); topic.publish(delegate.getId()); }