Class MonolithicHttpSessionModel

  • All Implemented Interfaces:
    HttpSessionModel, ExternalizableLite, Externalizable, 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
    See Also:
    Serialized Form
    • Constructor Detail

      • MonolithicHttpSessionModel

        public MonolithicHttpSessionModel()
        Default constructor for deserialization.
      • MonolithicHttpSessionModel

        public MonolithicHttpSessionModel​(MonolithicHttpSessionCollection collection,
                                          javax.servlet.http.HttpSession session,
                                          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

      • 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 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​(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 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​(AttributeHolder holder,
                                                        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