@Documented @Retention(value=RUNTIME) @Target(value=TYPE) @Configuration @Import(value=GemFireHttpSessionConfiguration.class) public @interface EnableGemFireHttpSession
@Configuration class exposing
the SessionRepositoryFilter as a bean named springSessionRepositoryFilter
to back the HttpSession by Apache Geode or Pivotal GemFire.
In order to use this annotation, a single Apache Geode / Pivotal GemFire Cache or ClientCache
instance must be provided.
For example:
@Configuration
@PeerCacheApplication
@EnableGemFireHttpSession
public class PeerCacheHttpSessionConfiguration {
}
Alternatively, Spring Session can be configured to use Apache Geode / Pivotal GemFire as a cache client
with a dedicated Apache Geode / Pivotal GemFire cluster.
For example:
@Configuration
@ClientCacheApplication
@EnableGemFireHttpSession
public class ClientCacheHttpSessionConfiguration {
}
More advanced configurations can extend GemFireHttpSessionConfiguration instead.Cache,
Region,
ClientCache,
Pool,
Configuration,
Import,
Session,
EnableSpringHttpSession,
GemFireHttpSessionConfiguration| Modifier and Type | Optional Element and Description |
|---|---|
org.apache.geode.cache.client.ClientRegionShortcut |
clientRegionShortcut
Defines the
ClientCache Region data management policy. |
java.lang.String[] |
indexableSessionAttributes
Identifies the
Session attributes by name that will be indexed for query operations. |
int |
maxInactiveIntervalInSeconds
Defines the maximum interval in seconds that a
Session can remain inactive before it expires. |
java.lang.String |
poolName
Specifies the name of the specific
Pool used by the client cache Region
(i.e. |
java.lang.String |
regionName
Defines the name of the (client)cache
Region used to store Session state. |
org.apache.geode.cache.RegionShortcut |
serverRegionShortcut
Defines the
Cache Region data management policy. |
java.lang.String |
sessionSerializerBeanName
Defines the bean name of the
SessionSerializer used to serialize Session state
between client and server or to disk when persisting or overflowing Session state. |
public abstract org.apache.geode.cache.client.ClientRegionShortcut clientRegionShortcut
ClientCache Region data management policy.ClientRegionShortcut used to configure the ClientCache Region
data management policy.ClientRegionShortcutpublic abstract java.lang.String[] indexableSessionAttributes
Session attributes by name that will be indexed for query operations.
For instance, find all Sessions in GemFire or Geode having attribute A defined with value X.Strings identifying the names of Session attributes to index.public abstract int maxInactiveIntervalInSeconds
Session can remain inactive before it expires.
Defaults to 1800 seconds, or 30 minutes.Session expires.public abstract java.lang.String poolName
Pool used by the client cache Region
(i.e. ClusteredSpringSessions) when performing cache data access operations.
This is attribute is only used in the client/server topology.Pool to be used by the client cache Region to send Session state
to the cluster of servers.GemFireHttpSessionConfiguration.DEFAULT_POOL_NAMEpublic abstract java.lang.String regionName
Region used to store Session state.String specifying the name of the (client)cace Region
used to store Session state.GemFireHttpSessionConfiguration.DEFAULT_SESSION_REGION_NAMEpublic abstract org.apache.geode.cache.RegionShortcut serverRegionShortcut
Cache Region data management policy.RegionShortcut used to specify and configure the Cache Region
data management policy.RegionShortcutpublic abstract java.lang.String sessionSerializerBeanName
SessionSerializer used to serialize Session state
between client and server or to disk when persisting or overflowing Session state.
The bean referred to by its name must be of type SessionSerializer.
Defaults to SessionDataSerializer.String containing the bean name of the configured SessionSerializer.DataSerializableSessionSerializer,
SessionSerializer