Merge remote-tracking branch 'origin/jetty-9.4.x'
This commit is contained in:
commit
638c9c1193
|
@ -12,6 +12,7 @@
|
||||||
<New class="org.eclipse.jetty.server.session.DefaultSessionCacheFactory">
|
<New class="org.eclipse.jetty.server.session.DefaultSessionCacheFactory">
|
||||||
<Set name="evictionPolicy"><Property name="jetty.session.evictionPolicy" default="-1" /></Set>
|
<Set name="evictionPolicy"><Property name="jetty.session.evictionPolicy" default="-1" /></Set>
|
||||||
<Set name="saveOnInactiveEvict"><Property name="jetty.session.saveOnInactiveEvict" default="false" /></Set>
|
<Set name="saveOnInactiveEvict"><Property name="jetty.session.saveOnInactiveEvict" default="false" /></Set>
|
||||||
|
<Set name="saveOnCreate"><Property name="jetty.session.saveOnCreate" default="false" /></Set>
|
||||||
<Set name="removeUnloadableSessions"><Property name="jetty.session.removeUnloadableSessions" default="false"/></Set>
|
<Set name="removeUnloadableSessions"><Property name="jetty.session.removeUnloadableSessions" default="false"/></Set>
|
||||||
</New>
|
</New>
|
||||||
</Arg>
|
</Arg>
|
|
@ -11,9 +11,10 @@ session-cache
|
||||||
sessions
|
sessions
|
||||||
|
|
||||||
[xml]
|
[xml]
|
||||||
etc/sessions/hash-session-cache.xml
|
etc/sessions/session-cache-hash.xml
|
||||||
|
|
||||||
[ini-template]
|
[ini-template]
|
||||||
#jetty.session.evictionPolicy=-1
|
#jetty.session.evictionPolicy=-1
|
||||||
#jetty.session.saveOnInactiveEvict=false
|
#jetty.session.saveOnInactiveEvict=false
|
||||||
|
#jetty.session.saveOnCreate=false
|
||||||
#jetty.session.removeUnloadableSessions=false
|
#jetty.session.removeUnloadableSessions=false
|
||||||
|
|
|
@ -28,11 +28,36 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
{
|
{
|
||||||
int _evictionPolicy;
|
int _evictionPolicy;
|
||||||
boolean _saveOnInactiveEvict;
|
boolean _saveOnInactiveEvict;
|
||||||
|
boolean _saveOnCreate;
|
||||||
boolean _removeUnloadableSessions;
|
boolean _removeUnloadableSessions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the saveOnCreate
|
||||||
|
*/
|
||||||
|
public boolean isSaveOnCreate()
|
||||||
|
{
|
||||||
|
return _saveOnCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param saveOnCreate the saveOnCreate to set
|
||||||
|
*/
|
||||||
|
public void setSaveOnCreate(boolean saveOnCreate)
|
||||||
|
{
|
||||||
|
_saveOnCreate = saveOnCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public boolean isRemoveUnloadableSessions()
|
public boolean isRemoveUnloadableSessions()
|
||||||
{
|
{
|
||||||
return _removeUnloadableSessions;
|
return _removeUnloadableSessions;
|
||||||
|
@ -41,6 +66,9 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param removeUnloadableSessions
|
||||||
|
*/
|
||||||
public void setRemoveUnloadableSessions(boolean removeUnloadableSessions)
|
public void setRemoveUnloadableSessions(boolean removeUnloadableSessions)
|
||||||
{
|
{
|
||||||
_removeUnloadableSessions = removeUnloadableSessions;
|
_removeUnloadableSessions = removeUnloadableSessions;
|
||||||
|
@ -49,6 +77,9 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public int getEvictionPolicy()
|
public int getEvictionPolicy()
|
||||||
{
|
{
|
||||||
return _evictionPolicy;
|
return _evictionPolicy;
|
||||||
|
@ -57,6 +88,9 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param evictionPolicy
|
||||||
|
*/
|
||||||
public void setEvictionPolicy(int evictionPolicy)
|
public void setEvictionPolicy(int evictionPolicy)
|
||||||
{
|
{
|
||||||
_evictionPolicy = evictionPolicy;
|
_evictionPolicy = evictionPolicy;
|
||||||
|
@ -65,6 +99,9 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public boolean isSaveOnInactiveEvict()
|
public boolean isSaveOnInactiveEvict()
|
||||||
{
|
{
|
||||||
return _saveOnInactiveEvict;
|
return _saveOnInactiveEvict;
|
||||||
|
@ -73,6 +110,9 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param saveOnInactiveEvict
|
||||||
|
*/
|
||||||
public void setSaveOnInactiveEvict(boolean saveOnInactiveEvict)
|
public void setSaveOnInactiveEvict(boolean saveOnInactiveEvict)
|
||||||
{
|
{
|
||||||
_saveOnInactiveEvict = saveOnInactiveEvict;
|
_saveOnInactiveEvict = saveOnInactiveEvict;
|
||||||
|
@ -90,6 +130,7 @@ public class DefaultSessionCacheFactory implements SessionCacheFactory
|
||||||
DefaultSessionCache cache = new DefaultSessionCache(handler);
|
DefaultSessionCache cache = new DefaultSessionCache(handler);
|
||||||
cache.setEvictionPolicy(getEvictionPolicy());
|
cache.setEvictionPolicy(getEvictionPolicy());
|
||||||
cache.setSaveOnInactiveEviction(isSaveOnInactiveEvict());
|
cache.setSaveOnInactiveEviction(isSaveOnInactiveEvict());
|
||||||
|
cache.setSaveOnCreate(isSaveOnCreate());
|
||||||
cache.setRemoveUnloadableSessions(isRemoveUnloadableSessions());
|
cache.setRemoveUnloadableSessions(isRemoveUnloadableSessions());
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue