org.apache.geode.modules.session.catalina

## Class DeltaSession7

- java.lang.Object
- - org.apache.catalina.session.StandardSession
  - - org.apache.geode.modules.session.catalina.DeltaSession7

- All Implemented Interfaces:
    java.io.Serializable, javax.servlet.http.HttpSession, org.apache.catalina.Session, DataSerializable, Delta, org.apache.geode.internal.cache.lru.Sizeable, GatewayDelta, DeltaSessionInterface

      public class DeltaSession7
      extends org.apache.catalina.session.StandardSession
      implements DataSerializable, Delta, GatewayDelta, org.apache.geode.internal.cache.lru.Sizeable, DeltaSessionInterface

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.geode.DataSerializable

      `DataSerializable.Replaceable`

  - ### Field Summary

    - ### Fields inherited from class org.apache.catalina.session.StandardSession

      `accessCount, ACTIVITY_CHECK, attributes, authType, creationTime, EMPTY_ARRAY, excludedAttributes, expiring, facade, id, info, isNew, isValid, lastAccessedTime, listeners, manager, maxInactiveInterval, NOT_SERIALIZED, notes, principal, sessionContext, sm, support, thisAccessedTime`

    - ### Fields inherited from interface org.apache.geode.modules.gatewaydelta.GatewayDelta

      `GATEWAY_DELTA_REGION_NAME`

    - ### Fields inherited from interface org.apache.geode.internal.cache.lru.Sizeable

      `PER_OBJECT_OVERHEAD`

    - ### Fields inherited from interface org.apache.catalina.Session

      `SESSION_ACTIVATED_EVENT, SESSION_CREATED_EVENT, SESSION_DESTROYED_EVENT, SESSION_PASSIVATED_EVENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeltaSession7()` Construct a new `Session` associated with no `Manager`.
    `DeltaSession7(org.apache.catalina.Manager manager)` Construct a new Session associated with the specified Manager.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abort()`
    `void` | `applyAttributeEvents(Region<java.lang.String,DeltaSessionInterface> region, java.util.List<org.apache.geode.modules.session.catalina.internal.DeltaSessionAttributeEvent> events)`
    `void` | `commit()`
    `void` | `expire(boolean notify)`
    `void` | `fromData(java.io.DataInput in)` Reads the state of this object as primitive data from the given `DataInput`.
    `void` | `fromDelta(java.io.DataInput in)` This method is invoked on an existing application object when an update is received as a delta.
    `java.lang.Object` | `getAttribute(java.lang.String name)`
    `java.lang.String` | `getContextName()`
    `GatewayDeltaEvent` | `getCurrentGatewayDeltaEvent()`
    `boolean` | `getExpired()`
    `protected Region<java.lang.String,javax.servlet.http.HttpSession>` | `getOperatingRegion()`
    `java.security.Principal` | `getPrincipal()`
    `protected java.util.concurrent.ConcurrentMap<java.lang.String,byte[]>` | `getSerializedAttributes()`
    `javax.servlet.http.HttpSession` | `getSession()` Return the `HttpSession` for which this object is the facade.
    `int` | `getSizeInBytes()`
    `boolean` | `hasDelta()` Returns true if this object has pending changes it can write out.
    `void` | `invalidate()`
    `boolean` | `isCommitEnabled()`
    `void` | `localDestroyAttribute(java.lang.String name)`
    `void` | `localUpdateAttribute(java.lang.String name, java.lang.Object value)`
    `void` | `processExpired()`
    `protected java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object>` | `readInAttributes(java.io.DataInput in)`
    `void` | `removeAttribute(java.lang.String name, boolean notify)`
    `protected byte[]` | `serialize(java.lang.Object obj)`
    `void` | `setAttribute(java.lang.String name, java.lang.Object value, boolean notify)`
    `void` | `setCurrentGatewayDeltaEvent(GatewayDeltaEvent currentGatewayDeltaEvent)`
    `void` | `setMaxInactiveInterval(int interval)`
    `void` | `setOwner(java.lang.Object manager)`
    `void` | `setPrincipal(java.security.Principal principal)`
    `void` | `toData(java.io.DataOutput out)` Writes the state of this object as primitive data to the given `DataOutput`.
    `void` | `toDelta(java.io.DataOutput out)` This method is invoked on an application object at the delta sender, if GemFire determines the presence of a delta by calling `Delta.hasDelta()` on the object.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.catalina.session.StandardSession

      `access, activate, addSessionListener, endAccess, exclude, expire, fireContainerEvent, fireSessionEvent, getAttributeNames, getAuthType, getCreationTime, getId, getIdInternal, getInfo, getLastAccessedTime, getLastAccessedTimeInternal, getManager, getMaxInactiveInterval, getNote, getNoteNames, getServletContext, getSessionContext, getValue, getValueNames, isAttributeDistributable, isNew, isValid, isValidInternal, keys, passivate, putValue, readObject, readObjectData, recycle, removeAttribute, removeAttributeInternal, removeNote, removeSessionListener, removeValue, setAttribute, setAuthType, setCreationTime, setId, setId, setManager, setNew, setNote, setValid, tellNew, writeObject, writeObjectData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.geode.modules.session.catalina.DeltaSessionInterface

      `activate, isValid`

    - ### Methods inherited from interface org.apache.catalina.Session

      `access, addSessionListener, endAccess, expire, getAuthType, getCreationTime, getId, getIdInternal, getInfo, getLastAccessedTime, getLastAccessedTimeInternal, getManager, getMaxInactiveInterval, getNote, getNoteNames, recycle, removeNote, removeSessionListener, setAuthType, setCreationTime, setId, setId, setManager, setNew, setNote, setValid`

