|
|
|
@ -117,12 +117,16 @@ public class RedissonSession extends StandardSession {
|
|
|
|
|
if (readMode == ReadMode.MEMORY) {
|
|
|
|
|
topic.publish(createPutAllMessage(newMap));
|
|
|
|
|
}
|
|
|
|
|
if (getMaxInactiveInterval() >= 0) {
|
|
|
|
|
map.expire(getMaxInactiveInterval(), TimeUnit.SECONDS);
|
|
|
|
|
}
|
|
|
|
|
expireSession();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void expireSession() {
|
|
|
|
|
if (maxInactiveInterval >= 0) {
|
|
|
|
|
map.expire(maxInactiveInterval + 60, TimeUnit.SECONDS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected AttributesPutAllMessage createPutAllMessage(Map<String, Object> newMap) {
|
|
|
|
|
Map<String, Object> map = new HashMap<String, Object>();
|
|
|
|
|
for (Entry<String, Object> entry : newMap.entrySet()) {
|
|
|
|
@ -137,9 +141,7 @@ public class RedissonSession extends StandardSession {
|
|
|
|
|
|
|
|
|
|
if (map != null) {
|
|
|
|
|
fastPut(MAX_INACTIVE_INTERVAL_ATTR, maxInactiveInterval);
|
|
|
|
|
if (maxInactiveInterval >= 0) {
|
|
|
|
|
map.expire(getMaxInactiveInterval(), TimeUnit.SECONDS);
|
|
|
|
|
}
|
|
|
|
|
expireSession();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -234,10 +236,7 @@ public class RedissonSession extends StandardSession {
|
|
|
|
|
if (readMode == ReadMode.MEMORY) {
|
|
|
|
|
topic.publish(createPutAllMessage(newMap));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (maxInactiveInterval >= 0) {
|
|
|
|
|
map.expire(getMaxInactiveInterval(), TimeUnit.SECONDS);
|
|
|
|
|
}
|
|
|
|
|
expireSession();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void load(Map<String, Object> attrs) {
|
|
|
|
|