@Configuration public class GemFireHttpSessionConfiguration extends SpringHttpSessionConfiguration implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.annotation.ImportAware
EnableGemFireHttpSession| Modifier and Type | Field and Description |
|---|---|
static com.gemstone.gemfire.cache.client.ClientRegionShortcut |
DEFAULT_CLIENT_REGION_SHORTCUT
The default
ClientRegionShortcut used to configure the GemFire ClientCache
Region that will store Spring Sessions. |
static String[] |
DEFAULT_INDEXABLE_SESSION_ATTRIBUTES
The default names of all Session attributes that should be indexed by GemFire.
|
static int |
DEFAULT_MAX_INACTIVE_INTERVAL_IN_SECONDS
The default maximum interval in seconds in which a Session can remain inactive
before it is considered expired.
|
static com.gemstone.gemfire.cache.RegionShortcut |
DEFAULT_SERVER_REGION_SHORTCUT
The default
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions. |
static String |
DEFAULT_SPRING_SESSION_GEMFIRE_REGION_NAME
The default name of the Gemfire (Client)Cache Region used to store Sessions.
|
protected static Class<Object> |
SPRING_SESSION_GEMFIRE_REGION_KEY_CONSTRAINT |
protected static Class<AbstractGemFireOperationsSessionRepository.GemFireSession> |
SPRING_SESSION_GEMFIRE_REGION_VALUE_CONSTRAINT |
| Constructor and Description |
|---|
GemFireHttpSessionConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
protected ClassLoader |
getBeanClassLoader()
Gets a reference to the
ClassLoader used to load bean definition class
types in a Spring context. |
protected com.gemstone.gemfire.cache.client.ClientRegionShortcut |
getClientRegionShortcut()
Gets the
ClientRegionShortcut used to configure the GemFire ClientCache
Region that will store Spring Sessions. |
protected String[] |
getIndexableSessionAttributes()
Get the names of all Session attributes that should be indexed by GemFire.
|
protected String |
getIndexableSessionAttributesAsGemFireIndexExpression()
Gets the names of all Session attributes that will be indexed by GemFire as single
String value constituting the Index expression of the Index definition.
|
protected int |
getMaxInactiveIntervalInSeconds()
Gets the maximum interval in seconds in which a Session can remain inactive before
it is considered expired.
|
protected com.gemstone.gemfire.cache.RegionShortcut |
getServerRegionShortcut()
Gets the
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions. |
protected String |
getSpringSessionGemFireRegionName()
Gets the name of the Gemfire (Client)Cache Region used to store Sessions.
|
org.springframework.data.gemfire.IndexFactoryBean |
principalNameIndex(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Defines a Spring GemFire Index bean on the GemFire cache
Region storing and
managing Sessions, specifically on the 'principalName' property for quick lookup
and queries. |
org.springframework.data.gemfire.IndexFactoryBean |
sessionAttributesIndex(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Defines a Spring GemFire Index bean on the GemFire cache
Region storing and
managing Sessions, specifically on Session attributes for quick lookup and queries
on Session attribute names with a given value. |
GemFireCacheTypeAwareRegionFactoryBean<Object,ExpiringSession> |
sessionRegion(com.gemstone.gemfire.cache.GemFireCache gemfireCache,
com.gemstone.gemfire.cache.RegionAttributes<Object,ExpiringSession> sessionRegionAttributes)
Defines a Spring GemFire
Cache Region
bean used to store and manage Sessions using either a client-server or peer-to-peer
(p2p) topology. |
org.springframework.data.gemfire.RegionAttributesFactoryBean |
sessionRegionAttributes(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Defines a Spring GemFire
RegionAttributes bean used to configure and
initialize the GemFire cache Region storing Sessions. |
org.springframework.data.gemfire.GemfireTemplate |
sessionRegionTemplate(com.gemstone.gemfire.cache.GemFireCache gemFireCache)
Defines a Spring GemfireTemplate bean used to interact with GemFire's (Client)Cache
Region storing Sessions. |
GemFireOperationsSessionRepository |
sessionRepository(org.springframework.data.gemfire.GemfireOperations gemfireOperations)
Defines the Spring SessionRepository bean used to interact with GemFire as a Spring
Session provider.
|
void |
setBeanClassLoader(ClassLoader beanClassLoader)
Sets a reference to the
ClassLoader used to load bean definition class
types in a Spring context. |
void |
setClientRegionShortcut(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
Sets the
ClientRegionShortcut used to configure the GemFire ClientCache
Region that will store Spring Sessions. |
void |
setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
Callback with the
AnnotationMetadata of the class containing @Import
annotation that imported this @Configuration class. |
void |
setIndexableSessionAttributes(String[] indexableSessionAttributes)
Sets the names of all Session attributes that should be indexed by GemFire.
|
void |
setMaxInactiveIntervalInSeconds(int maxInactiveIntervalInSeconds)
Sets the maximum interval in seconds in which a Session can remain inactive before
it is considered expired.
|
void |
setServerRegionShortcut(com.gemstone.gemfire.cache.RegionShortcut shortcut)
Sets the
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions. |
void |
setSpringSessionGemFireRegionName(String springSessionGemFireRegionName)
Sets the name of the Gemfire (Client)Cache Region used to store Sessions.
|
sessionEventHttpSessionListenerAdapter, setCookieSerializer, setHttpSessionListeners, setHttpSessionStrategy, setServletContext, springSessionRepositoryFilterpublic static final int DEFAULT_MAX_INACTIVE_INTERVAL_IN_SECONDS
protected static final Class<Object> SPRING_SESSION_GEMFIRE_REGION_KEY_CONSTRAINT
protected static final Class<AbstractGemFireOperationsSessionRepository.GemFireSession> SPRING_SESSION_GEMFIRE_REGION_VALUE_CONSTRAINT
public static final com.gemstone.gemfire.cache.client.ClientRegionShortcut DEFAULT_CLIENT_REGION_SHORTCUT
ClientRegionShortcut used to configure the GemFire ClientCache
Region that will store Spring Sessions.public static final com.gemstone.gemfire.cache.RegionShortcut DEFAULT_SERVER_REGION_SHORTCUT
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions.public static final String DEFAULT_SPRING_SESSION_GEMFIRE_REGION_NAME
public static final String[] DEFAULT_INDEXABLE_SESSION_ATTRIBUTES
public void setBeanClassLoader(ClassLoader beanClassLoader)
ClassLoader used to load bean definition class
types in a Spring context.setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarebeanClassLoader - the ClassLoader used by the Spring container to load bean
class types.BeanClassLoaderAware.setBeanClassLoader(ClassLoader),
ClassLoaderprotected ClassLoader getBeanClassLoader()
ClassLoader used to load bean definition class
types in a Spring context.ClassLoaderpublic void setClientRegionShortcut(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
ClientRegionShortcut used to configure the GemFire ClientCache
Region that will store Spring Sessions.shortcut - the ClientRegionShortcut used to configure the GemFire ClientCache
Region.ClientRegionShortcutprotected com.gemstone.gemfire.cache.client.ClientRegionShortcut getClientRegionShortcut()
ClientRegionShortcut used to configure the GemFire ClientCache
Region that will store Spring Sessions. Defaults to
ClientRegionShortcut.PROXY.ClientRegionShortcut,
EnableGemFireHttpSession.clientRegionShortcut()public void setIndexableSessionAttributes(String[] indexableSessionAttributes)
indexableSessionAttributes - an array of Strings indicating the names of all
Session attributes for which an Index will be created by GemFire.protected String[] getIndexableSessionAttributes()
EnableGemFireHttpSession.indexableSessionAttributes()protected String getIndexableSessionAttributesAsGemFireIndexExpression()
Index.getIndexedExpression()public void setMaxInactiveIntervalInSeconds(int maxInactiveIntervalInSeconds)
maxInactiveIntervalInSeconds - an integer value specifying the maximum
interval in seconds that a Session can remain inactive before it is considered
expired.protected int getMaxInactiveIntervalInSeconds()
EnableGemFireHttpSession.maxInactiveIntervalInSeconds()public void setServerRegionShortcut(com.gemstone.gemfire.cache.RegionShortcut shortcut)
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions.shortcut - the RegionShortcut used to configure the GemFire Cache Region.RegionShortcutprotected com.gemstone.gemfire.cache.RegionShortcut getServerRegionShortcut()
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions. Defaults to RegionShortcut.PARTITION.RegionShortcut,
EnableGemFireHttpSession.serverRegionShortcut()public void setSpringSessionGemFireRegionName(String springSessionGemFireRegionName)
springSessionGemFireRegionName - a String specifying the name of the GemFire
(Client)Cache Region used to store the Session.protected String getSpringSessionGemFireRegionName()
Region.getName(),
EnableGemFireHttpSession.regionName()public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata)
AnnotationMetadata of the class containing @Import
annotation that imported this @Configuration class.setImportMetadata in interface org.springframework.context.annotation.ImportAwareimportMetadata - the AnnotationMetadata of the class importing
this @Configuration class.@Bean public GemFireOperationsSessionRepository sessionRepository(@Qualifier(value="sessionRegionTemplate") org.springframework.data.gemfire.GemfireOperations gemfireOperations)
gemfireOperations - an instance of GemfireOperations used to manage
Spring Sessions in GemFire.@Bean @DependsOn(value="ClusteredSpringSessions") public org.springframework.data.gemfire.GemfireTemplate sessionRegionTemplate(com.gemstone.gemfire.cache.GemFireCache gemFireCache)
Region storing Sessions.gemFireCache - reference to the single GemFire cache instance used by the
GemfireTemplate to perform GemFire cache data access operations.GemfireTemplate used to interact with GemFire's (Client)Cache
Region storing Sessions.GemfireTemplate,
Region@Bean(name="ClusteredSpringSessions") public GemFireCacheTypeAwareRegionFactoryBean<Object,ExpiringSession> sessionRegion(com.gemstone.gemfire.cache.GemFireCache gemfireCache, com.gemstone.gemfire.cache.RegionAttributes<Object,ExpiringSession> sessionRegionAttributes)
Cache Region
bean used to store and manage Sessions using either a client-server or peer-to-peer
(p2p) topology.gemfireCache - a reference to the GemFire
Cache.sessionRegionAttributes - the GemFire RegionAttributes used to
configure the Region.GemFireCacheTypeAwareRegionFactoryBean used to configure and
initialize a GemFire Cache Region for storing and managing Sessions.getClientRegionShortcut(),
getSpringSessionGemFireRegionName(),
getServerRegionShortcut()@Bean public org.springframework.data.gemfire.RegionAttributesFactoryBean sessionRegionAttributes(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
RegionAttributes bean used to configure and
initialize the GemFire cache Region storing Sessions. Expiration is also
configured for the Region on the basis that the GemFire cache
Region is a not a proxy, on either the client or server.gemfireCache - a reference to the GemFire cache.RegionAttributes used to configure and initialize
the GemFire cache Region for storing and managing Sessions.RegionAttributesFactoryBean,
GemFireCache,
PartitionAttributes,
isExpirationAllowed(GemFireCache)@Bean @DependsOn(value="ClusteredSpringSessions") public org.springframework.data.gemfire.IndexFactoryBean principalNameIndex(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Region storing and
managing Sessions, specifically on the 'principalName' property for quick lookup
and queries. This index will only be created on a server @{link Region}.gemfireCache - a reference to the GemFire cache.Region.IndexFactoryBean,
GemFireCache@Bean @DependsOn(value="ClusteredSpringSessions") public org.springframework.data.gemfire.IndexFactoryBean sessionAttributesIndex(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Region storing and
managing Sessions, specifically on Session attributes for quick lookup and queries
on Session attribute names with a given value. This index will only be created on a
server @{link Region}.gemfireCache - a reference to the GemFire cache.Region.IndexFactoryBean,
GemFireCache