Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.coherence.servlet
Class SplitHttpSessionCollection

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.coherence.servlet.AbstractHttpSessionCollection
              com.tangosol.coherence.servlet.TraditionalHttpSessionCollection
                  com.tangosol.coherence.servlet.SplitHttpSessionCollection

All Implemented Interfaces:
  HttpSessionCollection, XmlConfigurable

    public class SplitHttpSessionCollection

extends TraditionalHttpSessionCollection

An implementation of HttpSessionCollection that manages session objects as multiple units, splitting out larger session attributes into separately managed entries.

The collection uses three configurable named caches to manage its session information in the cluster:

- "session-storage": (See the documentation for the TraditionalHttpSessionCollection.)
- "session-death-certificates": (See the documentation for the TraditionalHttpSessionCollection.)
- "session-overflow": This cache is used to manage the session attributes that are large enough to warrant being "split out" from the core session data.

Version:
  Coherence 2.3
Author:
  cp 2003.08.20

Nested Class Summary

Nested classes/interfaces inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionCollection
`AbstractHttpSessionCollection.ApplicationScopeController, AbstractHttpSessionCollection.DistributedController, AbstractHttpSessionCollection.ExitAgent, AbstractHttpSessionCollection.ExitObserver, AbstractHttpSessionCollection.ExitTask, AbstractHttpSessionCollection.GlobalScopeController, AbstractHttpSessionCollection.HybridController, AbstractHttpSessionCollection.LocalController`

Nested classes/interfaces inherited from interface com.tangosol.coherence.servlet.HttpSessionCollection
`HttpSessionCollection.AttributeScopeController, HttpSessionCollection.SessionDistributionController`

Field Summary
`static java.lang.String` | `CACHENAME_OVERFLOW` The name of the clustered cache that stores the attributes that are too large to store as part of the session objects.
`static java.lang.String` | `CTX_INIT_ATTR_OVERFLOW_THRESHOLD` The configuration property for the "split" model that overrides the length that attributes must be below to be stored inside a session ("embedded") or above which they will be stored in the separated "overflow" cache ("external").
`static java.lang.String` | `CTX_INIT_CACHENAME_OVERFLOW` The configuration property that overrides the name of the clustered cache that stores the "overflowing" (split-out due to size) session attributes.

Fields inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionCollection
`CACHENAME_DEATHCERTS, CACHENAME_LOCAL_ATTRIBUTES, CACHENAME_LOCAL_SESSIONS, CACHENAME_SESSIONS, CTX_INIT_ALLOW_LOCAL_ATTRIBUTES, CTX_INIT_APPLICATION_NAME, CTX_INIT_CACHENAME_DEATHCERTS, CTX_INIT_CACHENAME_LOCAL_ATTRIBUTES, CTX_INIT_CACHENAME_LOCAL_SESSIONS, CTX_INIT_CACHENAME_SESSIONS, CTX_INIT_DAEMON_ASSUME_LOCALITY, CTX_INIT_DIST_CONTROLLER_CLASS, CTX_INIT_SCOPE_CONTROLLER_CLASS, CTX_INIT_SERVICENAME_OWNERSHIP, CTX_INIT_SESSION_APP_LOCK, CTX_INIT_SESSION_EXPIRE_SECS, CTX_INIT_SESSION_ID_LENGTH, CTX_INIT_SESSION_MEMBER_LOCK, CTX_INIT_SESSION_STICKY, CTX_INIT_SESSION_STRICT_SPEC, CTX_INIT_SESSION_THREAD_LOCK, SERVICENAME_OWNERSHIP`

Constructor Summary
`SplitHttpSessionCollection()` Default constructor (required).

