parent
173a5d8724
commit
afcec96a23
|
@ -17,8 +17,8 @@
|
||||||
<Ref id="idMgr"/>
|
<Ref id="idMgr"/>
|
||||||
</Set>
|
</Set>
|
||||||
<Set name="scavengeIntervalSec">600</Set>
|
<Set name="scavengeIntervalSec">600</Set>
|
||||||
<Set name="host">localhost</Set>
|
<Set name="host"><Env name="MEMCACHE_PORT_11211_TCP_ADDR" default="localhost"/></Set>
|
||||||
<Set name="port">11211</Set>
|
<Set name="port"><Env name="MEMCACHE_PORT_11211_TCP_PORT" default="11211"/></Set>
|
||||||
</New>
|
</New>
|
||||||
</Arg>
|
</Arg>
|
||||||
</New>
|
</New>
|
||||||
|
|
|
@ -249,8 +249,8 @@ public class GCloudSessionIdManager extends AbstractSessionIdManager
|
||||||
/**
|
/**
|
||||||
* Ask the datastore if a particular id exists.
|
* Ask the datastore if a particular id exists.
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id the session id to check for existence
|
||||||
* @return
|
* @return true if a session with that id exists, false otherwise
|
||||||
*/
|
*/
|
||||||
protected boolean exists (String id)
|
protected boolean exists (String id)
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ public class GCloudSessionIdManager extends AbstractSessionIdManager
|
||||||
/**
|
/**
|
||||||
* Put a session id into the cluster.
|
* Put a session id into the cluster.
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id the id to mark as in use
|
||||||
*/
|
*/
|
||||||
protected void insert (String id)
|
protected void insert (String id)
|
||||||
{
|
{
|
||||||
|
@ -282,7 +282,7 @@ public class GCloudSessionIdManager extends AbstractSessionIdManager
|
||||||
/**
|
/**
|
||||||
* Remove a session id from the cluster.
|
* Remove a session id from the cluster.
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id the id to remove
|
||||||
*/
|
*/
|
||||||
protected void delete (String id)
|
protected void delete (String id)
|
||||||
{
|
{
|
||||||
|
@ -297,8 +297,8 @@ public class GCloudSessionIdManager extends AbstractSessionIdManager
|
||||||
/**
|
/**
|
||||||
* Generate a unique key from the session id.
|
* Generate a unique key from the session id.
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id the id of the session
|
||||||
* @return
|
* @return a unique key for the session id
|
||||||
*/
|
*/
|
||||||
protected Key makeKey (String id)
|
protected Key makeKey (String id)
|
||||||
{
|
{
|
||||||
|
|
|
@ -440,7 +440,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
|
|
||||||
/** Test if the session is stale
|
/** Test if the session is stale
|
||||||
* @param atTime
|
* @param atTime
|
||||||
* @return
|
* @return true if the session is stale at the time given
|
||||||
*/
|
*/
|
||||||
protected boolean isStale (long atTime)
|
protected boolean isStale (long atTime)
|
||||||
{
|
{
|
||||||
|
@ -449,7 +449,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
|
|
||||||
|
|
||||||
/** Test if the session is dirty
|
/** Test if the session is dirty
|
||||||
* @return
|
* @return true if the dirty flag is set
|
||||||
*/
|
*/
|
||||||
protected boolean isDirty ()
|
protected boolean isDirty ()
|
||||||
{
|
{
|
||||||
|
@ -745,7 +745,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scavenge a session that has expired
|
* Scavenge a session that has expired
|
||||||
* @param e
|
* @param e the session info from datastore
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected void scavengeSession (Entity e)
|
protected void scavengeSession (Entity e)
|
||||||
|
@ -785,7 +785,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
* often.
|
* often.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param sec
|
* @param sec the number of seconds between scavenge cycles
|
||||||
*/
|
*/
|
||||||
public void setScavengeIntervalSec (long sec)
|
public void setScavengeIntervalSec (long sec)
|
||||||
{
|
{
|
||||||
|
@ -1064,8 +1064,8 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
/**
|
/**
|
||||||
* Load a session from the clustered cache.
|
* Load a session from the clustered cache.
|
||||||
*
|
*
|
||||||
* @param key
|
* @param key the unique datastore key for the session
|
||||||
* @return
|
* @return the Session object restored from datastore
|
||||||
*/
|
*/
|
||||||
protected Session load (Key key)
|
protected Session load (Key key)
|
||||||
throws Exception
|
throws Exception
|
||||||
|
@ -1094,7 +1094,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
/**
|
/**
|
||||||
* Save or update the session to the cluster cache
|
* Save or update the session to the cluster cache
|
||||||
*
|
*
|
||||||
* @param session
|
* @param session the session to save to datastore
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected void save (GCloudSessionManager.Session session)
|
protected void save (GCloudSessionManager.Session session)
|
||||||
|
@ -1177,7 +1177,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
/**
|
/**
|
||||||
* Remove the session from the cluster cache.
|
* Remove the session from the cluster cache.
|
||||||
*
|
*
|
||||||
* @param session
|
* @param session the session to delete from datastore
|
||||||
*/
|
*/
|
||||||
protected void delete (GCloudSessionManager.Session session)
|
protected void delete (GCloudSessionManager.Session session)
|
||||||
{
|
{
|
||||||
|
@ -1191,7 +1191,7 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
/**
|
/**
|
||||||
* Invalidate a session for this context with the given id
|
* Invalidate a session for this context with the given id
|
||||||
*
|
*
|
||||||
* @param idInCluster
|
* @param idInCluster the id of the session to invalidate
|
||||||
*/
|
*/
|
||||||
public void invalidateSession (String idInCluster)
|
public void invalidateSession (String idInCluster)
|
||||||
{
|
{
|
||||||
|
@ -1214,9 +1214,9 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
* <li>the virtual hosts</li>
|
* <li>the virtual hosts</li>
|
||||||
* </ol>
|
* </ol>
|
||||||
*
|
*
|
||||||
* @param session
|
* @param session the session for which the key should be created
|
||||||
* @param context
|
* @param context the context to which the session belongs
|
||||||
* @return
|
* @return a unique datastore key for the session
|
||||||
*/
|
*/
|
||||||
protected Key makeKey (Session session, Context context)
|
protected Key makeKey (Session session, Context context)
|
||||||
{
|
{
|
||||||
|
@ -1233,9 +1233,9 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
* <li>the virtual hosts</li>
|
* <li>the virtual hosts</li>
|
||||||
* </ol>
|
* </ol>
|
||||||
*
|
*
|
||||||
* @param session
|
* @param id the id of the session for which the key should be created
|
||||||
* @param context
|
* @param context the context to which the session belongs
|
||||||
* @return
|
* @return a unique datastore key for the session
|
||||||
*/
|
*/
|
||||||
protected Key makeKey (String id, Context context)
|
protected Key makeKey (String id, Context context)
|
||||||
{
|
{
|
||||||
|
@ -1260,8 +1260,8 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
/**
|
/**
|
||||||
* Turn the context path into an acceptable string
|
* Turn the context path into an acceptable string
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context a context
|
||||||
* @return
|
* @return a stringified version of the context
|
||||||
*/
|
*/
|
||||||
private static String getContextPath (ContextHandler.Context context)
|
private static String getContextPath (ContextHandler.Context context)
|
||||||
{
|
{
|
||||||
|
@ -1273,8 +1273,8 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
*
|
*
|
||||||
* Used to help identify the exact session/contextPath.
|
* Used to help identify the exact session/contextPath.
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context a context
|
||||||
* @return 0.0.0.0 if no virtual host is defined
|
* @return a stringified form of the virtual hosts for the context, 0.0.0.0 if none are defined
|
||||||
*/
|
*/
|
||||||
private static String getVirtualHost (ContextHandler.Context context)
|
private static String getVirtualHost (ContextHandler.Context context)
|
||||||
{
|
{
|
||||||
|
@ -1293,8 +1293,8 @@ public class GCloudSessionManager extends AbstractSessionManager
|
||||||
/**
|
/**
|
||||||
* Make an acceptable name from a context path.
|
* Make an acceptable name from a context path.
|
||||||
*
|
*
|
||||||
* @param path
|
* @param path a context path
|
||||||
* @return
|
* @return a stringified form of the context path
|
||||||
*/
|
*/
|
||||||
private static String canonicalize (String path)
|
private static String canonicalize (String path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,6 @@ public class GCloudMemcachedTestServer extends AbstractTestServer
|
||||||
* @param port
|
* @param port
|
||||||
* @param maxInactivePeriod
|
* @param maxInactivePeriod
|
||||||
* @param scavengePeriod
|
* @param scavengePeriod
|
||||||
* @param sessionIdMgrConfig
|
|
||||||
*/
|
*/
|
||||||
public GCloudMemcachedTestServer(int port, int maxInactivePeriod, int scavengePeriod)
|
public GCloudMemcachedTestServer(int port, int maxInactivePeriod, int scavengePeriod)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +50,6 @@ public class GCloudMemcachedTestServer extends AbstractTestServer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param port
|
* @param port
|
||||||
* @param configuration
|
|
||||||
*/
|
*/
|
||||||
public GCloudMemcachedTestServer(int port)
|
public GCloudMemcachedTestServer(int port)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,7 +42,6 @@ public class GCloudTestServer extends AbstractTestServer
|
||||||
* @param port
|
* @param port
|
||||||
* @param maxInactivePeriod
|
* @param maxInactivePeriod
|
||||||
* @param scavengePeriod
|
* @param scavengePeriod
|
||||||
* @param sessionIdMgrConfig
|
|
||||||
*/
|
*/
|
||||||
public GCloudTestServer(int port, int maxInactivePeriod, int scavengePeriod)
|
public GCloudTestServer(int port, int maxInactivePeriod, int scavengePeriod)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +50,6 @@ public class GCloudTestServer extends AbstractTestServer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param port
|
* @param port
|
||||||
* @param configuration
|
|
||||||
*/
|
*/
|
||||||
public GCloudTestServer(int port)
|
public GCloudTestServer(int port)
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class JdbcTestServer extends AbstractTestServer
|
||||||
static int __workers=0;
|
static int __workers=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.jetty.server.session.AbstractTestServer#newSessionIdManager(String)
|
* @see org.eclipse.jetty.server.session.AbstractTestServer#newSessionIdManager(Object)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SessionIdManager newSessionIdManager(Object config)
|
public SessionIdManager newSessionIdManager(Object config)
|
||||||
|
|
Loading…
Reference in New Issue