public interface SpringSessionGemFireConfigurer
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.Annotation,
Properties,
Cache,
Region,
RegionShortcut,
ClientCache,
ClientRegionShortcut,
Pool,
Session,
EnableGemFireHttpSession,
GemFireHttpSessionConfiguration,
SessionExpirationPolicy,
SessionSerializer| Modifier and Type | Method and Description |
|---|---|
default org.apache.geode.cache.client.ClientRegionShortcut |
getClientRegionShortcut()
Defines the
ClientCache Region data management policy. |
default boolean |
getExposeConfigurationAsProperties()
Determines whether the configuration for Spring Session using Apache Geode or Pivotal GemFire should be exposed
in the Spring
Environment as Properties. |
default java.lang.String[] |
getIndexableSessionAttributes()
Identifies the
Session attributes by name that will be indexed for query operations. |
default int |
getMaxInactiveIntervalInSeconds()
Defines the maximum interval in seconds that a
Session can remain inactive before it expires. |
default java.lang.String |
getPoolName()
Specifies the name of the specific
Pool used by the ClientCache Region
(i.e. |
default java.lang.String |
getRegionName()
Defines the
name of the (client)cache Region used to store Session state. |
default org.apache.geode.cache.RegionShortcut |
getServerRegionShortcut()
Defines the
Cache Region data management policy. |
default java.lang.String |
getSessionExpirationPolicyBeanName()
Defines the name of the bean referring to the
SessionExpirationPolicy used to configure
the Session expiration logic and strategy. |
default java.lang.String |
getSessionSerializerBeanName()
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. |
default org.apache.geode.cache.client.ClientRegionShortcut getClientRegionShortcut()
ClientCache Region data management policy.
Defaults to ClientRegionShortcut.PROXY.ClientRegionShortcut used to configure the ClientCache Region
data management policy.GemFireHttpSessionConfiguration.DEFAULT_CLIENT_REGION_SHORTCUT,
ClientRegionShortcutdefault boolean getExposeConfigurationAsProperties()
Environment as Properties.
Currently, users may configure Spring Session for Apache Geode or Pivotal GemFire using attributes on this
Annotation, using the well-known and documented Properties
(e.g. spring.session.data.gemfire.session.expiration.max-inactive-interval-seconds)
or using the SpringSessionGemFireConfigurer declared as a bean in the Spring application context.
The Properties that are exposed will use the well-known property names that are documented
in this Annotation's attributes.
The values of the resulting Properties follows the precedence as outlined in the documentation:
first any SpringSessionGemFireConfigurer bean defined takes precedence, followed by explicit
Properties declared in Spring Boot application.properties and finally, this
Annotation's attribute values.
Defaults to false.
Use spring.session.data.gemfire.session.configuration.expose in Spring Boot
application.properties.Environment as Properties.default java.lang.String[] getIndexableSessionAttributes()
Session attributes by name that will be indexed for query operations.
For instance, find all Sessions in Apache Geode or Pivotal GemFire having attribute A
defined with value X.
Defaults to empty String array.Strings identifying the names of Session attributes to index.GemFireHttpSessionConfiguration.DEFAULT_INDEXABLE_SESSION_ATTRIBUTESdefault int getMaxInactiveIntervalInSeconds()
Session can remain inactive before it expires.
Defaults to 1800 seconds, or 30 minutes.Session expires.GemFireHttpSessionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL_IN_SECONDSdefault java.lang.String getPoolName()
Pool used by the ClientCache Region
(i.e. ClusteredSpringSessions) when performing cache data access operations.
This is attribute is only used in the client/server topology.
Defaults to gemfirePool.Pool used by the ClientCache Region
to send Session state to the cluster of servers.GemFireHttpSessionConfiguration.DEFAULT_POOL_NAME,
Pool.getName()default java.lang.String getRegionName()
name of the (client)cache Region used to store Session state.
Defaults to ClusteredSpringSessions.String specifying the name of the (client)cache Region
used to store Session state.GemFireHttpSessionConfiguration.DEFAULT_SESSION_REGION_NAME,
Region.getName()default org.apache.geode.cache.RegionShortcut getServerRegionShortcut()
Cache Region data management policy.
Defaults to RegionShortcut.PARTITION.RegionShortcut used to specify and configure the Cache Region
data management policy.GemFireHttpSessionConfiguration.DEFAULT_SERVER_REGION_SHORTCUT,
RegionShortcutdefault java.lang.String getSessionExpirationPolicyBeanName()
SessionExpirationPolicy used to configure
the Session expiration logic and strategy.
The bean referred to by its name must be of type SessionExpirationPolicy.
Defaults to unset.String containing the bean name of the configured SessionExpirationPolicy.GemFireHttpSessionConfiguration.DEFAULT_SESSION_EXPIRATION_POLICY_BEAN_NAME,
SessionExpirationPolicydefault java.lang.String getSessionSerializerBeanName()
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 SessionPdxSerializer.String containing the bean name of the configured SessionSerializer.GemFireHttpSessionConfiguration.DEFAULT_SESSION_SERIALIZER_BEAN_NAME,
PdxSerializableSessionSerializer,
SessionSerializer