org.springframework.session.data.gemfire

## Class AbstractGemFireOperationsSessionRepository.GemFireSession

- java.lang.Object
- - org.springframework.session.data.gemfire.AbstractGemFireOperationsSessionRepository.GemFireSession

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<org.springframework.session.ExpiringSession>, org.apache.geode.DataSerializable, org.apache.geode.Delta, org.springframework.session.ExpiringSession, org.springframework.session.Session

Enclosing class:
  AbstractGemFireOperationsSessionRepository

    public static class AbstractGemFireOperationsSessionRepository.GemFireSession
    extends java.lang.Object
    implements java.lang.Comparable<org.springframework.session.ExpiringSession>, org.apache.geode.DataSerializable, org.apache.geode.Delta, org.springframework.session.ExpiringSession

GemFireSession is a GemFire representation model of a Spring `ExpiringSession` that stores and manages Session state information in GemFire. This class implements GemFire's `DataSerializable` interface to better handle replication of Session state information across the GemFire cluster.

See Also:
  Serialized Form

### Nested Class Summary

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

`org.apache.geode.DataSerializable.Replaceable`

### Field Summary

Fields
`protected static boolean` `DEFAULT_ALLOW_JAVA_SERIALIZATION`
`protected static java.lang.String` `SPRING_SECURITY_CONTEXT`
`protected static java.text.DateFormat` `TO_STRING_DATE_FORMAT`

### Constructor Summary

Constructors
`protected` `GemFireSession()`
`protected` `GemFireSession(org.springframework.session.ExpiringSession session)`
`protected` `GemFireSession(java.lang.String id)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`protected boolean` `allowJavaSerialization()`
`int` `compareTo(org.springframework.session.ExpiringSession session)`
`static AbstractGemFireOperationsSessionRepository.GemFireSession` `copy(org.springframework.session.ExpiringSession session)`
`static AbstractGemFireOperationsSessionRepository.GemFireSession` `create(int maxInactiveIntervalInSeconds)`
`boolean` `equals(java.lang.Object obj)`
`static AbstractGemFireOperationsSessionRepository.GemFireSession` `from(org.springframework.session.ExpiringSession session)`
`void` `fromData(java.io.DataInput in)`
`void` `fromDelta(java.io.DataInput in)`
`<T> T` `getAttribute(java.lang.String attributeName)`
`java.util.Set<java.lang.String>` `getAttributeNames()`
`AbstractGemFireOperationsSessionRepository.GemFireSessionAttributes` `getAttributes()`
`long` `getCreationTime()`
`java.lang.String` `getId()`
`long` `getLastAccessedTime()`
`int` `getMaxInactiveIntervalInSeconds()`
`java.lang.String` `getPrincipalName()`
`boolean` `hasDelta()`
`int` `hashCode()`
`boolean` `isExpired()`
`void` `removeAttribute(java.lang.String attributeName)`
`void` `setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)`
`void` `setLastAccessedTime(long lastAccessedTime)`
`void` `setMaxInactiveIntervalInSeconds(int maxInactiveIntervalInSeconds)`
`void` `setPrincipalName(java.lang.String principalName)`
`void` `toData(java.io.DataOutput out)`
`void` `toDelta(java.io.DataOutput out)`
`java.lang.String` `toString()`

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

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

### Field Detail

#### DEFAULT_ALLOW_JAVA_SERIALIZATION

    protected static final boolean DEFAULT_ALLOW_JAVA_SERIALIZATION

See Also:
  Constant Field Values

#### TO_STRING_DATE_FORMAT

    protected static final java.text.DateFormat TO_STRING_DATE_FORMAT

#### SPRING_SECURITY_CONTEXT

    protected static final java.lang.String SPRING_SECURITY_CONTEXT

See Also:
  Constant Field Values

### Constructor Detail

#### GemFireSession

    protected GemFireSession()

#### GemFireSession

    protected GemFireSession(java.lang.String id)

#### GemFireSession

    protected GemFireSession(org.springframework.session.ExpiringSession session)

### Method Detail

#### create

    public static AbstractGemFireOperationsSessionRepository.GemFireSession create(int maxInactiveIntervalInSeconds)

#### copy

    public static AbstractGemFireOperationsSessionRepository.GemFireSession copy(org.springframework.session.ExpiringSession session)

#### from

    public static AbstractGemFireOperationsSessionRepository.GemFireSession from(org.springframework.session.ExpiringSession session)

#### allowJavaSerialization

    protected boolean allowJavaSerialization()

#### getId

    public java.lang.String getId()

Specified by:
  `getId` in interface `org.springframework.session.Session`

#### getCreationTime

    public long getCreationTime()

Specified by:
  `getCreationTime` in interface `org.springframework.session.ExpiringSession`

#### setAttribute

    public void setAttribute(java.lang.String attributeName,
                             java.lang.Object attributeValue)

Specified by:
  `setAttribute` in interface `org.springframework.session.Session`

#### removeAttribute

    public void removeAttribute(java.lang.String attributeName)

Specified by:
  `removeAttribute` in interface `org.springframework.session.Session`

#### getAttribute

    public <T> T getAttribute(java.lang.String attributeName)

Specified by:
  `getAttribute` in interface `org.springframework.session.Session`

#### getAttributeNames

    public java.util.Set<java.lang.String> getAttributeNames()

Specified by:
  `getAttributeNames` in interface `org.springframework.session.Session`

#### getAttributes

    public AbstractGemFireOperationsSessionRepository.GemFireSessionAttributes getAttributes()

#### isExpired

    public boolean isExpired()

Specified by:
  `isExpired` in interface `org.springframework.session.ExpiringSession`

#### setLastAccessedTime

    public void setLastAccessedTime(long lastAccessedTime)

Specified by:
  `setLastAccessedTime` in interface `org.springframework.session.ExpiringSession`

#### getLastAccessedTime

    public long getLastAccessedTime()

Specified by:
  `getLastAccessedTime` in interface `org.springframework.session.ExpiringSession`

#### setMaxInactiveIntervalInSeconds

    public void setMaxInactiveIntervalInSeconds(int maxInactiveIntervalInSeconds)

Specified by:
  `setMaxInactiveIntervalInSeconds` in interface `org.springframework.session.ExpiringSession`

#### getMaxInactiveIntervalInSeconds

    public int getMaxInactiveIntervalInSeconds()

Specified by:
  `getMaxInactiveIntervalInSeconds` in interface `org.springframework.session.ExpiringSession`

#### setPrincipalName

    public void setPrincipalName(java.lang.String principalName)

#### getPrincipalName

    public java.lang.String getPrincipalName()

#### toData

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

Specified by:
  `toData` in interface `org.apache.geode.DataSerializable`
Throws:
  `java.io.IOException`

#### fromData

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

Specified by:
  `fromData` in interface `org.apache.geode.DataSerializable`
Throws:
  `java.lang.ClassNotFoundException`
  `java.io.IOException`

#### hasDelta

    public boolean hasDelta()

Specified by:
  `hasDelta` in interface `org.apache.geode.Delta`

#### toDelta

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

Specified by:
  `toDelta` in interface `org.apache.geode.Delta`
Throws:
  `java.io.IOException`

#### fromDelta

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

Specified by:
  `fromDelta` in interface `org.apache.geode.Delta`
Throws:
  `java.io.IOException`

#### compareTo

    public int compareTo(org.springframework.session.ExpiringSession session)

Specified by:
  `compareTo` in interface `java.lang.Comparable<org.springframework.session.ExpiringSession>`

#### equals

    public boolean equals(java.lang.Object obj)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`