public abstract class EmbeddedServiceConfigurationSupport extends AbstractAnnotationConfigSupport implements ImportBeanDefinitionRegistrar
EmbeddedServiceConfigurationSupport
class is an abstract base class supporting
the configuration of Pivotal GemFire and Apache Geode embedded services.Map
,
Properties
,
BeanFactory
,
AutowireCapableBeanFactory
,
BeanDefinitionHolder
,
BeanPostProcessor
,
NamedBeanHolder
,
BeanDefinitionBuilder
,
BeanDefinitionRegistry
,
ImportBeanDefinitionRegistrar
,
AnnotationAttributes
,
AnnotationMetadata
,
AbstractCacheConfiguration
,
AbstractAnnotationConfigSupport
Modifier and Type | Class and Description |
---|---|
protected static class |
EmbeddedServiceConfigurationSupport.AbstractGemFirePropertiesConfigurer |
protected static class |
EmbeddedServiceConfigurationSupport.ClientGemFirePropertiesConfigurer |
protected static class |
EmbeddedServiceConfigurationSupport.GemFirePropertiesBeanPostProcessor
Spring
BeanPostProcessor used to process before initialization Pivotal GemFire or Apache Geode
Properties defined as a bean in the Spring application context. |
protected static class |
EmbeddedServiceConfigurationSupport.LocatorGemFirePropertiesConfigurer |
protected static class |
EmbeddedServiceConfigurationSupport.PeerGemFirePropertiesConfigurer |
AbstractAnnotationConfigSupport.TypeResolver<T>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST |
static Integer |
DEFAULT_PORT |
INFRASTRUCTURE_ROLES, ORG_SPRINGFRAMEWORK_DATA_GEMFIRE_PACKAGE, ORG_SPRINGFRAMEWORK_PACKAGE, SPRING_DATA_GEMFIRE_PROPERTY_PREFIX
Constructor and Description |
---|
EmbeddedServiceConfigurationSupport() |
Modifier and Type | Method and Description |
---|---|
protected String |
generateBeanName() |
protected String |
generateBeanName(Class<?> typeQualifier) |
protected String |
generateBeanName(String nameQualifier) |
protected <T extends AbstractCacheConfiguration> |
getCacheConfiguration()
Returns a reference to an instance of the
AbstractCacheConfiguration class used to configure
a GemFire (Singleton, client or peer) cache instance along with it's associated, embedded services. |
protected boolean |
hasProperties(Properties properties) |
protected BeanDefinitionHolder |
newBeanDefinitionHolder(BeanDefinitionBuilder builder) |
void |
registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
BeanDefinitionRegistry registry) |
protected void |
registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
Map<String,Object> annotationAttributes,
BeanDefinitionRegistry registry) |
protected void |
registerClientGemFirePropertiesConfigurer(BeanDefinitionRegistry registry,
Properties gemfireProperties) |
protected void |
registerGemFirePropertiesBeanPostProcessor(BeanDefinitionRegistry registry,
Properties gemFireProperties) |
protected void |
registerGemFirePropertiesConfigurer(BeanDefinitionRegistry registry,
Properties gemfireProperties) |
protected void |
registerLocatorGemFirePropertiesConfigurer(BeanDefinitionRegistry registry,
Properties gemfireProperties) |
protected void |
registerPeerGemFirePropertiesConfigurer(BeanDefinitionRegistry registry,
Properties gemfireProperties) |
protected <T> T |
resolveBean(Class<T> beanType)
Resolves a Spring managed bean with the given
Class type from the Spring BeanFactory . |
protected String |
resolveHost(String hostname) |
protected String |
resolveHost(String hostname,
String defaultHostname) |
protected Integer |
resolvePort(Integer port) |
protected Integer |
resolvePort(Integer port,
Integer defaultPort) |
protected void |
setGemFireProperties(AnnotationMetadata importingClassMetadata,
AnnotationAttributes annotationAttributes,
BeanDefinitionRegistry registry) |
protected abstract Properties |
toGemFireProperties(Map<String,Object> annotationAttributes) |
arrayOfPropertyNamesFor, arrayOfPropertyNamesFor, asArrayProperty, cacheClientProperty, cacheCompressionProperty, cacheOffHeapProperty, cachePeerProperty, cacheProperty, cacheServerProperty, clusterProperty, diskStoreProperty, entitiesProperty, gatewayReceiverProperty, gatewaySenderProperty, getAnnotationAttributes, getAnnotationAttributes, getAnnotationAttributes, getAnnotationType, getAnnotationTypeName, getAnnotationTypeSimpleName, getBeanClassLoader, getBeanFactory, getEnvironment, getEvaluationContext, getLog, hasValue, hasValue, hasValue, httpServiceProperty, isAnnotationPresent, isAnnotationPresent, isNotInfrastructureBean, isNotInfrastructureBean, isNotInfrastructureClass, isNotInfrastructureClass, isNotInfrastructureRole, isUserLevelMethod, locatorProperty, logDebug, logDebug, logError, logError, loggingProperty, logInfo, logInfo, logWarning, logWarning, managementProperty, managerProperty, memcachedServiceProperty, namedCacheServerProperty, namedDiskStoreProperty, namedGatewaySenderProperty, namedPoolProperty, newEvaluationContext, newLog, pdxProperty, poolProperty, propertyName, redisServiceProperty, register, register, requireProperty, resolveAnnotation, resolveBeanClass, resolveBeanClass, resolveBeanClass, resolveBeanClassLoader, resolveBeanClassLoader, resolveBeanClassName, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, resolveProperty, safeResolveType, securityProperty, serviceProperty, setBeanClassLoader, setBeanFactory, setEnvironment, sslProperty, statsProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerBeanDefinitions
public static final Integer DEFAULT_PORT
public static final String DEFAULT_HOST
protected <T extends AbstractCacheConfiguration> T getCacheConfiguration()
AbstractCacheConfiguration
class used to configure
a GemFire (Singleton, client or peer) cache instance along with it's associated, embedded services.T
- Class
type extension of AbstractCacheConfiguration
.AbstractCacheConfiguration
instance.IllegalStateException
- if the AbstractCacheConfiguration
reference was not configured.AbstractCacheConfiguration
public final void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
registerBeanDefinitions
in interface ImportBeanDefinitionRegistrar
protected void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, Map<String,Object> annotationAttributes, BeanDefinitionRegistry registry)
protected void setGemFireProperties(AnnotationMetadata importingClassMetadata, AnnotationAttributes annotationAttributes, BeanDefinitionRegistry registry)
protected abstract Properties toGemFireProperties(Map<String,Object> annotationAttributes)
protected boolean hasProperties(Properties properties)
protected void registerGemFirePropertiesBeanPostProcessor(BeanDefinitionRegistry registry, Properties gemFireProperties)
protected void registerGemFirePropertiesConfigurer(BeanDefinitionRegistry registry, Properties gemfireProperties)
protected void registerClientGemFirePropertiesConfigurer(BeanDefinitionRegistry registry, Properties gemfireProperties)
protected void registerLocatorGemFirePropertiesConfigurer(BeanDefinitionRegistry registry, Properties gemfireProperties)
protected void registerPeerGemFirePropertiesConfigurer(BeanDefinitionRegistry registry, Properties gemfireProperties)
protected BeanDefinitionHolder newBeanDefinitionHolder(BeanDefinitionBuilder builder)
protected String generateBeanName()
protected <T> T resolveBean(Class<T> beanType)
Class
type from the Spring BeanFactory
.
It is assumed that the given typed bean is the only bean of this Class
type. If more than 1 bean
of the given Class
type is found, then the Spring BeanFactory
will throw
a NoUniqueBeanDefinitionException
.
If the BeanFactory
is an instance of AutowireCapableBeanFactory
, then the returned bean
will also be configured.T
- Class
type of the registered Spring managed bean.beanType
- required Class
type of the registered Spring managed bean.Class
type, or null
if no bean instance of the given, required Class
type could be found.BeansException
- if the Spring manage bean of the required Class
type could not be resolved.AbstractAnnotationConfigSupport.getBeanFactory()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.