|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
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
Deprecated. In releases following 3.6 customization will be declarative.
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 Deprecated. In releases following 3.6 customization will be declarative. |
static class |
AbstractHttpSessionCollection.DistributedController Deprecated. In releases following 3.6 customization will be declarative. |
static class |
AbstractHttpSessionCollection.GlobalScopeController Deprecated. In releases following 3.6 customization will be declarative. |
static class |
AbstractHttpSessionCollection.HybridController Deprecated. In releases following 3.6 customization will be declarative. |
static class |
AbstractHttpSessionCollection.LocalController Deprecated. In releases following 3.6 customization will be declarative. |
Nested classes/interfaces inherited from interface com.tangosol.coherence.servlet.HttpSessionCollection |
---|
HttpSessionCollection.AttributeScopeController, HttpSessionCollection.SessionDistributionController |
Field Summary | |
---|---|
static java.lang.String |
CACHENAME_LOCAL_ATTRIBUTES Deprecated. 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 Deprecated. 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 Deprecated. The name of the clustered cache that stores the sessions. |
static java.lang.String |
CTX_INIT_ENABLE_SESSION_ACCESS_DEBUG_LOGGING Deprecated. Configuration property to enable debug logging for Session access. |
static java.lang.String |
CTX_INIT_SESSION_ACCESS_DEBUG_LOGGING_FILTER Deprecated. Configuration property to enable debug logging for Session access. |
static java.lang.String |
SERVICENAME_OWNERSHIP Deprecated. The name of the clustered invocation service that manages sticky session ownership. |
Constructor Summary | |
---|---|
AbstractHttpSessionCollection() Deprecated. Default constructor (required). |
Method Summary | |
---|---|
void |
activate(java.lang.String sId, javax.servlet.http.HttpSession session) Deprecated. Move the session into an active state, if it is not already. |
void |
addHttpSessionAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener) Deprecated. Sign up the specified listener to receive HttpSessionBindingEvent objects. |
void |
addHttpSessionListener(javax.servlet.http.HttpSessionListener listener) Deprecated. Sign up the specified listener to receive HttpSessionEvent objects. |
void |
configure(XmlElement xml, SessionHelper sessionHelper) Deprecated. Configure the session collection using the xml document. |
HttpSessionModel |
create(javax.servlet.http.HttpSession session) Deprecated. This method creates a new session, returning the session model for the new session. |
AbstractHttpSessionModel |
create(javax.servlet.http.HttpSession session, java.lang.String sId) Deprecated. This method attempts to create a new session with a specific ID, returning the session model for the new session. |
protected void |
deleteModelFromLocalCaches(java.lang.String sId) Deprecated. |
void |
destroy(java.lang.String sId) Deprecated. Destroy the specified session. |
protected void |
destroyLocalAttributesCache(java.lang.String sId) Deprecated. Destroy the cache of local-only session attributes for the specified session ID. |
protected java.util.Map |
ensureLocalAttributesCache(java.lang.String sId) Deprecated. Get the cache of local-only session attributes for the specified session ID. |
boolean |
enter(java.lang.String sId, boolean fWait) Deprecated. Obtain any necessary ownership for the specified session. |
boolean |
enter(java.lang.String sId, boolean fWait, boolean fExclusive) Deprecated. Obtain any necessary ownership for the specified session. |
void |
exit(java.lang.String sId, boolean fFlush) Deprecated. Release ownership for the specified session. |
void |
exit(java.lang.String sId, boolean fFlush, boolean fExclusive) Deprecated. Release ownership for the specified session. |
protected void |
fireSessionDestroyedListeners(java.lang.String sId, AbstractHttpSessionModel model) Deprecated. |
protected java.lang.String |
generateSessionId() Deprecated. Generate a potential session ID. |
HttpSessionModel |
get(java.lang.String sId) Deprecated. Obtain the HttpSessionModel for the specified session, or null if it does not exist. |
protected NamedCache |
getActiveCache() Deprecated. Get the cache of active sessions. |
protected NamedCache |
getAppControlCache() Deprecated. Get the cache used to control concurrent access to a session by multiple applications, if application locking is used. |
int |
getAverageModelLifetime() Deprecated. 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() Deprecated. Calculate the average size (in bytes) of session model objects placed in the session storage clustered cache since the last time statistics were reset. |
protected CacheDelegator |
getCacheDelegator() Deprecated. Get the cache delegator. |
NamedCache |
getClusterCache() Deprecated. Get the cache of existent distributed session models. |
protected AbstractHttpSessionCollection |
getCollection() Deprecated. Obtain the AbstractHttpSessionCollection that is being used in the current application. |
XmlElement |
getConfig() Deprecated. Get the XML configuration document. |
protected long |
getCurrentTime() Deprecated. Determine the current time value in milliseconds. |
int |
getDefaultMaxInactiveInterval() Deprecated. Determine the default maximum interval, in seconds, that a session will be kept alive without any activity. |
protected java.lang.String |
getDescription() Deprecated. Returns a string representation of this object's attributes. |
protected HttpSessionCollection.SessionDistributionController |
getDistributionController() Deprecated. Get the SessionDistributionController for the session collection, if one was specified. |
protected Listeners |
getHttpSessionAttributeListeners() Deprecated. Determine the list of listeners that are registered for session attribute modification events. |
protected com.tangosol.coherence.servlet.HttpSessionCollectionConfiguration |
getHttpSessionCollectionConfiguration() Deprecated. Get the instantiated Configuration |
protected Listeners |
getHttpSessionListeners() Deprecated. Determine the list of listeners that are registered for session life cycle events. |
NamedCache |
getLocalAttributesCache() Deprecated. Get the cache of local-only session attributes. |
NamedCache |
getLocalCache() Deprecated. Get the cache of existent local-only session models. |
java.lang.String |
getLocalCacheName() Deprecated. Get the local-only session model cache name |
int |
getMaxModelSize() Deprecated. 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() Deprecated. 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) Deprecated. Obtain the specified session model. |
int |
getModelDeaths() Deprecated. 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() Deprecated. Return the number of updates to session model objects since the last time statistics were reset. |
protected NamedCache |
getOwnedCache() Deprecated. Get the cache of owned ("locally live") session models. |
protected AbstractHttpSessionModel |
getOwnedModel(java.lang.String sId) Deprecated. Obtain the specified session model that this thread owns, otherwise throw an exception. |
protected HttpSessionCollection.AttributeScopeController |
getScopeController() Deprecated. Get the AttributeScopeController for the session collection, if one was specified. |
protected java.lang.String |
getSessionAccessDebugLoggingFilter() Deprecated. Get the Session Access Debug Logging attribute filter |
protected Filter |
getSessionExpiryFilter() Deprecated. Generates a session expiry filter based on the configured factories. |
HttpSessionIdGenerator |
getSessionIdGenerator() Deprecated. Retrieve the HttpSessionIdGenerator used by this session collection to generate session identifiers. |
int |
getSessionIdLength() Deprecated. Determine the length that session IDs will be created with. |
protected Member |
getSessionOwnershipInfo(java.lang.String sId) Deprecated. Determine which cluster member (if any) holds the lock for the given session ID. |
NamedCache |
getStickyCache() Deprecated. Get the cache of information about sessions that are stuck to this member, if sticky ownership is used. |
NamedCache |
getStickyExitTaskCache() Deprecated. Get the cache of session ExitTasks for sessions that are stuck to this member, if sticky ownership is used. |
protected InvocationService |
getStickyService() Deprecated. Get the invocation service to use to manage sticky session ownership. |
protected abstract AbstractHttpSessionModel |
instantiateModel(javax.servlet.http.HttpSession session, java.lang.String sId) Deprecated. Factory Method: Instantiate a AbstractHttpSessionModel or subclass thereof. |
boolean |
isActive(java.lang.String sId) Deprecated. Determine if the specified session ID identifies a session that is in the active state. |
protected boolean |
isAllowLocalAttributes() Deprecated. Determine if non-serializable attributes should be preserved as local. |
protected boolean |
isAppLockingEnforced() Deprecated. Determine whether or not two or more applications should be prevented from accessing the same session simultaneously. |
protected boolean |
isAssumeLocality() Deprecated. 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. |
protected boolean |
isEnableAttributeListenerOptimization() Deprecated. Determines if attribute listeners should be executed if the same instance of a session attribute is being replaced in the session. |
protected boolean |
isEnabledSessionAccessDebugLogging() Deprecated. Determine if Session Access Debug Logging is Enabled |
protected boolean |
isEnableSuspectAttributes() Deprecated. Determine if suspect attributes need special treatment. |
boolean |
isExistent(java.lang.String sId) Deprecated. Determine if the specified session ID identifies a session that exists. |
protected boolean |
isMemberLockingEnforced() Deprecated. Determine whether or not two or more JVMs should be prevented from accessing the same session simultaneously. |
boolean |
isOwned(java.lang.String sId) Deprecated. 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() Deprecated. Determine if the sticky session ownership option is on. |
protected boolean |
isSessionLockingEnforced() Deprecated. Determine whether concurrent access to a session is permitted. |
boolean |
isStrict() Deprecated. Determine if the Servlet specification is being followed strictly. |
protected boolean |
isStuck(java.lang.String sId) Deprecated. Determine if the specified session is stuck. |
protected boolean |
isThreadLockingEnforced() Deprecated. 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() Deprecated. Obtain an iterator of the session IDs. |
java.util.Iterator |
iteratePotentiallyExpiredIds() Deprecated. Obtain an iterator of the session IDs that this JVM is responsible for invalidating when the sessions for those IDs have timed out. |
boolean |
logInvalidationExceptions() Deprecated. Determine whether to log exceptions thrown by the session during invalidation. |
protected boolean |
obtainAppOwnership(java.lang.String sId, boolean fWait) Deprecated. Obtain application ownership for the specified session. |
protected boolean |
obtainClusterOwnership(java.lang.String sId, boolean fWait) Deprecated. Obtain ownership within the cluster for the specified session. |
protected boolean |
obtainThreadOwnership(java.lang.String sId) Deprecated. Obtain thread ownership of the specified session, if necessary. |
protected void |
onModelUpdate(int cb) Deprecated. 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) Deprecated. Move the session into a passive state, if it is not already. |
void |
postCreate(javax.servlet.http.HttpSession session) Deprecated. 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) Deprecated. 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) Deprecated. Release application ownership of the specified session. |
void |
releaseCache(NamedCache cache) Deprecated. Release the passed NamedCache instance. |
protected void |
releaseClusterOwnership(java.lang.String sId) Deprecated. Release ownership within the cluster of the specified session. |
protected boolean |
releaseStuckSession(java.lang.String sId, boolean fWait) Deprecated. 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) Deprecated. Release thread ownership of the specified session. |
protected void |
remapSessionId(AbstractHttpSessionModel model) Deprecated. |
protected static void |
removeBlind(java.util.Map map, java.lang.Object oKey) Deprecated. 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) Deprecated. Sign off the specified listener so it no longer will receive HttpSessionBindingEvent objects. |
void |
removeHttpSessionListener(javax.servlet.http.HttpSessionListener listener) Deprecated. Sign off the specified listener so it no longer will receive HttpSessionEvent objects. |
void |
resetStatistics() Deprecated. Reset all statistics maintained by this session collection. |
protected void |
setCacheDelegator(CacheDelegator cacheDelegator) Deprecated. Set the cache delegator object. |
protected void |
setConfiguration(com.tangosol.coherence.servlet.HttpSessionCollectionConfiguration config) Deprecated. Set the configuration object. |
void |
shutdown() Deprecated. Notify the session collection that it is being shut down. |
java.lang.String |
toString() Deprecated. Returns a string representation of the object. |
protected void |
updateSessionStatitics(java.lang.String sId, AbstractHttpSessionModel model) Deprecated. |
Field Detail |
---|
public static final java.lang.String CTX_INIT_ENABLE_SESSION_ACCESS_DEBUG_LOGGING
SessionHelper.CTX_INIT_ENABLE_SESSION_ACCESS_DEBUG_LOGGING
, Constant Field Valuespublic static final java.lang.String CTX_INIT_SESSION_ACCESS_DEBUG_LOGGING_FILTER
SessionHelper.CTX_INIT_ENABLE_SESSION_ACCESS_DEBUG_LOGGING
, Constant Field Valuespublic 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 SERVICENAME_OWNERSHIP
Constructor Detail |
---|
public AbstractHttpSessionCollection()
Method Detail |
---|
protected AbstractHttpSessionCollection getCollection()
public XmlElement getConfig()
public void configure(XmlElement xml, SessionHelper sessionHelper)
configure
in interface CoherenceHttpSessionCollection
xml
-sessionHelper
-public 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 nullprotected void fireSessionDestroyedListeners(java.lang.String sId, AbstractHttpSessionModel model)
protected void deleteModelFromLocalCaches(java.lang.String sId)
protected void updateSessionStatitics(java.lang.String sId, AbstractHttpSessionModel model)
public 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 enter(java.lang.String sId, boolean fWait, boolean fExclusive)
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 otherwisefExclusive
- if true, prevent other threads from entering the specified session until a corresponding call to HttpSessionCollection.exit(String, boolean, boolean)
is made by the calling threadpublic boolean isOwned(java.lang.String sId)
enter(sId)
or create()
without a corresponding call to exit(sId)
. NOTE! Since an asynchronous exit task could have been scheduled by SessionHelper.requestAsyncOwnership(String)
, this method should not be used to determine if exit should be called or not.
NOTE, since an asynchronous exit task could have been scheduled by SessionHelper.requestAsyncOwnership(String)
, this method should not be used to determine if exit should be called or not.
isOwned
in interface HttpSessionCollection
sId
- the session ID; must not be nullpublic void exit(java.lang.String sId, boolean fFlush)
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 nullfFlush
- pass true if the session has been potentially modified; even then, there's no guarantee that the session state will be flushed if there is another thread that is using the session concurrently. In this case, the last exiting thread will flushpublic void exit(java.lang.String sId, boolean fFlush, boolean fExclusive)
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 nullfFlush
- pass true if the session has been potentially modified; even then, there's no guarantee that the session state will be flushed if there is another thread that is using the session concurrently. In this case, the last exiting thread will flushfExclusive
- if true, a previous call to HttpSessionCollection.enter(String, boolean, boolean)
should have been made where the fExclusive was set to trueprotected void remapSessionId(AbstractHttpSessionModel model)
public 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 logInvalidationExceptions()
public 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
protected Filter getSessionExpiryFilter()
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 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()
protected com.tangosol.coherence.servlet.HttpSessionCollectionConfiguration getHttpSessionCollectionConfiguration()
public boolean isStrict()
public int getDefaultMaxInactiveInterval()
protected boolean isSessionLockingEnforced()
isMemberLockingEnforced()
or isAppLockingEnforced()
or isMemberLockingEnforced()
return true, then so will this method.
If this is set to false, then concurrent access is permitted and the last update wins.
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 boolean isEnabledSessionAccessDebugLogging()
protected java.lang.String getSessionAccessDebugLoggingFilter()
public AbstractHttpSessionModel create(javax.servlet.http.HttpSession session, java.lang.String sId)
The session is created with the default timeout.
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 nullsId
- the session idprotected java.lang.String getDescription()
public NamedCache getStickyCache()
public NamedCache getStickyExitTaskCache()
protected InvocationService getStickyService()
protected NamedCache getAppControlCache()
protected NamedCache getActiveCache()
protected NamedCache getOwnedCache()
public NamedCache getClusterCache()
protected CacheDelegator getCacheDelegator()
protected void setCacheDelegator(CacheDelegator cacheDelegator)
cacheDelegator
-protected void setConfiguration(com.tangosol.coherence.servlet.HttpSessionCollectionConfiguration config)
config
- the configuration object.protected HttpSessionCollection.SessionDistributionController getDistributionController()
protected HttpSessionCollection.AttributeScopeController getScopeController()
public java.lang.String getLocalCacheName()
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 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 Member 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 isEnableSuspectAttributes()
protected boolean isEnableAttributeListenerOptimization()
protected boolean isAssumeLocality()
public int getSessionIdLength()
public HttpSessionIdGenerator getSessionIdGenerator()
protected java.lang.String generateSessionId()
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 Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |