Add configuration processor to support auto-completion / content-assist of well-known SDG properties.

Resolves gh-14.
This commit is contained in:
John Blum
2018-10-16 17:52:07 -07:00
parent 74bec269d9
commit 0c1ea8e925
22 changed files with 2245 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ dependencies {
compile project(":spring-geode")
optional "org.springframework.boot:spring-boot-configuration-processor"
optional "org.springframework.session:spring-session-data-geode"
provided "javax.servlet:javax.servlet-api"

View File

@@ -0,0 +1,53 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure;
import org.apache.geode.cache.GemFireCache;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.data.gemfire.CacheFactoryBean;
import org.springframework.geode.boot.autoconfigure.configuration.GemFireProperties;
/**
* Spring Boot {@link EnableAutoConfiguration auto-configuration} class used to configure Spring Boot
* {@link ConfigurationProperties @ConfigurationProperites} classes and beans from the Spring {@link Environment}
* containing Apache Geode / Pivotal GemFire configuration properties.
*
* @author John Blum
* @see org.apache.geode.cache.GemFireCache
* @see org.springframework.boot.autoconfigure.EnableAutoConfiguration
* @see org.springframework.boot.context.properties.ConfigurationProperties
* @see org.springframework.boot.context.properties.EnableConfigurationProperties
* @see org.springframework.context.annotation.Configuration
* @see org.springframework.core.env.Environment
* @see org.springframework.data.gemfire.CacheFactoryBean
* @see org.springframework.geode.boot.autoconfigure.configuration.GemFireProperties
* @since 1.0.0
*/
@Configuration
@ConditionalOnBean(GemFireCache.class)
@ConditionalOnClass({ CacheFactoryBean.class, GemFireCache.class })
@EnableConfigurationProperties(GemFireProperties.class)
@SuppressWarnings("unused")
public class GemFirePropertiesAutoConfiguration {
}

View File

@@ -0,0 +1,159 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.geode.boot.autoconfigure.configuration.support.CacheProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.ClusterProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.DiskStoreProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.EntityProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.LocatorProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.LoggingProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.ManagementProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.ManagerProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.PdxProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.PoolProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.SecurityProperties;
import org.springframework.geode.boot.autoconfigure.configuration.support.ServiceProperties;
/**
* The GemFireProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
@ConfigurationProperties(prefix = "spring.data.gemfire")
public class GemFireProperties {
private static final boolean DEFAULT_USE_BEAN_FACTORY_LOCATOR = false;
private boolean useBeanFactoryLocator = DEFAULT_USE_BEAN_FACTORY_LOCATOR;
@NestedConfigurationProperty
private final CacheProperties cache = new CacheProperties();
@NestedConfigurationProperty
private final ClusterProperties cluster = new ClusterProperties();
@NestedConfigurationProperty
private final DiskStoreProperties disk = new DiskStoreProperties();
@NestedConfigurationProperty
private final EntityProperties entities = new EntityProperties();
@NestedConfigurationProperty
private final LocatorProperties locator = new LocatorProperties();
@NestedConfigurationProperty
private final LoggingProperties logging = new LoggingProperties();
@NestedConfigurationProperty
private final ManagementProperties management = new ManagementProperties();
@NestedConfigurationProperty
private final ManagerProperties manager = new ManagerProperties();
@NestedConfigurationProperty
private final PdxProperties pdx = new PdxProperties();
@NestedConfigurationProperty
private final PoolProperties pool = new PoolProperties();
@NestedConfigurationProperty
private final SecurityProperties security = new SecurityProperties();
@NestedConfigurationProperty
private final ServiceProperties service = new ServiceProperties();
private String name;
private String[] locators;
public CacheProperties getCache() {
return this.cache;
}
public ClusterProperties getCluster() {
return this.cluster;
}
public DiskStoreProperties getDisk() {
return this.disk;
}
public EntityProperties getEntities() {
return this.entities;
}
public LocatorProperties getLocator() {
return this.locator;
}
public String[] getLocators() {
return this.locators;
}
public void setLocators(String[] locators) {
this.locators = locators;
}
public LoggingProperties getLogging() {
return this.logging;
}
public ManagementProperties getManagement() {
return this.management;
}
public ManagerProperties getManager() {
return this.manager;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public PdxProperties getPdx() {
return this.pdx;
}
public PoolProperties getPool() {
return this.pool;
}
public SecurityProperties getSecurity() {
return this.security;
}
public ServiceProperties getService() {
return this.service;
}
public boolean isUseBeanFactoryLocator() {
return this.useBeanFactoryLocator;
}
public void setUseBeanFactoryLocator(boolean useBeanFactoryLocator) {
this.useBeanFactoryLocator = useBeanFactoryLocator;
}
}

View File

@@ -0,0 +1,194 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.apache.geode.cache.control.ResourceManager;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
/**
* The CacheProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class CacheProperties {
private static final boolean DEFAULT_COPY_ON_READ = false;
private static final boolean DEFAULT_AUTO_REGION_LOOKUP = true;
private static final float DEFAULT_CRITICAL_OFF_HEAP_PERCENTAGE = 0.0f;
private static final float DEFAULT_EVICTION_OFF_HEAP_PERCENTAGE = 0.0f;
private static final String DEFAULT_LOG_LEVEL = "config";
private boolean copyOnRead = DEFAULT_COPY_ON_READ;
private boolean enableAutoRegionLookup = DEFAULT_AUTO_REGION_LOOKUP;
private float criticalHeapPercentage = ResourceManager.DEFAULT_CRITICAL_PERCENTAGE;
private float criticalOffHeapPercentage = DEFAULT_CRITICAL_OFF_HEAP_PERCENTAGE;
private float evictionHeapPercentage = ResourceManager.DEFAULT_EVICTION_PERCENTAGE;
private float evictionOffHeapPercentage = DEFAULT_EVICTION_OFF_HEAP_PERCENTAGE;
@NestedConfigurationProperty
private final CacheServerProperties server = new CacheServerProperties();
@NestedConfigurationProperty
private final ClientCacheProperties client = new ClientCacheProperties();
@NestedConfigurationProperty
private final CompressionProperties compression = new CompressionProperties();
@NestedConfigurationProperty
private final OffHeapProperties offHeap = new OffHeapProperties();
@NestedConfigurationProperty
private final PeerCacheProperties peer = new PeerCacheProperties();
private String logLevel = DEFAULT_LOG_LEVEL;
private String name;
public ClientCacheProperties getClient() {
return this.client;
}
public CompressionProperties getCompression() {
return this.compression;
}
public boolean isCopyOnRead() {
return copyOnRead;
}
public void setCopyOnRead(boolean copyOnRead) {
this.copyOnRead = copyOnRead;
}
public float getCriticalHeapPercentage() {
return this.criticalHeapPercentage;
}
public void setCriticalHeapPercentage(float criticalHeapPercentage) {
this.criticalHeapPercentage = criticalHeapPercentage;
}
public float getCriticalOffHeapPercentage() {
return this.criticalOffHeapPercentage;
}
public void setCriticalOffHeapPercentage(float criticalOffHeapPercentage) {
this.criticalOffHeapPercentage = criticalOffHeapPercentage;
}
public boolean isEnableAutoRegionLookup() {
return this.enableAutoRegionLookup;
}
public void setEnableAutoRegionLookup(boolean enableAutoRegionLookup) {
this.enableAutoRegionLookup = enableAutoRegionLookup;
}
public float getEvictionHeapPercentage() {
return this.evictionHeapPercentage;
}
public void setEvictionHeapPercentage(float evictionHeapPercentage) {
this.evictionHeapPercentage = evictionHeapPercentage;
}
public float getEvictionOffHeapPercentage() {
return this.evictionOffHeapPercentage;
}
public void setEvictionOffHeapPercentage(float evictionOffHeapPercentage) {
this.evictionOffHeapPercentage = evictionOffHeapPercentage;
}
public String getLogLevel() {
return this.logLevel;
}
public void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public OffHeapProperties getOffHeap() {
return this.offHeap;
}
public PeerCacheProperties getPeer() {
return this.peer;
}
public CacheServerProperties getServer() {
return this.server;
}
public static class CompressionProperties {
private String compressorBeanName;
private String[] regionNames = {};
public String getCompressorBeanName() {
return this.compressorBeanName;
}
public void setCompressorBeanName(String compressorBeanName) {
this.compressorBeanName = compressorBeanName;
}
public String[] getRegionNames() {
return this.regionNames;
}
public void setRegionNames(String[] regionNames) {
this.regionNames = regionNames;
}
}
public static class OffHeapProperties {
private String memorySize;
private String[] regionNames = {};
public String getMemorySize() {
return this.memorySize;
}
public void setMemorySize(String memorySize) {
this.memorySize = memorySize;
}
public String[] getRegionNames() {
return this.regionNames;
}
public void setRegionNames(String[] regionNames) {
this.regionNames = regionNames;
}
}
}

View File

@@ -0,0 +1,173 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.apache.geode.cache.server.CacheServer;
import org.apache.geode.cache.server.ClientSubscriptionConfig;
import org.springframework.data.gemfire.server.SubscriptionEvictionPolicy;
/**
* The CacheServerProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class CacheServerProperties {
private static final boolean DEFAULT_AUTO_STARTUP = true;
private boolean autoStartup = DEFAULT_AUTO_STARTUP;
private boolean tcpNoDelay = CacheServer.DEFAULT_TCP_NO_DELAY;
private int maxConnections = CacheServer.DEFAULT_MAX_CONNECTIONS;
private int maxMessageCount = CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT;
private int maxThreads = CacheServer.DEFAULT_MAX_THREADS;
private int maxTimeBetweenPings = CacheServer.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS;
private int messageTimeToLive = CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE;
private int port = CacheServer.DEFAULT_PORT;
private int socketBufferSize = CacheServer.DEFAULT_SOCKET_BUFFER_SIZE;
private int subscriptionCapacity = ClientSubscriptionConfig.DEFAULT_CAPACITY;
private long loadPollInterval = CacheServer.DEFAULT_LOAD_POLL_INTERVAL;
private String bindAddress = CacheServer.DEFAULT_BIND_ADDRESS;
private String hostnameForClients = CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS;
private String subscriptionDiskStoreName;
private SubscriptionEvictionPolicy subscriptionEvictionPolicy = SubscriptionEvictionPolicy.NONE;
public boolean isAutoStartup() {
return this.autoStartup;
}
public void setAutoStartup(boolean autoStartup) {
this.autoStartup = autoStartup;
}
public String getBindAddress() {
return this.bindAddress;
}
public void setBindAddress(String bindAddress) {
this.bindAddress = bindAddress;
}
public String getHostnameForClients() {
return this.hostnameForClients;
}
public void setHostnameForClients(String hostnameForClients) {
this.hostnameForClients = hostnameForClients;
}
public long getLoadPollInterval() {
return this.loadPollInterval;
}
public void setLoadPollInterval(long loadPollInterval) {
this.loadPollInterval = loadPollInterval;
}
public int getMaxConnections() {
return this.maxConnections;
}
public void setMaxConnections(int maxConnections) {
this.maxConnections = maxConnections;
}
public int getMaxMessageCount() {
return this.maxMessageCount;
}
public void setMaxMessageCount(int maxMessageCount) {
this.maxMessageCount = maxMessageCount;
}
public int getMaxThreads() {
return this.maxThreads;
}
public void setMaxThreads(int maxThreads) {
this.maxThreads = maxThreads;
}
public int getMaxTimeBetweenPings() {
return this.maxTimeBetweenPings;
}
public void setMaxTimeBetweenPings(int maxTimeBetweenPings) {
this.maxTimeBetweenPings = maxTimeBetweenPings;
}
public int getMessageTimeToLive() {
return this.messageTimeToLive;
}
public void setMessageTimeToLive(int messageTimeToLive) {
this.messageTimeToLive = messageTimeToLive;
}
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
public int getSocketBufferSize() {
return this.socketBufferSize;
}
public void setSocketBufferSize(int socketBufferSize) {
this.socketBufferSize = socketBufferSize;
}
public int getSubscriptionCapacity() {
return this.subscriptionCapacity;
}
public void setSubscriptionCapacity(int subscriptionCapacity) {
this.subscriptionCapacity = subscriptionCapacity;
}
public String getSubscriptionDiskStoreName() {
return this.subscriptionDiskStoreName;
}
public void setSubscriptionDiskStoreName(String subscriptionDiskStoreName) {
this.subscriptionDiskStoreName = subscriptionDiskStoreName;
}
public SubscriptionEvictionPolicy getSubscriptionEvictionPolicy() {
return this.subscriptionEvictionPolicy;
}
public void setSubscriptionEvictionPolicy(SubscriptionEvictionPolicy subscriptionEvictionPolicy) {
this.subscriptionEvictionPolicy = subscriptionEvictionPolicy;
}
public boolean isTcpNoDelay() {
return this.tcpNoDelay;
}
public void setTcpNoDelay(boolean tcpNoDelay) {
this.tcpNoDelay = tcpNoDelay;
}
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The ClientCacheProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class ClientCacheProperties {
private static final boolean DEFAULT_KEEP_ALIVE = false;
private static final int DEFAULT_DURABLE_CLIENT_TIMEOUT_IN_SECONDS = 300;
private boolean keepAlive = DEFAULT_KEEP_ALIVE;
private int durableClientTimeout = DEFAULT_DURABLE_CLIENT_TIMEOUT_IN_SECONDS;
private String durableClientId;
public String getDurableClientId() {
return this.durableClientId;
}
public void setDurableClientId(String durableClientId) {
this.durableClientId = durableClientId;
}
public int getDurableClientTimeout() {
return this.durableClientTimeout;
}
public void setDurableClientTimeout(int durableClientTimeout) {
this.durableClientTimeout = durableClientTimeout;
}
public boolean isKeepAlive() {
return this.keepAlive;
}
public void setKeepAlive(boolean keepAlive) {
this.keepAlive = keepAlive;
}
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The ClientSecurityProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class ClientSecurityProperties {
private String accessor;
private String accessorPostProcessor;
private String authenticationInitializer;
private String authenticator;
private String diffieHellmanAlgorithm;
public String getAccessor() {
return this.accessor;
}
public void setAccessor(String accessor) {
this.accessor = accessor;
}
public String getAccessorPostProcessor() {
return this.accessorPostProcessor;
}
public void setAccessorPostProcessor(String accessorPostProcessor) {
this.accessorPostProcessor = accessorPostProcessor;
}
public String getAuthenticationInitializer() {
return this.authenticationInitializer;
}
public void setAuthenticationInitializer(String authenticationInitializer) {
this.authenticationInitializer = authenticationInitializer;
}
public String getAuthenticator() {
return this.authenticator;
}
public void setAuthenticator(String authenticator) {
this.authenticator = authenticator;
}
public String getDiffieHellmanAlgorithm() {
return this.diffieHellmanAlgorithm;
}
public void setDiffieHellmanAlgorithm(String diffieHellmanAlgorithm) {
this.diffieHellmanAlgorithm = diffieHellmanAlgorithm;
}
}

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.apache.geode.cache.RegionShortcut;
/**
* The ClusterProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class ClusterProperties {
private final RegionProperties regionProperties = new RegionProperties();
public RegionProperties getRegion() {
return this.regionProperties;
}
public static class RegionProperties {
private RegionShortcut peerRegionType;
public RegionShortcut getType() {
return this.peerRegionType;
}
public void setType(RegionShortcut peerRegionType) {
this.peerRegionType = peerRegionType;
}
}
}

View File

@@ -0,0 +1,156 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.apache.geode.cache.DiskStoreFactory;
/**
* The DiskStoreProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class DiskStoreProperties {
private final StoreProperties storeProperties = new StoreProperties();
public StoreProperties getStore() {
return this.storeProperties;
}
public static class DirectoryProperties {
private int size = DiskStoreFactory.DEFAULT_DISK_DIR_SIZE;
private String location;
public String getLocation() {
return this.location;
}
public void setLocation(String location) {
this.location = location;
}
public int getSize() {
return this.size;
}
public void setSize(int size) {
this.size = size;
}
}
public static class StoreProperties {
private boolean allowForceCompaction = DiskStoreFactory.DEFAULT_ALLOW_FORCE_COMPACTION;
private boolean autoCompact = DiskStoreFactory.DEFAULT_AUTO_COMPACT;
private float diskUsageCriticalPercentage = DiskStoreFactory.DEFAULT_DISK_USAGE_CRITICAL_PERCENTAGE;
private float diskUsageWarningPercentage = DiskStoreFactory.DEFAULT_DISK_USAGE_WARNING_PERCENTAGE;
private int compactionThreshold = DiskStoreFactory.DEFAULT_COMPACTION_THRESHOLD;
private int queueSize = DiskStoreFactory.DEFAULT_QUEUE_SIZE;
private int writeBufferSize = DiskStoreFactory.DEFAULT_WRITE_BUFFER_SIZE;
private long maxOplogSize = DiskStoreFactory.DEFAULT_MAX_OPLOG_SIZE;
private long timeInterval = DiskStoreFactory.DEFAULT_TIME_INTERVAL;
private DirectoryProperties[] directoryProperties = {};
public boolean isAllowForceCompaction() {
return this.allowForceCompaction;
}
public void setAllowForceCompaction(boolean allowForceCompaction) {
this.allowForceCompaction = allowForceCompaction;
}
public boolean isAutoCompact() {
return this.autoCompact;
}
public void setAutoCompact(boolean autoCompact) {
this.autoCompact = autoCompact;
}
public int getCompactionThreshold() {
return this.compactionThreshold;
}
public void setCompactionThreshold(int compactionThreshold) {
this.compactionThreshold = compactionThreshold;
}
public DirectoryProperties[] getDirectory() {
return this.directoryProperties;
}
public void setDirectory(DirectoryProperties[] directoryProperties) {
this.directoryProperties = directoryProperties;
}
public float getDiskUsageCriticalPercentage() {
return this.diskUsageCriticalPercentage;
}
public void setDiskUsageCriticalPercentage(float diskUsageCriticalPercentage) {
this.diskUsageCriticalPercentage = diskUsageCriticalPercentage;
}
public float getDiskUsageWarningPercentage() {
return this.diskUsageWarningPercentage;
}
public void setDiskUsageWarningPercentage(float diskUsageWarningPercentage) {
this.diskUsageWarningPercentage = diskUsageWarningPercentage;
}
public long getMaxOplogSize() {
return this.maxOplogSize;
}
public void setMaxOplogSize(long maxOplogSize) {
this.maxOplogSize = maxOplogSize;
}
public int getQueueSize() {
return this.queueSize;
}
public void setQueueSize(int queueSize) {
this.queueSize = queueSize;
}
public long getTimeInterval() {
return this.timeInterval;
}
public void setTimeInterval(long timeInterval) {
this.timeInterval = timeInterval;
}
public int getWriteBufferSize() {
return this.writeBufferSize;
}
public void setWriteBufferSize(int writeBufferSize) {
this.writeBufferSize = writeBufferSize;
}
}
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The EntityProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class EntityProperties {
private String basePackages;
public String getBasePackages() {
return this.basePackages;
}
public void setBasePackages(String basePackages) {
this.basePackages = basePackages;
}
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The LocatorProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class LocatorProperties {
private static final int DEFAULT_LOCATOR_PORT = 10334;
private int port = DEFAULT_LOCATOR_PORT;
private String host;
public String getHost() {
return this.host;
}
public void setHost(String host) {
this.host = host;
}
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
}

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The LoggingProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class LoggingProperties {
private static final int DEFAULT_LOG_DISK_SPACE_LIMIT = 0;
private static final int DEFAULT_LOG_FILE_SIZE_LIMIT = 0;
private static final String DEFAULT_LOG_LEVEL = "config";
private int logDiskSpaceLimit = DEFAULT_LOG_DISK_SPACE_LIMIT;
private int logFileSizeLimit = DEFAULT_LOG_FILE_SIZE_LIMIT;
private String level = DEFAULT_LOG_LEVEL;
private String logFile;
public String getLevel() {
return this.level;
}
public void setLevel(String level) {
this.level = level;
}
public int getLogDiskSpaceLimit() {
return this.logDiskSpaceLimit;
}
public void setLogDiskSpaceLimit(int logDiskSpaceLimit) {
this.logDiskSpaceLimit = logDiskSpaceLimit;
}
public String getLogFile() {
return this.logFile;
}
public void setLogFile(String logFile) {
this.logFile = logFile;
}
public int getLogFileSizeLimit() {
return this.logFileSizeLimit;
}
public void setLogFileSizeLimit(int logFileSizeLimit) {
this.logFileSizeLimit = logFileSizeLimit;
}
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The ManagementProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class ManagementProperties {
private static final boolean DEFAULT_USE_HTTP = false;
private boolean useHttp = DEFAULT_USE_HTTP;
private final HttpServiceProperties httpServiceProperties = new HttpServiceProperties();
public HttpServiceProperties getHttp() {
return this.httpServiceProperties;
}
public boolean isUseHttp() {
return this.useHttp;
}
public void setUseHttp(boolean useHttp) {
this.useHttp = useHttp;
}
public static class HttpServiceProperties {
private static final int DEFAULT_PORT = 7070;
private static final String DEFAULT_HOST = "localhost";
private int port = DEFAULT_PORT;
private String host = DEFAULT_HOST;
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
}
}

View File

@@ -0,0 +1,98 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The ManagerProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class ManagerProperties {
private static final boolean DEFAULT_START = false;
private static final int DEFAULT_PORT = 1099;
private static final int DEFAULT_UPDATE_RATE_IN_MILLISECONDS = 2000;
private boolean start = DEFAULT_START;
private int port = DEFAULT_PORT;
private int updateRate = DEFAULT_UPDATE_RATE_IN_MILLISECONDS;
private String accessFile;
private String bindAddress;
private String hostnameForClients;
private String passwordFile;
public String getAccessFile() {
return this.accessFile;
}
public void setAccessFile(String accessFile) {
this.accessFile = accessFile;
}
public String getBindAddress() {
return this.bindAddress;
}
public void setBindAddress(String bindAddress) {
this.bindAddress = bindAddress;
}
public String getHostnameForClients() {
return this.hostnameForClients;
}
public void setHostnameForClients(String hostnameForClients) {
this.hostnameForClients = hostnameForClients;
}
public String getPasswordFile() {
return this.passwordFile;
}
public void setPasswordFile(String passwordFile) {
this.passwordFile = passwordFile;
}
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
public boolean isStart() {
return this.start;
}
public void setStart(boolean start) {
this.start = start;
}
public int getUpdateRate() {
return this.updateRate;
}
public void setUpdateRate(int updateRate) {
this.updateRate = updateRate;
}
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The PdxProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class PdxProperties {
private static final boolean DEFAULT_IGNORE_UNREAD_FIELDS = false;
private static final boolean DEFAULT_PERSISTENT = false;
private static final boolean DEFAULT_READ_SERIALIZED = false;
private boolean ignoreUnreadFields = DEFAULT_IGNORE_UNREAD_FIELDS;
private boolean persistent = DEFAULT_PERSISTENT;
private boolean readSerialized = DEFAULT_READ_SERIALIZED;
private String diskStoreName;
private String serializerBeanName;
public String getDiskStoreName() {
return this.diskStoreName;
}
public void setDiskStoreName(String diskStoreName) {
this.diskStoreName = diskStoreName;
}
public boolean isIgnoreUnreadFields() {
return this.ignoreUnreadFields;
}
public void setIgnoreUnreadFields(boolean ignoreUnreadFields) {
this.ignoreUnreadFields = ignoreUnreadFields;
}
public boolean isPersistent() {
return this.persistent;
}
public void setPersistent(boolean persistent) {
this.persistent = persistent;
}
public boolean isReadSerialized() {
return this.readSerialized;
}
public void setReadSerialized(boolean readSerialized) {
this.readSerialized = readSerialized;
}
public String getSerializerBeanName() {
return this.serializerBeanName;
}
public void setSerializerBeanName(String serializerBeanName) {
this.serializerBeanName = serializerBeanName;
}
}

View File

@@ -0,0 +1,91 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The PeerCacheProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class PeerCacheProperties {
private static final boolean DEFAULT_ENABLE_AUTO_RECONNECT = false;
private static final boolean DEFAULT_USE_CLUSTER_CONFIGURATION = false;
private static final int DEFAULT_LOCK_LEASE_IN_SECONDS = 120;
private static final int DEFAULT_LOCK_TIMEOUT_IN_SECONDS = 60;
private static final int DEFAULT_MESSAGE_SYNC_INTERVAL_IN_SECONDS = 1;
private static final int DEFAULT_SEARCH_TIMEOUT_IN_SECONDS = 300;
private boolean enableAutoReconnect = DEFAULT_ENABLE_AUTO_RECONNECT;
private boolean useClusterConfiguration = DEFAULT_USE_CLUSTER_CONFIGURATION;
private int lockLease = DEFAULT_LOCK_LEASE_IN_SECONDS;
private int lockTimeout = DEFAULT_LOCK_TIMEOUT_IN_SECONDS;
private int messageSyncInterval = DEFAULT_MESSAGE_SYNC_INTERVAL_IN_SECONDS;
private int searchTimeout = DEFAULT_SEARCH_TIMEOUT_IN_SECONDS;
public boolean isEnableAutoReconnect() {
return this.enableAutoReconnect;
}
public void setEnableAutoReconnect(boolean enableAutoReconnect) {
this.enableAutoReconnect = enableAutoReconnect;
}
public int getLockLease() {
return this.lockLease;
}
public void setLockLease(int lockLease) {
this.lockLease = lockLease;
}
public int getLockTimeout() {
return this.lockTimeout;
}
public void setLockTimeout(int lockTimeout) {
this.lockTimeout = lockTimeout;
}
public int getMessageSyncInterval() {
return this.messageSyncInterval;
}
public void setMessageSyncInterval(int messageSyncInterval) {
this.messageSyncInterval = messageSyncInterval;
}
public int getSearchTimeout() {
return this.searchTimeout;
}
public void setSearchTimeout(int searchTimeout) {
this.searchTimeout = searchTimeout;
}
public boolean isUseClusterConfiguration() {
return this.useClusterConfiguration;
}
public void setUseClusterConfiguration(boolean useClusterConfiguration) {
this.useClusterConfiguration = useClusterConfiguration;
}
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
/**
* The PeerSecurityProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class PeerSecurityProperties {
private static final long DEFAULT_VERIFY_MEMBER_TIMEOUT_IN_MILLISECONDS = 1000;
private long verifyMemberTimeout = DEFAULT_VERIFY_MEMBER_TIMEOUT_IN_MILLISECONDS;
private String authenticationInitializer;
private String authenticator;
public String getAuthenticationInitializer() {
return this.authenticationInitializer;
}
public void setAuthenticationInitializer(String authenticationInitializer) {
this.authenticationInitializer = authenticationInitializer;
}
public String getAuthenticator() {
return this.authenticator;
}
public void setAuthenticator(String authenticator) {
this.authenticator = authenticator;
}
public long getVerifyMemberTimeout() {
return this.verifyMemberTimeout;
}
public void setVerifyMemberTimeout(long verifyMemberTimeout) {
this.verifyMemberTimeout = verifyMemberTimeout;
}
}

View File

@@ -0,0 +1,236 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.apache.geode.cache.client.PoolFactory;
/**
* The PoolProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class PoolProperties {
private static final boolean DEFAULT_READY_FOR_EVENTS = false;
private boolean multiUserAuthentication = PoolFactory.DEFAULT_MULTIUSER_AUTHENTICATION;
private boolean prSingleHopEnabled = PoolFactory.DEFAULT_PR_SINGLE_HOP_ENABLED;
private boolean readyForEvents = DEFAULT_READY_FOR_EVENTS;
private boolean subscriptionEnabled = PoolFactory.DEFAULT_SUBSCRIPTION_ENABLED;
private boolean threadLocalConnections = PoolFactory.DEFAULT_THREAD_LOCAL_CONNECTIONS;
private int freeConnectionTimeout = PoolFactory.DEFAULT_FREE_CONNECTION_TIMEOUT;
private int loadConditioningInterval = PoolFactory.DEFAULT_LOAD_CONDITIONING_INTERVAL;
private int maxConnections = PoolFactory.DEFAULT_MAX_CONNECTIONS;
private int minConnections = PoolFactory.DEFAULT_MIN_CONNECTIONS;
private int readTimeout = PoolFactory.DEFAULT_READ_TIMEOUT;
private int retryAttempts = PoolFactory.DEFAULT_RETRY_ATTEMPTS;
private int socketBufferSize = PoolFactory.DEFAULT_SOCKET_BUFFER_SIZE;
private int statisticInterval = PoolFactory.DEFAULT_STATISTIC_INTERVAL;
private int subscriptionAckInterval = PoolFactory.DEFAULT_SUBSCRIPTION_ACK_INTERVAL;
private int subscriptionMessageTrackingTimeout = PoolFactory.DEFAULT_SUBSCRIPTION_MESSAGE_TRACKING_TIMEOUT;
private int subscriptionRedundancy = PoolFactory.DEFAULT_SUBSCRIPTION_REDUNDANCY;
private long idleTimeout = PoolFactory.DEFAULT_IDLE_TIMEOUT;
private long pingInterval = PoolFactory.DEFAULT_PING_INTERVAL;
private PoolProperties defaultPoolProperties;
private String serverGroup = PoolFactory.DEFAULT_SERVER_GROUP;
private String[] locators = {};
private String[] servers = {};
public synchronized PoolProperties getDefault() {
if (this.defaultPoolProperties == null) {
this.defaultPoolProperties = new PoolProperties();
}
return this.defaultPoolProperties;
}
public int getFreeConnectionTimeout() {
return this.freeConnectionTimeout;
}
public void setFreeConnectionTimeout(int freeConnectionTimeout) {
this.freeConnectionTimeout = freeConnectionTimeout;
}
public long getIdleTimeout() {
return this.idleTimeout;
}
public void setIdleTimeout(long idleTimeout) {
this.idleTimeout = idleTimeout;
}
public int getLoadConditioningInterval() {
return this.loadConditioningInterval;
}
public void setLoadConditioningInterval(int loadConditioningInterval) {
this.loadConditioningInterval = loadConditioningInterval;
}
public String[] getLocators() {
return locators;
}
public void setLocators(String[] locators) {
this.locators = locators;
}
public int getMaxConnections() {
return this.maxConnections;
}
public void setMaxConnections(int maxConnections) {
this.maxConnections = maxConnections;
}
public int getMinConnections() {
return this.minConnections;
}
public void setMinConnections(int minConnections) {
this.minConnections = minConnections;
}
public boolean isMultiUserAuthentication() {
return this.multiUserAuthentication;
}
public void setMultiUserAuthentication(boolean multiUserAuthentication) {
this.multiUserAuthentication = multiUserAuthentication;
}
public long getPingInterval() {
return this.pingInterval;
}
public void setPingInterval(long pingInterval) {
this.pingInterval = pingInterval;
}
public boolean isPrSingleHopEnabled() {
return this.prSingleHopEnabled;
}
public void setPrSingleHopEnabled(boolean prSingleHopEnabled) {
this.prSingleHopEnabled = prSingleHopEnabled;
}
public int getReadTimeout() {
return this.readTimeout;
}
public void setReadTimeout(int readTimeout) {
this.readTimeout = readTimeout;
}
public boolean isReadyForEvents() {
return this.readyForEvents;
}
public void setReadyForEvents(boolean readyForEvents) {
this.readyForEvents = readyForEvents;
}
public int getRetryAttempts() {
return this.retryAttempts;
}
public void setRetryAttempts(int retryAttempts) {
this.retryAttempts = retryAttempts;
}
public String getServerGroup() {
return this.serverGroup;
}
public void setServerGroup(String serverGroup) {
this.serverGroup = serverGroup;
}
public String[] getServers() {
return this.servers;
}
public void setServers(String[] servers) {
this.servers = servers;
}
public int getSocketBufferSize() {
return this.socketBufferSize;
}
public void setSocketBufferSize(int socketBufferSize) {
this.socketBufferSize = socketBufferSize;
}
public int getStatisticInterval() {
return this.statisticInterval;
}
public void setStatisticInterval(int statisticInterval) {
this.statisticInterval = statisticInterval;
}
public int getSubscriptionAckInterval() {
return this.subscriptionAckInterval;
}
public void setSubscriptionAckInterval(int subscriptionAckInterval) {
this.subscriptionAckInterval = subscriptionAckInterval;
}
public boolean isSubscriptionEnabled() {
return this.subscriptionEnabled;
}
public void setSubscriptionEnabled(boolean subscriptionEnabled) {
this.subscriptionEnabled = subscriptionEnabled;
}
public int getSubscriptionMessageTrackingTimeout() {
return this.subscriptionMessageTrackingTimeout;
}
public void setSubscriptionMessageTrackingTimeout(int subscriptionMessageTrackingTimeout) {
this.subscriptionMessageTrackingTimeout = subscriptionMessageTrackingTimeout;
}
public int getSubscriptionRedundancy() {
return this.subscriptionRedundancy;
}
public void setSubscriptionRedundancy(int subscriptionRedundancy) {
this.subscriptionRedundancy = subscriptionRedundancy;
}
public boolean isThreadLocalConnections() {
return this.threadLocalConnections;
}
public void setThreadLocalConnections(boolean threadLocalConnections) {
this.threadLocalConnections = threadLocalConnections;
}
}

View File

@@ -0,0 +1,166 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
/**
* The SecurityProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class SecurityProperties {
private final ApacheShiroProperties apacheShiroProperties = new ApacheShiroProperties();
@NestedConfigurationProperty
private final ClientSecurityProperties client = new ClientSecurityProperties();
@NestedConfigurationProperty
private final PeerSecurityProperties peer = new PeerSecurityProperties();
private final SecurityLogProperties securityLogProperties = new SecurityLogProperties();
private final SecurityManagerProperties securityManagerProperties = new SecurityManagerProperties();
private final SecurityPostProcessorProperties securityPostProcessorProperties =
new SecurityPostProcessorProperties();
@NestedConfigurationProperty
private final SslProperties sslProperties = new SslProperties();
private String password;
private String propertiesFile;
private String username;
public ClientSecurityProperties getClient() {
return this.client;
}
public SecurityLogProperties getLog() {
return this.securityLogProperties;
}
public SecurityManagerProperties getManager() {
return this.securityManagerProperties;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public PeerSecurityProperties getPeer() {
return this.peer;
}
public SecurityPostProcessorProperties getPostProcessor() {
return this.securityPostProcessorProperties;
}
public String getPropertiesFile() {
return this.propertiesFile;
}
public void setPropertiesFile(String propertiesFile) {
this.propertiesFile = propertiesFile;
}
public ApacheShiroProperties getShiro() {
return this.apacheShiroProperties;
}
public SslProperties getSsl() {
return this.sslProperties;
}
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public static class ApacheShiroProperties {
private String iniResourcePath;
public String getIniResourcePath() {
return this.iniResourcePath;
}
public void setIniResourcePath(String iniResourcePath) {
this.iniResourcePath = iniResourcePath;
}
}
public static class SecurityLogProperties {
private static final String DEFAULT_SECURITY_LOG_LEVEL = "config";
private String file;
private String level = DEFAULT_SECURITY_LOG_LEVEL;
public String getFile() {
return this.file;
}
public void setFile(String file) {
this.file = file;
}
public String getLevel() {
return this.level;
}
public void setLevel(String level) {
this.level = level;
}
}
public static class SecurityManagerProperties {
private String className;
public String getClassName() {
return this.className;
}
public void setClassName(String className) {
this.className = className;
}
}
public static class SecurityPostProcessorProperties {
private String className;
public String getClassName() {
return this.className;
}
public void setClassName(String className) {
this.className = className;
}
}
}

View File

@@ -0,0 +1,155 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.springframework.data.gemfire.config.annotation.EnableMemcachedServer;
/**
* The ServiceProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class ServiceProperties {
private final HttpServiceProperties httpServiceProperties = new HttpServiceProperties();
private final MemcachedServerProperties memcachedServerProperties = new MemcachedServerProperties();
private final RedisServerProperties redisServerProperties = new RedisServerProperties();
public HttpServiceProperties getHttp() {
return this.httpServiceProperties;
}
public MemcachedServerProperties getMemcached() {
return this.memcachedServerProperties;
}
public RedisServerProperties getRedis() {
return this.redisServerProperties;
}
public static class DeveloperRestApiProperties {
private static final boolean DEFAULT_START = false;
private boolean start = DEFAULT_START;
public boolean isStart() {
return this.start;
}
public void setStart(boolean start) {
this.start = start;
}
}
public static class HttpServiceProperties {
private static final boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION = false;
private static final int DEFAULT_PORT = 7070;
private boolean sslRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION;
private int port = DEFAULT_PORT;
private final DeveloperRestApiProperties developerRestApiProperties = new DeveloperRestApiProperties();
private String bindAddress;
public String getBindAddress() {
return this.bindAddress;
}
public void setBindAddress(String bindAddress) {
this.bindAddress = bindAddress;
}
public DeveloperRestApiProperties getDevRestApi() {
return developerRestApiProperties;
}
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
public boolean isSslRequireAuthentication() {
return this.sslRequireAuthentication;
}
public void setSslRequireAuthentication(boolean sslRequireAuthentication) {
this.sslRequireAuthentication = sslRequireAuthentication;
}
}
public static class MemcachedServerProperties {
private static final int DEFAULT_PORT = 11211;
private int port = DEFAULT_PORT;
private EnableMemcachedServer.MemcachedProtocol protocol = EnableMemcachedServer.MemcachedProtocol.ASCII;
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
public EnableMemcachedServer.MemcachedProtocol getProtocol() {
return this.protocol;
}
public void setProtocol(EnableMemcachedServer.MemcachedProtocol protocol) {
this.protocol = protocol;
}
}
public static class RedisServerProperties {
public static final int DEFAULT_PORT = 6379;
private int port = DEFAULT_PORT;
private String bindAddress;
public String getBindAddress() {
return this.bindAddress;
}
public void setBindAddress(String bindAddress) {
this.bindAddress = bindAddress;
}
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
}
}

View File

@@ -0,0 +1,216 @@
/*
* Copyright 2018 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.geode.boot.autoconfigure.configuration.support;
import org.springframework.data.gemfire.config.annotation.EnableSsl;
/**
* The SslProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@SuppressWarnings("unused")
public class SslProperties {
private static final boolean DEFAULT_REQUIRE_AUTHENTICATION = true;
private static final boolean DEFAULT_WEB_REQUIRE_AUTHENTICATION = false;
private boolean requireAuthentication = DEFAULT_REQUIRE_AUTHENTICATION;
private boolean webRequireAuthentication = DEFAULT_WEB_REQUIRE_AUTHENTICATION;
private EnableSsl.Component[] components;
private final KeyStoreProperties keystoreProperties = new KeyStoreProperties();
private final KeyStoreProperties truststoreProperties = new KeyStoreProperties();
private final SslCertificateProperties sslCertificateProperties = new SslCertificateProperties();
private String keystore;
private String truststore;
private String[] ciphers;
private String[] protocols;
public SslCertificateProperties getCertificate() {
return this.sslCertificateProperties;
}
public String[] getCiphers() {
return this.ciphers;
}
public void setCiphers(String[] ciphers) {
this.ciphers = ciphers;
}
public EnableSsl.Component[] getComponents() {
return this.components;
}
public void setComponents(EnableSsl.Component[] components) {
this.components = components;
}
public String getKeystore() {
return keystore;
}
public void setKeystore(String keystore) {
this.keystore = keystore;
}
public String[] getProtocols() {
return this.protocols;
}
public void setProtocols(String[] protocols) {
this.protocols = protocols;
}
public boolean isRequireAuthentication() {
return this.requireAuthentication;
}
public void setRequireAuthentication(boolean requireAuthentication) {
this.requireAuthentication = requireAuthentication;
}
public String getTruststore() {
return this.truststore;
}
public void setTruststore(String truststore) {
this.truststore = truststore;
}
public boolean isWebRequireAuthentication() {
return this.webRequireAuthentication;
}
public void setWebRequireAuthentication(boolean webRequireAuthentication) {
this.webRequireAuthentication = webRequireAuthentication;
}
public static class KeyStoreProperties {
private String password;
private String type;
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
}
public static class SslCertificateProperties {
private SslCertificateAliasProperties sslCertificateAliasProperties = new SslCertificateAliasProperties();
public SslCertificateAliasProperties getAlias() {
return this.sslCertificateAliasProperties;
}
}
public static class SslCertificateAliasProperties {
private String allAlias;
private String clusterAlias;
private String defaultAlias;
private String gatewayAlias;
private String jmxAlias;
private String locatorAlias;
private String serverAlias;
private String webAlias;
public String getAllAlias() {
return this.allAlias;
}
public void setAllAlias(String allAlias) {
this.allAlias = allAlias;
}
public String getClusterAlias() {
return this.clusterAlias;
}
public void setClusterAlias(String clusterAlias) {
this.clusterAlias = clusterAlias;
}
public String getDefaultAlias() {
return this.defaultAlias;
}
public void setDefaultAlias(String defaultAlias) {
this.defaultAlias = defaultAlias;
}
public String getGatewayAlias() {
return this.gatewayAlias;
}
public void setGatewayAlias(String gatewayAlias) {
this.gatewayAlias = gatewayAlias;
}
public String getJmxAlias() {
return this.jmxAlias;
}
public void setJmxAlias(String jmxAlias) {
this.jmxAlias = jmxAlias;
}
public String getLocatorAlias() {
return this.locatorAlias;
}
public void setLocatorAlias(String locatorAlias) {
this.locatorAlias = locatorAlias;
}
public String getServerAlias() {
return this.serverAlias;
}
public void setServerAlias(String serverAlias) {
this.serverAlias = serverAlias;
}
public String getWebAlias() {
return this.webAlias;
}
public void setWebAlias(String webAlias) {
this.webAlias = webAlias;
}
}
}

View File

@@ -6,6 +6,7 @@ org.springframework.geode.boot.autoconfigure.CachingProviderAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.ClientSecurityAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.FunctionExecutionAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.GemFirePropertiesAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.PdxSerializationAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.PeerSecurityAutoConfiguration,\
org.springframework.geode.boot.autoconfigure.RepositoriesAutoConfiguration,\