Interface SpringSessionGemFireConfigurer
public interface SpringSessionGemFireConfigurer
The
SpringSessionGemFireConfigurer
interface defines a contract for programmatically controlling
the configuration of either Apache Geode or Pivotal GemFire as a (HTTP) Session
state management provider
in Spring Session.- Since:
- 1.0.0
- See Also:
-
Annotation
Properties
Cache
Region
RegionShortcut
ClientCache
ClientRegionShortcut
Pool
Session
EnableGemFireHttpSession
GemFireHttpSessionConfiguration
SessionExpirationPolicy
SessionSerializer
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.apache.geode.cache.client.ClientRegionShortcut
Defines theClientCache
Region
data management policy.default boolean
Determines whether the configuration for Spring Session using Apache Geode or Pivotal GemFire should be exposed in the SpringEnvironment
asProperties
.default String[]
Identifies theSession
attributes by name that will be indexed for query operations.default int
Defines the maximum interval in seconds that aSession
can remain inactive before it expires.default String
Specifies the name of the specificPool
used by theClientCache
Region
(i.e.default String
default org.apache.geode.cache.RegionShortcut
Defines theCache
Region
data management policy.default String
Defines the name of the bean referring to theSessionExpirationPolicy
used to configure theSession
expiration logic and strategy.default String
Defines the bean name of theSessionSerializer
used to serializeSession
state between client and server or to disk when persisting or overflowingSession
state.
-
Method Details
-
getClientRegionShortcut
default org.apache.geode.cache.client.ClientRegionShortcut getClientRegionShortcut()Defines theClientCache
Region
data management policy. Defaults toClientRegionShortcut.PROXY
.- Returns:
- a
ClientRegionShortcut
used to configure theClientCache
Region
data management policy. - See Also:
-
GemFireHttpSessionConfiguration.DEFAULT_CLIENT_REGION_SHORTCUT
ClientRegionShortcut
-
getExposeConfigurationAsProperties
default boolean getExposeConfigurationAsProperties()Determines whether the configuration for Spring Session using Apache Geode or Pivotal GemFire should be exposed in the SpringEnvironment
asProperties
. Currently, users may configure Spring Session for Apache Geode or Pivotal GemFire using attributes on thisAnnotation
, using the well-known and documentedProperties
(e.g. spring.session.data.gemfire.session.expiration.max-inactive-interval-seconds) or using theSpringSessionGemFireConfigurer
declared as a bean in the Spring application context. TheProperties
that are exposed will use the well-known propertynames
that are documented in thisAnnotation's
attributes. The values of the resultingProperties
follows the precedence as outlined in the documentation: first anySpringSessionGemFireConfigurer
bean defined takes precedence, followed by explicitProperties
declared in Spring Boot application.properties and finally, thisAnnotation's
attribute values. Defaults to false. Use spring.session.data.gemfire.session.configuration.expose in Spring Boot application.properties.- Returns:
- a boolean value indicating whether to expose the configuration of Spring Session using Apache Geode
or Pivotal GemFire in the Spring
Environment
asProperties
.
-
getIndexableSessionAttributes
Identifies theSession
attributes by name that will be indexed for query operations. For instance, find allSessions
in Apache Geode or Pivotal GemFire having attribute A defined with value X. Defaults to emptyString
array.- Returns:
- an array of
Strings
identifying the names ofSession
attributes to index. - See Also:
-
getMaxInactiveIntervalInSeconds
default int getMaxInactiveIntervalInSeconds()Defines the maximum interval in seconds that aSession
can remain inactive before it expires. Defaults to 1800 seconds, or 30 minutes.- Returns:
- an integer value defining the maximum inactive interval in seconds before the
Session
expires. - See Also:
-
getPoolName
Specifies the name of the specificPool
used by theClientCache
Region
(i.e. ClusteredSpringSessions) when performing cache data access operations. This is attribute is only used in the client/server topology. Defaults to gemfirePool.- Returns:
- the name of the
Pool
used by theClientCache
Region
to sendSession
state to the cluster of servers. - See Also:
-
GemFireHttpSessionConfiguration.DEFAULT_POOL_NAME
Pool.getName()
-
getRegionName
Defines thename
of the (client)cacheRegion
used to storeSession
state. Defaults to ClusteredSpringSessions.- Returns:
- a
String
specifying the name of the (client)cacheRegion
used to storeSession
state. - See Also:
-
GemFireHttpSessionConfiguration.DEFAULT_SESSION_REGION_NAME
Region.getName()
-
getServerRegionShortcut
default org.apache.geode.cache.RegionShortcut getServerRegionShortcut()Defines theCache
Region
data management policy. Defaults toRegionShortcut.PARTITION
.- Returns:
- a
RegionShortcut
used to specify and configure theCache
Region
data management policy. - See Also:
-
getSessionExpirationPolicyBeanName
Defines the name of the bean referring to theSessionExpirationPolicy
used to configure theSession
expiration logic and strategy. Thebean
referred to by itsname
must be of typeSessionExpirationPolicy
. Defaults to unset.- Returns:
- a
String
containing the bean name of the configuredSessionExpirationPolicy
. - See Also:
-
getSessionSerializerBeanName
Defines the bean name of theSessionSerializer
used to serializeSession
state between client and server or to disk when persisting or overflowingSession
state. Thebean
referred to by itsname
must be of typeSessionSerializer
. Defaults to SessionPdxSerializer.- Returns:
- a
String
containing the bean name of the configuredSessionSerializer
. - See Also:
-