This commit is contained in:
Jan Bartel 2016-12-08 17:16:27 +11:00
parent 8e0725db1c
commit 51855ba45e
1 changed files with 8 additions and 3 deletions

View File

@ -53,11 +53,16 @@ public class SessionData implements Serializable
protected long _accessed; // the time of the last access
protected long _lastAccessed; // the time of the last access excluding this one
protected long _maxInactiveMs;
protected Map<String,Object> _attributes = new ConcurrentHashMap<String, Object>();
protected Map<String,Object> _attributes;
protected boolean _dirty;
protected long _lastSaved; //time in msec since last save
public SessionData (String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
{
this(id, cpath, vhost, created, accessed, lastAccessed, maxInactiveMs, new ConcurrentHashMap<String, Object>());
}
public SessionData (String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs, Map<String,Object> attributes)
{
_id = id;
setContextPath(cpath);
@ -67,8 +72,8 @@ public class SessionData implements Serializable
_lastAccessed = lastAccessed;
_maxInactiveMs = maxInactiveMs;
calcAndSetExpiry();
_attributes = attributes;
}
/**
* Copy the info from the given sessiondata
@ -355,7 +360,7 @@ public class SessionData implements Serializable
_lastNode = in.readUTF(); //last managing node
_expiry = in.readLong();
_maxInactiveMs = in.readLong();
_attributes = (ConcurrentHashMap<String,Object>)in.readObject();
_attributes = (Map<String,Object>)in.readObject();
}
public boolean isExpiredAt (long time)