Issue #6752 - Extensible DefaultSessionCache map implementation
Addressing changes requested from review Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
8788aaef5a
commit
8991b7f452
|
@ -13,6 +13,7 @@
|
|||
|
||||
package org.eclipse.jetty.server.session;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.function.Function;
|
||||
|
@ -52,12 +53,12 @@ public class DefaultSessionCache extends AbstractSessionCache
|
|||
|
||||
/**
|
||||
* @param manager The SessionHandler related to this SessionCache
|
||||
* @param sessionMap The session map implementation to use
|
||||
* @param sessions The session map implementation to use
|
||||
*/
|
||||
public DefaultSessionCache(SessionHandler manager, ConcurrentMap<String, Session> sessionMap)
|
||||
public DefaultSessionCache(SessionHandler manager, ConcurrentMap<String, Session> sessions)
|
||||
{
|
||||
super(manager);
|
||||
this._sessions = sessionMap;
|
||||
_sessions = Objects.requireNonNull(sessions, "Session Map may not be null");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -194,4 +195,11 @@ public class DefaultSessionCache extends AbstractSessionCache
|
|||
{
|
||||
return _sessions.replace(id, oldValue, newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
Objects.requireNonNull(_sessions, "Session Map may not be null");
|
||||
super.doStart();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue