public class GCloudMemcachedSessionManager extends GCloudSessionManager
| Modifier and Type | Class and Description |
|---|---|
class |
GCloudMemcachedSessionManager.ContextClassloaderSerializingTranscoder
ContextClassloaderSerializingTranscoder
A xmemcached transcoder that will use the thread context classloader to
resolve classes during object deserialization: necessary for Servlet Spec
classloading order of context classloader first.
|
class |
GCloudMemcachedSessionManager.MemcacheSession
MemcacheSession
Needed to make a constructor public.
|
class |
GCloudMemcachedSessionManager.SerializableSessionData
Every time a Session is put into the cache one of these objects
is created to copy the data out of the in-memory session, and
every time an object is read from the cache one of these objects
a fresh Session object is created based on the data held by this
object.
|
GCloudSessionManager.Scavenger, GCloudSessionManager.Session, GCloudSessionManager.SessionEntityConverterAbstractSessionManager.CookieConfig, AbstractSessionManager.SessionIfAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerContainer.InheritedListener, Container.Listener| Modifier and Type | Field and Description |
|---|---|
protected net.rubyeye.xmemcached.MemcachedClient |
_client |
protected int |
_expirySec |
protected String |
_host |
protected String |
_port |
_ownScheduler, _scavengeIntervalMs, _scavenger, _scheduler, _task, DEFAULT_BACKOFF_MS, DEFAULT_MAX_QUERY_RESULTS, DEFAULT_MAX_RETRIES, DEFAULT_SCAVENGE_SEC, KIND__defaultSessionTrackingModes, __distantFuture, _checkingRemoteSessionIdEncoding, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _secureRequestOnly, _sessionAttributeListeners, _sessionComment, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdListeners, _sessionIdManager, _sessionIdPathParameterName, _sessionIdPathParameterNamePrefix, _sessionListeners, _sessionPath, _sessionsStats, _sessionTimeStats, _sessionTrackingModes, MAX_INACTIVE_MINUTESFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING__CheckRemoteSessionEncoding, __DefaultSessionCookie, __DefaultSessionDomain, __DefaultSessionIdPathParameterName, __MaxAgeProperty, __SessionCookieProperty, __SessionDomainProperty, __SessionIdPathParameterNameProperty, __SessionPathProperty| Constructor and Description |
|---|
GCloudMemcachedSessionManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
delete(GCloudSessionManager.Session session)
Remove the session from the cluster cache.
|
protected void |
deleteFromMemcached(GCloudSessionManager.Session session) |
void |
doStart()
Start the session manager.
|
void |
doStop()
Stop the session manager.
|
int |
getExpirySec() |
String |
getHost() |
String |
getPort() |
protected GCloudSessionManager.Session |
load(com.google.cloud.datastore.Key key)
Load a session from the clustered cache.
|
protected GCloudSessionManager.Session |
loadFromMemcached(String key) |
protected void |
save(GCloudSessionManager.Session session)
Save or update the session to the cluster cache
|
protected void |
saveToMemcached(GCloudSessionManager.Session session)
Store the session into memcached
|
void |
setExpirySec(int expirySec) |
void |
setHeartbeats(boolean heartbeats) |
void |
setHost(String host) |
void |
setPort(String port) |
addSession, canonicalizeKey, getBackoffMs, getMaxResults, getMaxRetries, getScavengeIntervalSec, getSession, getStaleIntervalSec, invalidateSession, makeKey, makeKey, newSession, removeSession, renewSessionId, scavenge, scavengeGCloudDataStore, scavengeSession, setBackoffMs, setDatastore, setMaxResults, setMaxRetries, setScavengeIntervalSec, setStaleIntervalSec, shutdownSessionsaccess, addEventListener, addSession, clearEventListeners, complete, doSessionAttributeListeners, getClusterId, getContext, getContextHandler, getDefaultSessionTrackingModes, getEffectiveSessionTrackingModes, getHttpOnly, getHttpSession, getMaxCookieAge, getMaxInactiveInterval, getMetaManager, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionCookieConfig, getSessionDomain, getSessionHandler, getSessionIdManager, getSessionIdPathParameterName, getSessionIdPathParameterNamePrefix, getSessionPath, getSessions, getSessionsMax, getSessionsTotal, getSessionTimeMax, getSessionTimeMean, getSessionTimeStdDev, getSessionTimeTotal, isCheckingRemoteSessionIdEncoding, isNodeIdInSessionId, isSecureRequestOnly, isUsingCookies, isUsingURLs, isValid, newHttpSession, removeEventListener, removeSession, removeSession, setCheckingRemoteSessionIdEncoding, setHttpOnly, setMaxInactiveInterval, setNodeIdInSessionId, setRefreshCookieAge, setSecureRequestOnly, setSessionCookie, setSessionHandler, setSessionIdManager, setSessionIdPathParameterName, setSessionTrackingModes, setUsingCookies, statsResetaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopprotected String _host
protected String _port
protected net.rubyeye.xmemcached.MemcachedClient _client
protected int _expirySec
public int getExpirySec()
public void setExpirySec(int expirySec)
expirySec - the time in seconds for an item to remain in memcachedpublic void setHeartbeats(boolean heartbeats)
heartbeats - if true memcached heartbeats are enabled. Default is true.public void doStart()
throws Exception
GCloudSessionManagerdoStart in class GCloudSessionManagerExceptionAbstractSessionManager.doStart()public void doStop()
throws Exception
GCloudSessionManagerdoStop in class GCloudSessionManagerExceptionAbstractSessionManager.doStop()protected GCloudSessionManager.Session load(com.google.cloud.datastore.Key key) throws Exception
GCloudSessionManagerload in class GCloudSessionManagerkey - the unique datastore key for the sessionExceptionprotected GCloudSessionManager.Session loadFromMemcached(String key) throws Exception
key - the key for the memcache itemExceptionprotected void save(GCloudSessionManager.Session session) throws Exception
GCloudSessionManagersave in class GCloudSessionManagersession - the session to save to datastoreExceptionprotected void delete(GCloudSessionManager.Session session)
GCloudSessionManagerdelete in class GCloudSessionManagersession - the session to delete from datastoreprotected void deleteFromMemcached(GCloudSessionManager.Session session) throws Exception
Exceptionprotected void saveToMemcached(GCloudSessionManager.Session session) throws Exception
session - the Session to be serializedExceptionpublic String getHost()
public void setHost(String host)
host - the host address of the memcached serverpublic String getPort()
public void setPort(String port)
port - the port of the memcached serverCopyright © 1995–2021 Webtide. All rights reserved.