|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.coherence.servlet.AbstractHttpSessionCollection
public abstract class AbstractHttpSessionCollection
An abstract base class from which implementations of HttpSessionCollection can be more easily built.
Nested Class Summary | |
---|---|
static class |
AbstractHttpSessionCollection.ApplicationScopeController A simple implementation of the AttributeScopeController interface that scopes all attributes to the application by prepending the name of the application to all attribute names. |
static class |
AbstractHttpSessionCollection.DistributedController A simple implementation of the SessionDistributionController interface that forces all sessions (and thus their attributes) to be managed in a distributed manner. |
static class |
AbstractHttpSessionCollection.ExitAgent This agent is used to request the other servers in the cluster to unlock the specified session ID. |
static class |
AbstractHttpSessionCollection.ExitObserver This InvocationObserver waits for an ExitAgent to report back that some server in the cluster did have the specified session id locked. |
static class |
AbstractHttpSessionCollection.ExitTask This task is used to unlock a session ID. |
static class |
AbstractHttpSessionCollection.GlobalScopeController A simple implementation of the AttributeScopeController interface that does not scope attributes. |
static class |
AbstractHttpSessionCollection.HybridController A simple implementation of the SessionDistributionController interface that forces all sessions and serializable attributes to be managed in a distributed manner. |
static class |
AbstractHttpSessionCollection.LocalController A simple implementation of the SessionDistributionController interface that forces all sessions (and thus their attributes) to be managed locally. |
Nested classes/interfaces inherited from interface com.tangosol.coherence.servlet.HttpSessionCollection |
---|
HttpSessionCollection.AttributeScopeController, HttpSessionCollection.SessionDistributionController |
Field Summary | |
---|---|
static java.lang.String |
CACHENAME_DEATHCERTS The name of the clustered cache that stores the IDs of "recently departed" sessions. |
static java.lang.String |
CACHENAME_LOCAL_ATTRIBUTES The name of the local cache that stores the session attributes that are not distributed (if there is a distribution controller or attributes are allowed to become local when serialization fails). |
static java.lang.String |
CACHENAME_LOCAL_SESSIONS The name of the local cache that stores the sessions that are not yet distributed (if there is a distribution controller). |
static java.lang.String |
CACHENAME_SESSIONS The name of the clustered cache that stores the sessions. |
static java.lang.String |
CTX_INIT_ALLOW_LOCAL_ATTRIBUTES The configuration property that specifies whether non-serializable attributes should be preserved as local. |
static java.lang.String |
CTX_INIT_APPLICATION_NAME The configuration property that specifies the name of the web application. |
static java.lang.String |
CTX_INIT_CACHENAME_DEATHCERTS The configuration property that overrides the name of the clustered cache that stores the IDs of "recently departed" sessions. |
static java.lang.String |
CTX_INIT_CACHENAME_LOCAL_ATTRIBUTES The configuration property that overrides the name of the local cache that stores non-distributed session attributes when the SessionDistributionController option is implemented. |
static java.lang.String |
CTX_INIT_CACHENAME_LOCAL_SESSIONS The configuration property that overrides the name of the local cache that stores non-distributed sessions when the SessionDistributionController option is implemented. |
static java.lang.String |
CTX_INIT_CACHENAME_SESSIONS The configuration property that overrides the name of the clustered cache that stores the sessions. |
static java.lang.String |
CTX_INIT_DAEMON_ASSUME_LOCALITY True to assume that the sessions in the cache are split across only the servers that are doing reaping. |
static java.lang.String |
CTX_INIT_DIST_CONTROLLER_CLASS The configuration property that specifies an implementation of the SessionDistributionController interface to use. |
static java.lang.String |
CTX_INIT_SCOPE_CONTROLLER_CLASS The configuration property that specifies an implementation of the AttributeScopeController interface to use. |
static java.lang.String |
CTX_INIT_SERVICENAME_OWNERSHIP The configuration property that specifies the name of the invocation service that will be used to manage sticky session ownership. |
static java.lang.String |
CTX_INIT_SESSION_APP_LOCK The configuration property that specifies application level session locking. |
static java.lang.String |
CTX_INIT_SESSION_EXPIRE_SECS The configuration property that overrides the session expirty time. |
static java.lang.String |
CTX_INIT_SESSION_ID_LENGTH The configuration property that overrides the session id length. |
static java.lang.String |
CTX_INIT_SESSION_MEMBER_LOCK The configuration property that specifies member level session locking. |
static java.lang.String |
CTX_INIT_SESSION_STICKY The configuration property that specifies whether sticky sessions optimizations will be used. |
static java.lang.String |
CTX_INIT_SESSION_STRICT_SPEC The configuration property that specifies strict spec adherence. |
static java.lang.String |
CTX_INIT_SESSION_THREAD_LOCK The configuration property that specifies thread level session locking. |
static java.lang.String |
SERVICENAME_OWNERSHIP The name of the clustered invocation service that manages sticky session ownership. |
Constructor Summary | |
---|---|
AbstractHttpSessionCollection() Default constructor (required). |
Method Summary | |
---|---|
void |
activate(java.lang.String sId, javax.servlet.http.HttpSession session) Move the session into an active state, if it is not already. |
void |
addHttpSessionAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener) Sign up the specified listener to receive HttpSessionBindingEvent objects. |
void |
addHttpSessionListener(javax.servlet.http.HttpSessionListener listener) Sign up the specified listener to receive HttpSessionEvent objects. |
HttpSessionModel |
create(javax.servlet.http.HttpSession session) This method creates a new session, returning the session model for the new session. |
void |
destroy(java.lang.String sId) Destroy the specified session. |
protected void |
destroyLocalAttributesCache(java.lang.String sId) Destroy the cache of local-only session attributes for the specified session ID. |
protected java.util.Map |
ensureLocalAttributesCache(java.lang.String sId) Get the cache of local-only session attributes for the specified session ID. |
protected Serializer |
ensureSerializer() Get a serializer that can be used to serialize and deserialize session models and attributes. |
boolean |
enter(java.lang.String sId, boolean fWait) Obtain any necessary ownership for the specified session. |
void |
exit(java.lang.String sId) Release ownership for the specified session. |
void |
flush(java.lang.String sId) In a distributed environment, ensure that any changes to the specified session are flushed. |
protected java.lang.String |
generateSessionId() Generate a potential session ID. |
HttpSessionModel |
get(java.lang.String sId) Obtain the HttpSessionModel for the specified session, or null if it does not exist. |
protected NamedCache |
getActiveCache() Get the cache of active sessions. |
protected NamedCache |
getAppControlCache() Get the cache used to control concurrent access to a session by multiple applications, if application locking is used. |
int |
getAverageModelLifetime() Calculate the average lifetime (in seconds) of session model objects invalidated (either due to expiration or to an explicit invalidation) since the last time statistics were reset. |
int |
getAverageModelSize() Calculate the average size (in bytes) of session model objects placed in the session storage clustered cache since the last time statistics were reset. |
NamedCache |
getClusterCache() Get the cache of existent distributed session models. |
protected static AbstractHttpSessionCollection |
getCollection() Obtain the AbstractHttpSessionCollection that is being used in the current application. |
XmlElement |
getConfig() Determine the current configuration of the object. |
protected long |
getCurrentTime() Determine the current time value in milliseconds. |
NamedCache |
getDeathCertCache() Get the cache of previously used session IDs (IDs of previously existent HttpSessionModel objects). |
int |
getDefaultMaxInactiveInterval() Determine the default maximum interval, in seconds, that a session will be kept alive without any activity. |
protected java.lang.String |
getDescription() Returns a string representation of this object's attributes. |
protected HttpSessionCollection.SessionDistributionController |
getDistributionController() Get the SessionDistributionController for the session collection, if one was specified. |
protected Listeners |
getHttpSessionAttributeListeners() Determine the list of listeners that are registered for session attribute modification events. |
protected Listeners |
getHttpSessionListeners() Determine the list of listeners that are registered for session life cycle events. |
NamedCache |
getLocalAttributesCache() Get the cache of local-only session attributes. |
NamedCache |
getLocalCache() Get the cache of existent local-only session models. |
int |
getMaxModelSize() Return the maximum size (in bytes) of a session model object placed in the session storage clustered cache since the last time statistics were reset. |
int |
getMinModelSize() Return the minimum size (in bytes) of a session model object placed in the session storage clustered cache since the last time statistics were reset. |
protected AbstractHttpSessionModel |
getModel(java.lang.String sId) Obtain the specified session model. |
int |
getModelDeaths() Return the number of session model objects invalidated (either due to expiration or to an explicit invalidation) since the last time statistics were reset. |
int |
getModelUpdates() Return the number of updates to session model objects since the last time statistics were reset. |
protected NamedCache |
getOwnedCache() Get the cache of owned ("locally live") session models. |
protected AbstractHttpSessionModel |
getOwnedModel(java.lang.String sId) Obtain the specified session model that this thread owns, otherwise throw an exception. |
protected HttpSessionCollection.AttributeScopeController |
getScopeController() Get the AttributeScopeController for the session collection, if one was specified. |
int |
getSessionIdLength() Determine the length that session IDs will be created with. |
protected java.lang.String |
getSessionOwnershipInfo(java.lang.String sId) Determine which cluster member (if any) holds the lock for the given session ID. |
NamedCache |
getStickyCache() Get the cache of information about sessions that are stuck to this member, if sticky ownership is used. |
NamedCache |
getStickyExitTaskCache() Get the cache of session ExitTasks for sessions that are stuck to this member, if sticky ownership is used. |
protected InvocationService |
getStickyService() Get the invocation service to use to manage sticky session ownership. |
protected abstract AbstractHttpSessionModel |
instantiateModel(javax.servlet.http.HttpSession session, java.lang.String sId) Factory Method: Instantiate a AbstractHttpSessionModel or subclass thereof. |
boolean |
isActive(java.lang.String sId) Determine if the specified session ID identifies a session that is in the active state. |
protected boolean |
isAllowLocalAttributes() Determine if non-serializable attributes should be preserved as local. |
protected boolean |
isAppLockingEnforced() Determine whether or not two or more applications should be prevented from accessing the same session simultaneously. |
protected boolean |
isAssumeLocality() Determine if it can be assumed that each existent session is managed on a server that is doing reaping, and thus each server can reap only the sessions that are managed on it. |
boolean |
isExistent(java.lang.String sId) Determine if the specified session ID identifies a session that exists. |
protected boolean |
isMemberLockingEnforced() Determine whether or not two or more JVMs should be prevented from accessing the same session simultaneously. |
boolean |
isOwned(java.lang.String sId) Determine if the specified session ID identifies a session that exists and that this thread has ownership for, either by a call to enter(sId) or create() without a corresponding call to exit(sId) . |
boolean |
isOwnershipSticky() Determine if the sticky session ownership option is on. |
boolean |
isStrict() Determine if the Servlet specification is being followed strictly. |
protected boolean |
isStuck(java.lang.String sId) Determine if the specified session is stuck. |
protected boolean |
isThreadLockingEnforced() Determine whether a session should be single threaded (only one request per session accessing the session at a time) or multithreaded (any number of requests accessing the session at a time). |
java.util.Iterator |
iterateIds() Obtain an iterator of the session IDs. |
java.util.Iterator |
iteratePotentiallyExpiredIds() Obtain an iterator of the session IDs that this JVM is responsible for invalidating when the sessions for those IDs have timed out. |
protected boolean |
obtainAppOwnership(java.lang.String sId, boolean fWait) Obtain application ownership for the specified session. |
protected boolean |
obtainClusterOwnership(java.lang.String sId, boolean fWait) Obtain ownership within the cluster for the specified session. |
protected boolean |
obtainThreadOwnership(java.lang.String sId) Obtain thread ownership of the specified session, if necessary. |
protected void |
onModelUpdate(int cb) Notify the session collection that a model of the specified size (in bytes) was updated in the session storage clustered cache. |
void |
passivate(java.lang.String sId) Move the session into a passive state, if it is not already. |
void |
postCreate(javax.servlet.http.HttpSession session) This method is called at the end of the session creation process. |
protected static void |
putBlind(java.util.Map map, java.lang.Object oKey, java.lang.Object oValue) Puts the specified key/value pair into the specified map using the putAll() method, which does not return the previous value and thus may be more efficient in a distributed environment. |
protected void |
releaseAppOwnership(java.lang.String sId) Release application ownership of the specified session. |
void |
releaseCache(NamedCache cache) Release the passed NamedCache instance. |
protected void |
releaseClusterOwnership(java.lang.String sId) Release ownership within the cluster of the specified session. |
protected boolean |
releaseStuckSession(java.lang.String sId, boolean fWait) Determine if the specified session is stuck, and if it is, to release it (or mark it to be released). |
protected void |
releaseThreadOwnership(java.lang.String sId) Release thread ownership of the specified session. |
protected static void |
removeBlind(java.util.Map map, java.lang.Object oKey) Removes the specified key/value pair from the specified map using the keySet().remove() method, which does not return the previous value and thus may be more efficient in a distributed environment. |
void |
removeHttpSessionAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener) Sign off the specified listener so it no longer will receive HttpSessionBindingEvent objects. |
void |
removeHttpSessionListener(javax.servlet.http.HttpSessionListener listener) Sign off the specified listener so it no longer will receive HttpSessionEvent objects. |
void |
resetStatistics() Reset all statistics maintained by this session collection. |
void |
setConfig(XmlElement xml) Specify the configuration for the object. |
void |
shutdown() Notify the session collection that it is being shut down. |
java.lang.String |
toString() Returns a string representation of the object. |
Field Detail |
---|
public static final java.lang.String CTX_INIT_APPLICATION_NAME
public static final java.lang.String CTX_INIT_CACHENAME_SESSIONS
public static final java.lang.String CTX_INIT_CACHENAME_LOCAL_SESSIONS
public static final java.lang.String CTX_INIT_CACHENAME_LOCAL_ATTRIBUTES
public static final java.lang.String CTX_INIT_CACHENAME_DEATHCERTS
public static final java.lang.String CTX_INIT_SESSION_EXPIRE_SECS
public static final java.lang.String CTX_INIT_SESSION_ID_LENGTH
public static final java.lang.String CTX_INIT_SESSION_MEMBER_LOCK
public static final java.lang.String CTX_INIT_SESSION_APP_LOCK
public static final java.lang.String CTX_INIT_SESSION_THREAD_LOCK
public static final java.lang.String CTX_INIT_DAEMON_ASSUME_LOCALITY
public static final java.lang.String CTX_INIT_SESSION_STRICT_SPEC
public static final java.lang.String CTX_INIT_DIST_CONTROLLER_CLASS
public static final java.lang.String CTX_INIT_SCOPE_CONTROLLER_CLASS
public static final java.lang.String CTX_INIT_SESSION_STICKY
public static final java.lang.String CTX_INIT_SERVICENAME_OWNERSHIP
public static final java.lang.String CTX_INIT_ALLOW_LOCAL_ATTRIBUTES
public static final java.lang.String CACHENAME_SESSIONS
public static final java.lang.String CACHENAME_LOCAL_SESSIONS
public static final java.lang.String CACHENAME_LOCAL_ATTRIBUTES
public static final java.lang.String CACHENAME_DEATHCERTS
public static final java.lang.String SERVICENAME_OWNERSHIP
Constructor Detail |
---|
public AbstractHttpSessionCollection()
Method Detail |
---|
protected static AbstractHttpSessionCollection getCollection()
public XmlElement getConfig()
getConfig
in interface XmlConfigurable
public void setConfig(XmlElement xml)
setConfig
in interface XmlConfigurable
xml
- the XML configuration for the objectpublic HttpSessionModel create(javax.servlet.http.HttpSession session)
The session is created with the default timeout, and has an ID that is unique within the domain that the session management layer is configured for (e.g. within the JVM, or within the cluster.)
When the session model is returned, the session state is exists, owned, active. Note that the responsibilities associated with the enter()
method are included as part of the session creation process.
The model will retain the reference to the HttpSession object until it is passivated or destroyed.
create
in interface HttpSessionCollection
session
- the HttpSession object to bind the session model to; used for issuing events; must not be nullpublic void postCreate(javax.servlet.http.HttpSession session)
When this method is called, the session state is exists, owned, active.
postCreate
in interface HttpSessionCollection
session
- the HttpSession object; must not be nullpublic boolean isExistent(java.lang.String sId)
The notion of ownership will affect whether or not the answer can be trusted once the method has returned it. If the ownership state is owned (the current thread called enter(sId)
), then the caller should assume that session still exists. Otherwise, the caller can only assume that the session did exist at the point in time that the call to this method was made.
isExistent
in interface HttpSessionCollection
sId
- the session ID to check for existencepublic void destroy(java.lang.String sId)
This method may only be called on a session that is exists, owned, active.
Session attributes will receive HttpSessionBindingListener as per the Servlet specification.
At the return point from this method, the session state is does not exist. Note that the responsibilities associated with the exit(sId)
method are included as part of the session destruction process.
After this method completes, the model's HttpSession reference will be null.
destroy
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic boolean enter(java.lang.String sId, boolean fWait)
If the session specified by the session ID does not exist, then this method has no effect; no exception is thrown.
This method must support Multiple Possession Semantics, meaning that this method may be invoked multiple times, and each invocation will require a corresponding call to the exit(sId)
method in order to release the ownership.
enter
in interface HttpSessionCollection
sId
- the session ID; must not be nullfWait
- true if the thread should block until the session becomes available; false otherwisepublic boolean isOwned(java.lang.String sId)
enter(sId)
or create()
without a corresponding call to exit(sId)
.isOwned
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic void exit(java.lang.String sId)
enter(sId)
, with the only exceptions being:
enter(sId)
method was never invoked.When ownership state of a new session changes from owned to not owned, the session will no longer be considered new.
If the session specified by the session ID does not exist, then this method has no effect; no exception is thrown.
exit
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic void activate(java.lang.String sId, javax.servlet.http.HttpSession session)
Invoking this method will issue activation events for session attributes that implement the HttpSessionActivationListener interface. The model will retain the reference to the HttpSession object until it is passivated or destroyed.
activate
in interface HttpSessionCollection
sId
- the session ID; must not be nullsession
- the HttpSession object to bind the session model to; used for issuing events; must not be nullpublic boolean isActive(java.lang.String sId)
This method may only be called within the bounds of a call to enter(sId)
and exit(sId)
.
isActive
in interface HttpSessionCollection
sId
- the session ID to check for the active statepublic void passivate(java.lang.String sId)
Invoking this method will issue passivation events for session attributes that implement the HttpSessionActivationListener interface.
After this method completes, the model's HttpSession reference will be null.
passivate
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic java.util.Iterator iterateIds()
The list of IDs is completely dynamic because of the nature of multi-threaded and distributed systems. The fact that an ID is returned from an iterator is no guarantee that the ID is still valid.
iterateIds
in interface HttpSessionCollection
public java.util.Iterator iteratePotentiallyExpiredIds()
This may return an iterator with the same contents as the one returned by the HttpSessionCollection.iterateIds()
method, or it may return an iterator that iterates over a subset of those contents.
The list of IDs is completely dynamic because of the nature of multi-threaded and distributed systems. The fact that an ID is returned from an iterator is no guarantee that the ID is still valid, or that it has expired.
iteratePotentiallyExpiredIds
in interface HttpSessionCollection
public HttpSessionModel get(java.lang.String sId)
This method may only be called within the bounds of a call to enter(sId)
and exit(sId)
.
get
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic void flush(java.lang.String sId)
This method may only be called within the bounds of a call to enter(sId)
and exit(sId)
.
flush
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic void addHttpSessionListener(javax.servlet.http.HttpSessionListener listener)
addHttpSessionListener
in interface HttpSessionCollection
listener
- the HttpSessionListener to sign up for eventspublic void removeHttpSessionListener(javax.servlet.http.HttpSessionListener listener)
removeHttpSessionListener
in interface HttpSessionCollection
listener
- the HttpSessionListener that was previously signed up for eventspublic void addHttpSessionAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener)
addHttpSessionAttributeListener
in interface HttpSessionCollection
listener
- the HttpSessionAttributeListener to sign up for eventspublic void removeHttpSessionAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener)
removeHttpSessionAttributeListener
in interface HttpSessionCollection
listener
- the HttpSessionAttributeListener that was previously signed up for eventspublic void shutdown()
shutdown
in interface HttpSessionCollection
public java.lang.String toString()
protected Listeners getHttpSessionListeners()
protected Listeners getHttpSessionAttributeListeners()
public boolean isStrict()
public int getDefaultMaxInactiveInterval()
protected boolean isMemberLockingEnforced()
protected boolean isAppLockingEnforced()
Note that application-level locking requires that member-level session locking is enabled. In other words, if this method returns true, the value of isMemberLockingEnforced()
will also be true.
protected boolean isThreadLockingEnforced()
Note that a single threaded session requires that both member-level and application-level session locking are enabled. In other words, if this method returns true, the value of isMemberLockingEnforced()
and isAppLockingEnforced()
will also be true.
protected long getCurrentTime()
protected java.lang.String getDescription()
protected Serializer ensureSerializer()
public NamedCache getStickyCache()
public NamedCache getStickyExitTaskCache()
protected InvocationService getStickyService()
protected NamedCache getAppControlCache()
protected NamedCache getActiveCache()
protected NamedCache getOwnedCache()
public NamedCache getClusterCache()
protected HttpSessionCollection.SessionDistributionController getDistributionController()
protected HttpSessionCollection.AttributeScopeController getScopeController()
public NamedCache getLocalCache()
public NamedCache getLocalAttributesCache()
protected java.util.Map ensureLocalAttributesCache(java.lang.String sId)
sId
- the session IDprotected void destroyLocalAttributesCache(java.lang.String sId)
sId
- the session IDpublic NamedCache getDeathCertCache()
public boolean isOwnershipSticky()
This is available only if an Enterprise Edition or Grid Edition license is available.
protected boolean isStuck(java.lang.String sId)
sId
- the session idprotected java.lang.String getSessionOwnershipInfo(java.lang.String sId)
sId
- the session IDprotected boolean obtainClusterOwnership(java.lang.String sId, boolean fWait)
This method assumes that the owned cache is locked for the passed session id.
sId
- the id of the session to obtain ownership forfWait
- true to wait for the session to become available, false to give up immediately if ownership of the session is currently unavailableprotected void releaseClusterOwnership(java.lang.String sId)
This method assumes that the owned cache is locked for the passed session ID.
sId
- the ID of the session to release ownership ofprotected boolean releaseStuckSession(java.lang.String sId, boolean fWait)
sId
- the session id to unstick if it's stuck herefWait
- true to wait for the session to be release or be marked to be released, false to give up immediately if ownership of the session is currently unavailableprotected boolean obtainAppOwnership(java.lang.String sId, boolean fWait)
This method assumes that the owned cache is locked for the passed session ID.
sId
- the ID of the session to obtain ownership forfWait
- true to wait for the session to become available, false to give up immediately if ownership of the session is currently unavailableprotected void releaseAppOwnership(java.lang.String sId)
This method assumes that the owned cache is locked and cluster ownership has been obtained for the passed session ID.
sId
- the ID of the session to release ownership ofprotected boolean obtainThreadOwnership(java.lang.String sId)
If thread locking is enforced this method has no effect and false is returned; otherwise, the given ID is locked in the local owned cache and true is returned. A return value of true implies that releaseThreadOwnership(sId)
must be called when exclusive access to the session is no longer required.
This method may only be called within the bounds of a call to enter(sId)
and exit(sId)
.
sId
- the ID of the session to obtain ownership forprotected void releaseThreadOwnership(java.lang.String sId)
This method may only be called within the bounds of a call to enter(sId)
and exit(sId)
.
sId
- the ID of the session to release ownership ofprotected boolean isAllowLocalAttributes()
This feature is available only if the sticky session ownership option is on and is enforced if a distribution controller is specified.
protected boolean isAssumeLocality()
protected java.lang.String generateSessionId()
public int getSessionIdLength()
protected abstract AbstractHttpSessionModel instantiateModel(javax.servlet.http.HttpSession session, java.lang.String sId)
session
- the session that delegates to this modelsId
- the session IDprotected AbstractHttpSessionModel getOwnedModel(java.lang.String sId)
sId
- the session IDjava.lang.IllegalStateException
- if the model does not exist, or it is not owned by this threadprotected AbstractHttpSessionModel getModel(java.lang.String sId)
sId
- the session IDprotected static void putBlind(java.util.Map map, java.lang.Object oKey, java.lang.Object oValue)
map
- the map to store the key/value pair intooKey
- the key to storeoValue
- the value to storeprotected static void removeBlind(java.util.Map map, java.lang.Object oKey)
map
- the map to remove the key/value pair fromoKey
- the key to removepublic void releaseCache(NamedCache cache)
cache
- a NamedCache instance to release (may be null)public int getAverageModelLifetime()
public int getAverageModelSize()
public int getMaxModelSize()
public int getMinModelSize()
public int getModelDeaths()
public int getModelUpdates()
public void resetStatistics()
protected void onModelUpdate(int cb)
cb
- the size (in bytes) of the session model
|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |