diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/AddCacheServerConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/AddCacheServerConfiguration.java new file mode 100644 index 00000000..6b6b58bf --- /dev/null +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/AddCacheServerConfiguration.java @@ -0,0 +1,90 @@ +/* + * Copyright 2012 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.springframework.data.gemfire.config.annotation; + +import java.util.Map; + +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; +import org.springframework.core.type.AnnotationMetadata; +import org.springframework.data.gemfire.config.GemfireConstants; +import org.springframework.data.gemfire.server.CacheServerFactoryBean; + +/** + * The AddCacheServerConfiguration class is a Spring {@link ImportBeanDefinitionRegistrar} that registers + * a {@link CacheServerFactoryBean} definition for the {@link com.gemstone.gemfire.cache.server.CacheServer} + * configuration meta-data. + * + * @author John Blum + * @see org.springframework.context.annotation.ImportBeanDefinitionRegistrar + * @see org.springframework.data.gemfire.config.annotation.EnableCacheServer + * @since 1.9.0 + */ +public class AddCacheServerConfiguration implements ImportBeanDefinitionRegistrar { + + /* + * (non-Javadoc) + * @see org.springframework.context.annotation.ImportBeanDefinitionRegistrar#registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry) + */ + @Override + public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { + if (importingClassMetadata.hasAnnotation(EnableCacheServer.class.getName())) { + Map enableCacheServerAttributes = importingClassMetadata.getAnnotationAttributes( + EnableCacheServer.class.getName()); + + addCacheServerFactoryBeanDefinition(enableCacheServerAttributes, registry); + } + } + + /** + * Registers a {@link CacheServerFactoryBean} bean definition for the given {@link EnableCacheServer} annotation + * configuration meta-data. + * + * @param annotationAttributes attributes for the {@link EnableCacheServer} annotation. + * @param registry {@link BeanDefinitionRegistry} used to register the {@link CacheServerFactoryBean} + * bean definition. + * @see org.springframework.beans.factory.support.BeanDefinitionBuilder + * @see org.springframework.beans.factory.support.BeanDefinitionRegistry + * @see org.springframework.data.gemfire.server.CacheServerFactoryBean + */ + protected void addCacheServerFactoryBeanDefinition(Map annotationAttributes, + BeanDefinitionRegistry registry) { + + BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CacheServerFactoryBean.class); + + builder.addPropertyReference("cache", GemfireConstants.DEFAULT_GEMFIRE_CACHE_NAME); + builder.addPropertyValue("autoStartup", annotationAttributes.get("autoStartup")); + builder.addPropertyValue("bindAddress", annotationAttributes.get("bindAddress")); + builder.addPropertyValue("hostNameForClients", annotationAttributes.get("hostnameForClients")); + builder.addPropertyValue("loadPollInterval", annotationAttributes.get("loadPollInterval")); + builder.addPropertyValue("maxConnections", annotationAttributes.get("maxConnections")); + builder.addPropertyValue("maxMessageCount", annotationAttributes.get("maxMessageCount")); + builder.addPropertyValue("maxThreads", annotationAttributes.get("maxThreads")); + builder.addPropertyValue("maxTimeBetweenPings", annotationAttributes.get("maxTimeBetweenPings")); + builder.addPropertyValue("messageTimeToLive", annotationAttributes.get("messageTimeToLive")); + builder.addPropertyValue("port", annotationAttributes.get("port")); + builder.addPropertyValue("socketBufferSize", annotationAttributes.get("socketBufferSize")); + builder.addPropertyValue("subscriptionCapacity", annotationAttributes.get("subscriptionCapacity")); + builder.addPropertyValue("subscriptionDiskStore", annotationAttributes.get("subscriptionDiskStoreName")); + builder.addPropertyValue("subscriptionEvictionPolicy", annotationAttributes.get("subscriptionEvictionPolicy")); + + BeanDefinitionReaderUtils.registerWithGeneratedName(builder.getBeanDefinition(), registry); + } +} diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/AddCacheServersConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/AddCacheServersConfiguration.java new file mode 100644 index 00000000..61b8d557 --- /dev/null +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/AddCacheServersConfiguration.java @@ -0,0 +1,56 @@ +/* + * Copyright 2012 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.springframework.data.gemfire.config.annotation; + +import java.util.Map; + +import org.springframework.beans.factory.support.BeanDefinitionRegistry; +import org.springframework.core.annotation.AnnotationAttributes; +import org.springframework.core.type.AnnotationMetadata; + +/** + * The AddCacheServersConfiguration class registers {@link org.springframework.data.gemfire.server.CacheServerFactoryBean} + * bean definitions for all {@link EnableCacheServer} annotation configuration meta-data defined in + * the {@link EnableCacheServers} annotation on the GemFire cache application class. + * + * @author John Blum + * @see org.springframework.data.gemfire.config.annotation.AddCacheServerConfiguration + * @see org.springframework.data.gemfire.config.annotation.EnableCacheServers + * @since 1.9.0 + */ +public class AddCacheServersConfiguration extends AddCacheServerConfiguration { + + /* + * (non-Javadoc) + * @see org.springframework.context.annotation.ImportBeanDefinitionRegistrar#registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry) + */ + @Override + public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { + if (importingClassMetadata.hasAnnotation(EnableCacheServers.class.getName())) { + Map enableCacheServersAttributes = importingClassMetadata.getAnnotationAttributes( + EnableCacheServers.class.getName()); + + AnnotationAttributes[] serversAttributes = + (AnnotationAttributes[]) enableCacheServersAttributes.get("servers"); + + for (AnnotationAttributes enableCacheServerAttributes : serversAttributes) { + addCacheServerFactoryBeanDefinition(enableCacheServerAttributes, registry); + } + } + } +} diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/CacheServerApplication.java b/src/main/java/org/springframework/data/gemfire/config/annotation/CacheServerApplication.java index 863bdfda..54130c3e 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/CacheServerApplication.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/CacheServerApplication.java @@ -50,8 +50,8 @@ import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy; */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -@Documented @Inherited +@Documented @Configuration @Import(CacheServerConfiguration.class) @SuppressWarnings("unused") @@ -69,7 +69,7 @@ public @interface CacheServerApplication { * * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_BIND_ADDRESS */ - String bindAddress() default "localhost"; + String bindAddress() default CacheServer.DEFAULT_BIND_ADDRESS; /** * Indicates whether the "copy on read" is enabled for this cache. diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.java b/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.java index f88feed5..f9e68436 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.java @@ -45,8 +45,8 @@ import org.springframework.data.gemfire.GemfireUtils; */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -@Documented @Inherited +@Documented @Configuration @Import(ClientCacheConfiguration.class) @SuppressWarnings("unused") diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheConfiguration.java index fdc5e5fb..9b50cdd1 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/ClientCacheConfiguration.java @@ -152,8 +152,7 @@ public class ClientCacheConfiguration extends AbstractCacheConfiguration { setSubscriptionEnabled(Boolean.TRUE.equals(clientCacheApplicationAttributes.get("subscriptionEnabled"))); setSubscriptionMessageTrackingTimeout((Integer) clientCacheApplicationAttributes.get("subscriptionMessageTrackingTimeout")); setSubscriptionRedundancy((Integer) clientCacheApplicationAttributes.get("subscriptionRedundancy")); - setThreadLocalConnections(Boolean.TRUE.equals( - clientCacheApplicationAttributes.get("threadLocalConnections"))); + setThreadLocalConnections(Boolean.TRUE.equals(clientCacheApplicationAttributes.get("threadLocalConnections"))); configureLocatorOrServer(clientCacheApplicationAttributes); } diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCacheServer.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCacheServer.java new file mode 100644 index 00000000..c8d46d7f --- /dev/null +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCacheServer.java @@ -0,0 +1,146 @@ +/* + * Copyright 2012 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.springframework.data.gemfire.config.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import com.gemstone.gemfire.cache.server.CacheServer; +import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy; + +/** + * The EnableCacheServer class... + * + * @author John Blum + * @since 1.0.0 + */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +@Documented +@Configuration +@Import(AddCacheServerConfiguration.class) +@SuppressWarnings("unused") +public @interface EnableCacheServer { + + /** + * Configures whether the {@link CacheServer} should start automatically at runtime. + * + * Default is {@literal true). + */ + boolean autoStartup() default true; + + /** + * Configures the ip address or host name that this cache server will listen on. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_BIND_ADDRESS + */ + String bindAddress() default CacheServer.DEFAULT_BIND_ADDRESS; + + /** + * Configures the ip address or host name that server locators will tell clients that this cache server + * is listening on. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_HOSTNAME_FOR_CLIENTS + */ + String hostnameForClients() default CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS; + + /** + * Configures the frequency in milliseconds to poll the load probe on this cache server. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_LOAD_POLL_INTERVAL + */ + long loadPollInterval() default CacheServer.DEFAULT_LOAD_POLL_INTERVAL; + + /** + * Configures the maximum allowed client connections. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_MAX_CONNECTIONS + */ + int maxConnections() default CacheServer.DEFAULT_MAX_CONNECTIONS; + + /** + * Configures he maximum number of messages that can be enqueued in a client-queue. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_MAXIMUM_MESSAGE_COUNT + */ + int maxMessageCount() default CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT; + + /** + * Configures the maximum number of threads allowed in this cache server to service client requests. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_MAX_THREADS + */ + int maxThreads() default CacheServer.DEFAULT_MAX_THREADS; + + /** + * Configures the maximum amount of time between client pings. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS + */ + int maxTimeBetweenPings() default CacheServer.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS; + + /** + * Configures the time (in seconds ) after which a message in the client queue will expire. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_MESSAGE_TIME_TO_LIVE + */ + int messageTimeToLive() default CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE; + + /** + * Configures the port on which this cache server listens for clients. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_PORT + */ + int port() default CacheServer.DEFAULT_PORT; + + /** + * Configures the configured buffer size of the socket connection for this CacheServer. + * + * @see com.gemstone.gemfire.cache.server.CacheServer#DEFAULT_SOCKET_BUFFER_SIZE + */ + int socketBufferSize() default CacheServer.DEFAULT_SOCKET_BUFFER_SIZE; + + /** + * Configures the capacity of the client queue. + * + * @see com.gemstone.gemfire.cache.server.ClientSubscriptionConfig#DEFAULT_CAPACITY + */ + int subscriptionCapacity() default ClientSubscriptionConfig.DEFAULT_CAPACITY; + + /** + * Configures the disk store name for overflow. + */ + String subscriptionDiskStoreName() default ""; + + /** + * Configures the eviction policy that is executed when capacity of the client queue is reached. + * + * Defaults to {@link SubscriptionEvictionPolicy#NONE}. + */ + SubscriptionEvictionPolicy subscriptionEvictionPolicy() default SubscriptionEvictionPolicy.NONE; + +} diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCacheServers.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCacheServers.java new file mode 100644 index 00000000..cf123031 --- /dev/null +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableCacheServers.java @@ -0,0 +1,47 @@ +/* + * Copyright 2012 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.springframework.data.gemfire.config.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; + +/** + * The EnableCacheServers class... + * + * @author John Blum + * @since 1.0.0 + */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +@Documented +@Configuration +@Import(AddCacheServersConfiguration.class) +@SuppressWarnings("unused") +public @interface EnableCacheServers { + + EnableCacheServer[] servers() default {}; + +} diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEmbeddedLocator.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableLocator.java similarity index 79% rename from src/main/java/org/springframework/data/gemfire/config/annotation/EnableEmbeddedLocator.java rename to src/main/java/org/springframework/data/gemfire/config/annotation/EnableLocator.java index 3109cf2c..35a910ce 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEmbeddedLocator.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableLocator.java @@ -27,21 +27,21 @@ import java.lang.annotation.Target; import org.springframework.context.annotation.Import; /** - * The EnableEmbeddedLocator annotation marks a Spring {@link org.springframework.context.annotation.Configuration @Configuration} + * The EnableLocator annotation marks a Spring {@link org.springframework.context.annotation.Configuration @Configuration} * annotated class to start an embedded GemFire Locator service in this GemFire server/data node. * * @author John Blum * @see org.springframework.context.annotation.Import - * @see org.springframework.data.gemfire.config.annotation.EmbeddedLocatorConfiguration + * @see LocatorConfiguration * @since 1.9.0 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented -@Import(EmbeddedLocatorConfiguration.class) +@Import(LocatorConfiguration.class) @SuppressWarnings("unused") -public @interface EnableEmbeddedLocator { +public @interface EnableLocator { /** * Configures the host/IP address on which the embedded Locator service will bind to for accepting connections @@ -49,7 +49,7 @@ public @interface EnableEmbeddedLocator { * * Default is {@literal localhost}. */ - String host() default EmbeddedLocatorConfiguration.DEFAULT_HOST; + String host() default LocatorConfiguration.DEFAULT_HOST; /** * Configures the port on which the embedded Locator service will bind to listening for client connections @@ -57,6 +57,6 @@ public @interface EnableEmbeddedLocator { * * Default is {@literal 10334}. */ - int port() default EmbeddedLocatorConfiguration.DEFAULT_LOCATOR_PORT; + int port() default LocatorConfiguration.DEFAULT_LOCATOR_PORT; } diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEmbeddedManager.java b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableManager.java similarity index 94% rename from src/main/java/org/springframework/data/gemfire/config/annotation/EnableEmbeddedManager.java rename to src/main/java/org/springframework/data/gemfire/config/annotation/EnableManager.java index b9c215d7..33d82185 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EnableEmbeddedManager.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/EnableManager.java @@ -27,21 +27,21 @@ import java.lang.annotation.Target; import org.springframework.context.annotation.Import; /** - * The EnableEmbeddedManager annotation marks a Spring {@link org.springframework.context.annotation.Configuration @Configuration} + * The EnableManager annotation marks a Spring {@link org.springframework.context.annotation.Configuration @Configuration} * annotated class to embed and start a GemFire Manager service in the GemFire server/data node. * * @author John Blum * @see org.springframework.context.annotation.Import - * @see org.springframework.data.gemfire.config.annotation.EmbeddedManagerConfiguration + * @see ManagerConfiguration * @since 1.9.0 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented -@Import(EmbeddedManagerConfiguration.class) +@Import(ManagerConfiguration.class) @SuppressWarnings("unused") -public @interface EnableEmbeddedManager { +public @interface EnableManager { /** * If {@literal true} then this member is willing to be a JMX Manager. All the other JMX Manager properties will be @@ -97,7 +97,7 @@ public @interface EnableEmbeddedManager { * * Defaults to {@literal 1099}. */ - int jmxManagerPort() default EmbeddedManagerConfiguration.DEFAULT_JMX_MANAGER_PORT; + int jmxManagerPort() default ManagerConfiguration.DEFAULT_JMX_MANAGER_PORT; /** * Enables or disables SSL for connections to the JMX Manager. If {@literal true} and {@literal jmx-manager-port} diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EmbeddedLocatorConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/LocatorConfiguration.java similarity index 84% rename from src/main/java/org/springframework/data/gemfire/config/annotation/EmbeddedLocatorConfiguration.java rename to src/main/java/org/springframework/data/gemfire/config/annotation/LocatorConfiguration.java index 36576bdb..c3b4b2f2 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EmbeddedLocatorConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/LocatorConfiguration.java @@ -25,16 +25,16 @@ import org.springframework.data.gemfire.config.annotation.support.EmbeddedServic import org.springframework.data.gemfire.util.PropertiesBuilder; /** - * The EmbeddedLocatorConfiguration class is a Spring {@link org.springframework.context.annotation.ImportBeanDefinitionRegistrar} + * The LocatorConfiguration class is a Spring {@link org.springframework.context.annotation.ImportBeanDefinitionRegistrar} * that applies additional GemFire configuration by way of GemFire System properties to configure * an embedded GemFire Locator. * * @author John Blum - * @see org.springframework.data.gemfire.config.annotation.EnableEmbeddedLocator + * @see EnableLocator * @see org.springframework.data.gemfire.config.annotation.support.EmbeddedServiceConfigurationSupport * @since 1.9.0 */ -public class EmbeddedLocatorConfiguration extends EmbeddedServiceConfigurationSupport { +public class LocatorConfiguration extends EmbeddedServiceConfigurationSupport { protected static final int DEFAULT_LOCATOR_PORT = GemfireUtils.DEFAULT_LOCATOR_PORT; @@ -42,7 +42,7 @@ public class EmbeddedLocatorConfiguration extends EmbeddedServiceConfigurationSu @Override protected Class getAnnotationType() { - return EnableEmbeddedLocator.class; + return EnableLocator.class; } @Override diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/EmbeddedManagerConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/ManagerConfiguration.java similarity index 90% rename from src/main/java/org/springframework/data/gemfire/config/annotation/EmbeddedManagerConfiguration.java rename to src/main/java/org/springframework/data/gemfire/config/annotation/ManagerConfiguration.java index a2937c03..15f1508c 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/EmbeddedManagerConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/ManagerConfiguration.java @@ -24,22 +24,22 @@ import org.springframework.data.gemfire.config.annotation.support.EmbeddedServic import org.springframework.data.gemfire.util.PropertiesBuilder; /** - * The EmbeddedManagerConfiguration class is a Spring {@link org.springframework.context.annotation.ImportBeanDefinitionRegistrar} + * The ManagerConfiguration class is a Spring {@link org.springframework.context.annotation.ImportBeanDefinitionRegistrar} * that applies additional GemFire configuration by way of GemFire System properties to configure * an embedded GemFire Manager. * * @author John Blum - * @see org.springframework.data.gemfire.config.annotation.EnableEmbeddedManager + * @see EnableManager * @see org.springframework.data.gemfire.config.annotation.support.EmbeddedServiceConfigurationSupport * @since 1.9.0 */ -public class EmbeddedManagerConfiguration extends EmbeddedServiceConfigurationSupport { +public class ManagerConfiguration extends EmbeddedServiceConfigurationSupport { protected static final int DEFAULT_JMX_MANAGER_PORT = 1099; @Override protected Class getAnnotationType() { - return EnableEmbeddedManager.class; + return EnableManager.class; } @Override diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplication.java b/src/main/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplication.java index 18493276..4f6d757a 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplication.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplication.java @@ -42,8 +42,8 @@ import org.springframework.context.annotation.Import; */ @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) -@Documented @Inherited +@Documented @Configuration @Import(PeerCacheConfiguration.class) @SuppressWarnings("unused")