Method Summary
`int` | `getAverageExternalAttributeSize()` Calculate the average size (in bytes) of the session attributes stored in the external attribute cache since the last time statistics were reset.
`NamedCache` | `getExternalAttributeCache()` Obtain the cache used to store the large session attributes.
`int` | `getExternalAttributeUpdates()` Return the number of updates to session attributes stored in the external attribute cache since the last time statistics were reset.
`int` | `getMaxExternalAttributeSize()` Return the maximum size (in bytes) of a session attribute stored in the external attribute cache since the last time statistics were reset.
`int` | `getMinExternalAttributeSize()` Determine the minimum size of an attribute such that it is considered "large" and will be stored in a separate "external" or "overflow" cache.
`protected AbstractHttpSessionModel` | `instantiateModel(javax.servlet.http.HttpSession session, java.lang.String sId)` Factory Method: Instantiate a AbstractHttpSessionModel or subclass thereof.
`protected void` | `onExternalAttributeUpdate(int cb)` Notify the session collection that an attribute of the specified size (in bytes) was updated in the external attribute cache.
`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. After this method invocation has been made, the session collection may throw IllegalStateException for any subsequent method invocation made to it.
`java.lang.String` | `toString()` Returns a string representation of the object.

Methods inherited from class com.tangosol.coherence.servlet.TraditionalHttpSessionCollection
`getSerializer, setSerializer`

Methods inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionCollection
`activate, addHttpSessionAttributeListener, addHttpSessionListener, create, destroy, destroyLocalAttributesCache, ensureLocalAttributesCache, enter, exit, generateSessionId, get, getActiveCache, getAppControlCache, getAverageModelLifetime, getAverageModelSize, getClusterCache, getCollection, getConfig, getCurrentTime, getDeathCertCache, getDefaultMaxInactiveInterval, getDescription, getDistributionController, getHttpSessionAttributeListeners, getHttpSessionListeners, getLocalAttributesCache, getLocalCache, getMaxModelSize, getMinModelSize, getModel, getModelDeaths, getModelUpdates, getOwnedCache, getOwnedModel, getScopeController, getSessionIdLength, getSessionOwnershipInfo, getStickyCache, getStickyExitTaskCache, getStickyService, isActive, isAllowLocalAttributes, isAppLockingEnforced, isAssumeLocality, isExistent, isMemberLockingEnforced, isOwned, isOwnershipSticky, isStrict, isStuck, isThreadLockingEnforced, iterateIds, iteratePotentiallyExpiredIds, obtainAppOwnership, obtainClusterOwnership, obtainThreadOwnership, onModelUpdate, passivate, postCreate, putBlind, releaseAppOwnership, releaseCache, releaseClusterOwnership, releaseStuckSession, releaseThreadOwnership, removeBlind, removeHttpSessionAttributeListener, removeHttpSessionListener`

Field Detail

### CTX_INIT_CACHENAME_OVERFLOW

    public static final java.lang.String CTX_INIT_CACHENAME_OVERFLOW

  The configuration property that overrides the name of the clustered cache that stores the "overflowing" (split-out due to size) session attributes. Only used for the "Split" model.

  See Also:
    Constant Field Values

### CTX_INIT_ATTR_OVERFLOW_THRESHOLD

    public static final java.lang.String CTX_INIT_ATTR_OVERFLOW_THRESHOLD

  The configuration property for the "split" model that overrides the length that attributes must be below to be stored inside a session ("embedded") or above which they will be stored in the separated "overflow" cache ("external").

  See Also:
    Constant Field Values

### CACHENAME_OVERFLOW

    public static final java.lang.String CACHENAME_OVERFLOW

  The name of the clustered cache that stores the attributes that are too large to store as part of the session objects.

  See Also:
    Constant Field Values

Constructor Detail

### SplitHttpSessionCollection

    public SplitHttpSessionCollection()

  Default constructor (required).

Method Detail

### shutdown

    public void shutdown()

  Notify the session collection that it is being shut down. After this method invocation has been made, the session collection may throw IllegalStateException for any subsequent method invocation made to it.

  Specified by:
    `shutdown` in interface `HttpSessionCollection`
  Overrides:
    `shutdown` in class `AbstractHttpSessionCollection`

### setConfig

    public void setConfig(XmlElement xml)

  Specify the configuration for the object.

  Specified by:
    `setConfig` in interface `XmlConfigurable`
  Overrides:
    `setConfig` in class `AbstractHttpSessionCollection`
  Parameters:
    `xml` - the XML configuration for the object

### getMinExternalAttributeSize

    public int getMinExternalAttributeSize()

  Determine the minimum size of an attribute such that it is considered "large" and will be stored in a separate "external" or "overflow" cache.

  Returns:
    the length of attributes, above which they will be stored in the external ("overflow") cache

### getExternalAttributeCache

    public NamedCache getExternalAttributeCache()

  Obtain the cache used to store the large session attributes.

  Returns:
    the external cache used to store large session attributes

### toString

    public java.lang.String toString()

  Returns a string representation of the object.

  Overrides:
    `toString` in class `TraditionalHttpSessionCollection`
  Returns:
    a string representation of the object

### instantiateModel

    protected AbstractHttpSessionModel instantiateModel(javax.servlet.http.HttpSession session,
                                                        java.lang.String sId)

  Factory Method: Instantiate a AbstractHttpSessionModel or subclass thereof.

  Overrides:
    `instantiateModel` in class `TraditionalHttpSessionCollection`
  Parameters:
    `session` - the session that delegates to this model
    `sId` - the session ID
  Returns:
    a new instance of AbstractHttpSessionModel or subclass thereof

### getAverageExternalAttributeSize

    public int getAverageExternalAttributeSize()

  Calculate the average size (in bytes) of the session attributes stored in the external attribute cache since the last time statistics were reset.

  Returns:
    the average external attribute size (in bytes)

### getMaxExternalAttributeSize

    public int getMaxExternalAttributeSize()

  Return the maximum size (in bytes) of a session attribute stored in the external attribute cache since the last time statistics were reset.

  Returns:
    the maximum external attribute size (in bytes)

### getExternalAttributeUpdates

    public int getExternalAttributeUpdates()

  Return the number of updates to session attributes stored in the external attribute cache since the last time statistics were reset.

  Returns:
    the number of updates to the external attribute cache

### resetStatistics

    public void resetStatistics()

  Reset all statistics maintained by this session collection.

  Overrides:
    `resetStatistics` in class `AbstractHttpSessionCollection`

### onExternalAttributeUpdate

    protected void onExternalAttributeUpdate(int cb)

  Notify the session collection that an attribute of the specified size (in bytes) was updated in the external attribute cache.

  Parameters:
    `cb` - the size (in bytes) of the external attribute

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.