@Configuration public class GemFireHttpSessionConfiguration extends SpringHttpSessionConfiguration implements org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.annotation.ImportAware
BeanClassLoaderAware
,
Bean
,
Configuration
,
ImportAware
,
GemfireTemplate
,
SpringHttpSessionConfiguration
,
EnableGemFireHttpSession
,
GemFireCache
,
Region
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 java.lang.String |
DEFAULT_GEMFIRE_POOL_NAME
Name of the GemFire
Pool used by the client Region for managing Session state information. |
static java.lang.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 java.lang.String |
DEFAULT_SPRING_SESSION_GEMFIRE_REGION_NAME
The default name of the Gemfire (Client)Cache Region used to store Sessions.
|
protected static java.lang.Class<java.lang.Object> |
SPRING_SESSION_GEMFIRE_REGION_KEY_CONSTRAINT |
protected static java.lang.Class<AbstractGemFireOperationsSessionRepository.GemFireSession> |
SPRING_SESSION_GEMFIRE_REGION_VALUE_CONSTRAINT |
Constructor and Description |
---|
GemFireHttpSessionConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.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 java.lang.String[] |
getIndexableSessionAttributes()
Get the names of all Session attributes that should be indexed by GemFire.
|
protected int |
getMaxInactiveIntervalInSeconds()
Gets the maximum interval in seconds in which a Session can remain inactive before
it is considered expired.
|
protected java.lang.String |
getPoolName()
Returns the name of the GemFire
Pool used by the client Region for managing Sessions
during cache operations involving the server. |
protected com.gemstone.gemfire.cache.RegionShortcut |
getServerRegionShortcut()
Gets the
RegionShortcut used to configure the GemFire Cache Region that
will store Spring Sessions. |
protected java.lang.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 GemFire Index bean on the GemFire cache
Region storing and managing Sessions,
specifically on the 'principalName' property for quick lookup of Sessions by 'principalName'. |
SessionAttributesIndexFactoryBean |
sessionAttributesIndex(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Defines a GemFire Index bean on the GemFire cache
Region storing and managing Sessions,
specifically on all Session attributes for quick lookup and queries on Session attribute names
with a given value. |
GemFireCacheTypeAwareRegionFactoryBean<java.lang.Object,ExpiringSession> |
sessionRegion(com.gemstone.gemfire.cache.GemFireCache gemfireCache,
com.gemstone.gemfire.cache.RegionAttributes<java.lang.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(java.lang.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(java.lang.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 |
setPoolName(java.lang.String poolName)
Sets the name of the GemFire
Pool used by the client Region for managing Sessions
during cache operations involving the server. |
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(java.lang.String springSessionGemFireRegionName)
Sets the name of the Gemfire (Client)Cache Region used to store Sessions.
|
init, sessionEventHttpSessionListenerAdapter, setApplicationContext, setCookieSerializer, setHttpSessionListeners, setHttpSessionStrategy, setServletContext, springSessionRepositoryFilter
public static final int DEFAULT_MAX_INACTIVE_INTERVAL_IN_SECONDS
protected static final java.lang.Class<java.lang.Object> SPRING_SESSION_GEMFIRE_REGION_KEY_CONSTRAINT
protected static final java.lang.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 java.lang.String DEFAULT_GEMFIRE_POOL_NAME
Pool
used by the client Region for managing Session state information.public static final java.lang.String DEFAULT_SPRING_SESSION_GEMFIRE_REGION_NAME
public static final java.lang.String[] DEFAULT_INDEXABLE_SESSION_ATTRIBUTES
public void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
ClassLoader
used to load bean definition class
types in a Spring context.setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
beanClassLoader
- the ClassLoader used by the Spring container to load bean
class types.BeanClassLoaderAware.setBeanClassLoader(ClassLoader)
,
ClassLoader
protected java.lang.ClassLoader getBeanClassLoader()
ClassLoader
used to load bean definition class
types in a Spring context.ClassLoader
public 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.ClientRegionShortcut
protected 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(java.lang.String[] indexableSessionAttributes)
indexableSessionAttributes
- an array of Strings indicating the names of all
Session attributes for which an Index will be created by GemFire.protected java.lang.String[] getIndexableSessionAttributes()
EnableGemFireHttpSession.indexableSessionAttributes()
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 setPoolName(java.lang.String poolName)
Pool
used by the client Region for managing Sessions
during cache operations involving the server.poolName
- the name of a GemFire Pool
.Pool.getName()
protected java.lang.String getPoolName()
Pool
used by the client Region for managing Sessions
during cache operations involving the server.Pool
.Pool.getName()
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.RegionShortcut
protected 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(java.lang.String springSessionGemFireRegionName)
springSessionGemFireRegionName
- a String specifying the name of the GemFire
(Client)Cache Region used to store the Session.protected java.lang.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.ImportAware
importMetadata
- 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<java.lang.Object,ExpiringSession> sessionRegion(com.gemstone.gemfire.cache.GemFireCache gemfireCache, @Qualifier(value="sessionRegionAttributes") com.gemstone.gemfire.cache.RegionAttributes<java.lang.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 of Sessions by 'principalName'.gemfireCache
- a reference to the GemFire cache.IndexFactoryBean
to create an GemFire Index on the 'principalName' property
for Sessions stored in the GemFire cache Region
.IndexFactoryBean
,
GemFireCache
@Bean @DependsOn(value="ClusteredSpringSessions") public SessionAttributesIndexFactoryBean sessionAttributesIndex(com.gemstone.gemfire.cache.GemFireCache gemfireCache)
Region
storing and managing Sessions,
specifically on all Session attributes for quick lookup and queries on Session attribute names
with a given value.gemfireCache
- a reference to the GemFire cache.IndexFactoryBean
to create an GemFire Index on attributes of Sessions
stored in the GemFire cache Region
.IndexFactoryBean
,
GemFireCache