- - ### Constructor Detail

    - #### DeltaSession7

          public DeltaSession7()

      Construct a new `Session` associated with no `Manager`. The `Manager` will be assigned later using `setOwner(Object)`.

    - #### DeltaSession7

          public DeltaSession7(org.apache.catalina.Manager manager)

      Construct a new Session associated with the specified Manager.
      Parameters:
        `manager` - The manager with which this Session is associated

  - ### Method Detail

    - #### getSession

          public javax.servlet.http.HttpSession getSession()

      Return the `HttpSession` for which this object is the facade.
      Specified by:
        `getSession` in interface `org.apache.catalina.Session`
      Overrides:
        `getSession` in class `org.apache.catalina.session.StandardSession`

    - #### getPrincipal

          public java.security.Principal getPrincipal()

      Specified by:
        `getPrincipal` in interface `org.apache.catalina.Session`
      Overrides:
        `getPrincipal` in class `org.apache.catalina.session.StandardSession`

    - #### setPrincipal

          public void setPrincipal(java.security.Principal principal)

      Specified by:
        `setPrincipal` in interface `org.apache.catalina.Session`
      Overrides:
        `setPrincipal` in class `org.apache.catalina.session.StandardSession`

    - #### getOperatingRegion

          protected Region<java.lang.String,javax.servlet.http.HttpSession> getOperatingRegion()

    - #### isCommitEnabled

          public boolean isCommitEnabled()

    - #### getCurrentGatewayDeltaEvent

          public GatewayDeltaEvent getCurrentGatewayDeltaEvent()

      Specified by:
        `getCurrentGatewayDeltaEvent` in interface `GatewayDelta`

    - #### setCurrentGatewayDeltaEvent

          public void setCurrentGatewayDeltaEvent(GatewayDeltaEvent currentGatewayDeltaEvent)

      Specified by:
        `setCurrentGatewayDeltaEvent` in interface `GatewayDelta`

    - #### setOwner

          public void setOwner(java.lang.Object manager)

      Specified by:
        `setOwner` in interface `DeltaSessionInterface`

    - #### setAttribute

          public void setAttribute(java.lang.String name,
                                   java.lang.Object value,
                                   boolean notify)

      Overrides:
        `setAttribute` in class `org.apache.catalina.session.StandardSession`

    - #### removeAttribute

          public void removeAttribute(java.lang.String name,
                                      boolean notify)

      Overrides:
        `removeAttribute` in class `org.apache.catalina.session.StandardSession`

    - #### getAttribute

          public java.lang.Object getAttribute(java.lang.String name)

      Specified by:
        `getAttribute` in interface `javax.servlet.http.HttpSession`
      Overrides:
        `getAttribute` in class `org.apache.catalina.session.StandardSession`

    - #### invalidate

          public void invalidate()

      Specified by:
        `invalidate` in interface `javax.servlet.http.HttpSession`
      Overrides:
        `invalidate` in class `org.apache.catalina.session.StandardSession`

    - #### processExpired

          public void processExpired()

      Specified by:
        `processExpired` in interface `DeltaSessionInterface`

    - #### expire

          public void expire(boolean notify)

      Overrides:
        `expire` in class `org.apache.catalina.session.StandardSession`

    - #### setMaxInactiveInterval

          public void setMaxInactiveInterval(int interval)

      Specified by:
        `setMaxInactiveInterval` in interface `javax.servlet.http.HttpSession`
      Specified by:
        `setMaxInactiveInterval` in interface `org.apache.catalina.Session`
      Overrides:
        `setMaxInactiveInterval` in class `org.apache.catalina.session.StandardSession`

    - #### localUpdateAttribute

          public void localUpdateAttribute(java.lang.String name,
                                           java.lang.Object value)

      Specified by:
        `localUpdateAttribute` in interface `DeltaSessionInterface`

    - #### localDestroyAttribute

          public void localDestroyAttribute(java.lang.String name)

      Specified by:
        `localDestroyAttribute` in interface `DeltaSessionInterface`

    - #### applyAttributeEvents

          public void applyAttributeEvents(Region<java.lang.String,DeltaSessionInterface> region,
                                           java.util.List<org.apache.geode.modules.session.catalina.internal.DeltaSessionAttributeEvent> events)

      Specified by:
        `applyAttributeEvents` in interface `DeltaSessionInterface`

    - #### commit

          public void commit()

      Specified by:
        `commit` in interface `DeltaSessionInterface`

    - #### abort

          public void abort()

      Specified by:
        `abort` in interface `DeltaSessionInterface`

    - #### getExpired

          public boolean getExpired()

      Specified by:
        `getExpired` in interface `DeltaSessionInterface`

    - #### getContextName

          public java.lang.String getContextName()

      Specified by:
        `getContextName` in interface `DeltaSessionInterface`

    - #### hasDelta

          public boolean hasDelta()

      Description copied from interface: `Delta`
      Returns true if this object has pending changes it can write out.
      Specified by:
        `hasDelta` in interface `Delta`

    - #### toDelta

          public void toDelta(java.io.DataOutput out)
                       throws java.io.IOException

      Description copied from interface: `Delta`
      This method is invoked on an application object at the delta sender, if GemFire determines the presence of a delta by calling `Delta.hasDelta()` on the object. The delta is written to the `DataOutput` object provided by GemFire. Any delta state should be reset in this method.
      Specified by:
        `toDelta` in interface `Delta`
      Throws:
        `java.io.IOException`

    - #### fromDelta

          public void fromDelta(java.io.DataInput in)
                         throws java.io.IOException,
                                InvalidDeltaException

      Description copied from interface: `Delta`
      This method is invoked on an existing application object when an update is received as a delta. This method throws an `InvalidDeltaException` when the delta in the `DataInput` cannot be applied to the object. GemFire automatically handles an `InvalidDeltaException` by reattempting the update by sending the full application object.
      Specified by:
        `fromDelta` in interface `Delta`
      Throws:
        `java.io.IOException`
        `InvalidDeltaException`

    - #### toData

          public void toData(java.io.DataOutput out)
                      throws java.io.IOException

      Description copied from interface: `DataSerializable`
      Writes the state of this object as primitive data to the given `DataOutput`.

      Since 5.7 it is possible for any method call to the specified `DataOutput` to throw `GemFireRethrowable`. It should not be caught by user code. If it is it must be rethrown.

      Specified by:
        `toData` in interface `DataSerializable`
      Specified by:
        `toData` in interface `DeltaSessionInterface`
      Throws:
        `java.io.IOException` - A problem occurs while writing to `out`

    - #### fromData

          public void fromData(java.io.DataInput in)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException

      Description copied from interface: `DataSerializable`
      Reads the state of this object as primitive data from the given `DataInput`.
      Specified by:
        `fromData` in interface `DataSerializable`
      Specified by:
        `fromData` in interface `DeltaSessionInterface`
      Throws:
        `java.io.IOException` - A problem occurs while reading from `in`
        `java.lang.ClassNotFoundException` - A class could not be loaded while reading from `in`

    - #### readInAttributes

          protected java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> readInAttributes(java.io.DataInput in)
                                                                                                    throws java.io.IOException,
                                                                                                           java.lang.ClassNotFoundException

      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

    - #### getSizeInBytes

          public int getSizeInBytes()

      Specified by:
        `getSizeInBytes` in interface `org.apache.geode.internal.cache.lru.Sizeable`

    - #### getSerializedAttributes

          protected java.util.concurrent.ConcurrentMap<java.lang.String,byte[]> getSerializedAttributes()

    - #### serialize

          protected byte[] serialize(java.lang.Object obj)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `org.apache.catalina.session.StandardSession`