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 MonolithicHttpSessionModel

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.coherence.servlet.AbstractHttpSessionModel
              com.tangosol.coherence.servlet.MonolithicHttpSessionModel

All Implemented Interfaces:
  HttpSessionModel, ExternalizableLite, java.io.Externalizable, java.io.Serializable

    public class MonolithicHttpSessionModel

extends AbstractHttpSessionModel

This is an implementation of HttpSessionModel that manages its attribute state in a single ('monolithic') serializable unit, allowing session attributes to safely form graphs while avoiding duplication of objects, yet not being able to optimize attribute serialization and deserialization as a result.

Version:
  Coherence 2.5
Author:
  cp 2004.08.16

Nested Class Summary

Nested classes/interfaces inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionModel
`AbstractHttpSessionModel.AttributeHolder`

Field Summary

Fields inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionModel
`CONFIG_NO_LOCKING, ENTRY_ARRAY, m_fNoLock, MAGIC_V350, STRING_ARRAY`

Constructor Summary
`MonolithicHttpSessionModel()` Default constructor for deserialization.
`MonolithicHttpSessionModel(MonolithicHttpSessionCollection collection, javax.servlet.http.HttpSession session, java.lang.String sId)` Session creation constructor.

Method Summary
`protected java.util.Map` | `ensureAttributeSerializationFailureMap()` Ensure that the map of attributes that cannot be written exists, creating it if necessary, and return it.
`protected void` | `enterWriteAttributes()` Specify that the attributes are now being written.
`protected java.util.Map` | `getAttributeSerializationFailureMap()` Get the map of attributes that cannot be written.
`protected boolean` | `isWritingAttributes()` Determine if the attributes are currently being written.
`protected void` | `leaveWriteAttributes()` Specify that the attributes are no longer being written.
`protected void` | `logAttributeSerializationFailure(AbstractHttpSessionModel.AttributeHolder holder, java.lang.Throwable e)` Log a serialization failure for an attribute holder.
`protected void` | `readAttributes(java.io.DataInput in)` Helper to read the session attributes from a stream.
`protected void` | `setAttributeSerializationFailureMap(java.util.Map mapFailures)` Set the map of attributes that cannot be written.
`java.lang.String` | `toString()` Returns a string representation of the object.
`protected void` | `writeAttributes(java.io.DataOutput out)` Helper to write the session attributes to a stream.

Methods inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionModel
`activate, bind, checkActive, checkUsable, checkValid, discard, enter, exit, extractAttributeName, extractAttributeNames, flush, getActualAttributeMap, getAttribute, getAttributeMap, getAttributeNameArray, getCollection, getCreationTime, getDescription, getHttpSession, getId, getLastAccessedTime, getLastFlushedTime, getLocalAttributeMap, getMaxInactiveInterval, getReferenceCount, getVersion, instantiateAttributeHolder, instantiateAttributeHolder, isActivatableAttributes, isActive, isExpired, isImmutable, isLastAccessTimeFlushRequired, isLocal, isModified, isNew, isOwnedByThisThread, isUsable, isValid, makeDistributed, obtainThreadOwnership, passivate, qualifyAttributeName, readExternal, readExternal, releaseThreadOwnership, removeAttribute, sessionReturned, setActivatableAttributes, setAttribute, setCollection, setHttpSession, setId, setLastAccessedTime, setLastFlushedTime, setMaxInactiveInterval, setModified, setValid, setVersion, touch, unbind, unbind, writeExternal, writeExternal`

Constructor Detail

### MonolithicHttpSessionModel

    public MonolithicHttpSessionModel()

  Default constructor for deserialization.

### MonolithicHttpSessionModel

    public MonolithicHttpSessionModel(MonolithicHttpSessionCollection collection,
                                      javax.servlet.http.HttpSession session,
                                      java.lang.String sId)

  Session creation constructor.

  Parameters:
    `collection` - the collection that manages this model
    `session` - the session that delegates to this model
    `sId` - the session ID

Method Detail

### readAttributes

    protected void readAttributes(java.io.DataInput in)
                           throws java.io.IOException

  Helper to read the session attributes from a stream.

  Overrides:
    `readAttributes` in class `AbstractHttpSessionModel`
  Parameters:
    `in` - the stream to read data from in order to restore the object
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### writeAttributes

    protected void writeAttributes(java.io.DataOutput out)
                            throws java.io.IOException

  Helper to write the session attributes to a stream.

  Overrides:
    `writeAttributes` in class `AbstractHttpSessionModel`
  Parameters:
    `out` - the stream to write the object to
  Throws:
    `java.io.IOException` - if an I/O exception occurs

### enterWriteAttributes

    protected void enterWriteAttributes()

  Specify that the attributes are now being written.

### leaveWriteAttributes

    protected void leaveWriteAttributes()

  Specify that the attributes are no longer being written.

### isWritingAttributes

    protected boolean isWritingAttributes()

  Determine if the attributes are currently being written.

  Returns:
    true if the `writeAttributes(java.io.DataOutput)` processing is occurring

### getAttributeSerializationFailureMap

    protected java.util.Map getAttributeSerializationFailureMap()

  Get the map of attributes that cannot be written. This map should only exist during attribute serialization, and only if failures occur.

  Returns:
    a map of currently accumulating unserializable attributes, or null

### setAttributeSerializationFailureMap

    protected void setAttributeSerializationFailureMap(java.util.Map mapFailures)

  Set the map of attributes that cannot be written. This map should only exist during attribute serialization, and only if failures occur.

  Parameters:
    `mapFailures` - the map

### ensureAttributeSerializationFailureMap

    protected java.util.Map ensureAttributeSerializationFailureMap()

  Ensure that the map of attributes that cannot be written exists, creating it if necessary, and return it.

  Returns:
    a map of currently accumulating unserializable attributes; never null

### logAttributeSerializationFailure

    protected void logAttributeSerializationFailure(AbstractHttpSessionModel.AttributeHolder holder,
                                                    java.lang.Throwable e)

  Log a serialization failure for an attribute holder.

  Overrides:
    `logAttributeSerializationFailure` in class `AbstractHttpSessionModel`
  Parameters:
    `holder` - the attribute holder that failed to serialize its value
    `e` - the throwable object that resulted from the serialization failure

### toString

    public java.lang.String toString()

  Returns a string representation of the object.

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

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.