updated reference docs and build config for GF 7
This commit is contained in:
@@ -123,14 +123,14 @@ abstract class AbstractRegionParser extends AliasReplacingBeanDefinitionParser {
|
||||
String hubId = element.getAttribute("hub-id");
|
||||
// Factory will enable gateway if it is not set and hub-id is set.
|
||||
if (StringUtils.hasText(enableGateway)) {
|
||||
if (ParsingUtils.GEMFIRE_VERSION.startsWith("7")) {
|
||||
if (ParsingUtils.isGemfireV7OrAbove()) {
|
||||
log.warn("'enable-gateway' is deprecated since Gemfire 7.0");
|
||||
}
|
||||
}
|
||||
ParsingUtils.setPropertyValue(element, builder, "enable-gateway");
|
||||
|
||||
if (StringUtils.hasText(hubId)) {
|
||||
if (ParsingUtils.GEMFIRE_VERSION.startsWith("7")) {
|
||||
if (ParsingUtils.isGemfireV7OrAbove()) {
|
||||
log.warn("'hub-id' is deprecated since Gemfire 7.0");
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(DomUtils.getChildElementsByTagName(element, "gateway-sender"))) {
|
||||
|
||||
@@ -18,6 +18,8 @@ package org.springframework.data.gemfire.config;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.BeanMetadataAttribute;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.BeanDefinitionHolder;
|
||||
@@ -48,6 +50,8 @@ import com.gemstone.gemfire.cache.Scope;
|
||||
* @author David Turanski
|
||||
*/
|
||||
abstract class ParsingUtils {
|
||||
|
||||
private static Log log = LogFactory.getLog(ParsingUtils.class);
|
||||
|
||||
final static String GEMFIRE_VERSION = CacheFactory.getVersion();
|
||||
|
||||
@@ -309,6 +313,17 @@ abstract class ParsingUtils {
|
||||
if (StringUtils.hasText(indexUpdateType)) {
|
||||
attrBuilder.addPropertyValue("indexMaintenanceSynchronous", "synchronous".equals(indexUpdateType));
|
||||
}
|
||||
|
||||
String concurrencyChecksEnabled = element.getAttribute("concurrency-checks-enabled");
|
||||
if (StringUtils.hasText(concurrencyChecksEnabled)) {
|
||||
if (!ParsingUtils.isGemfireV7OrAbove()) {
|
||||
log.warn("'concurrency-checks-enabled' is only available in Gemfire 7.0 or above");
|
||||
} else {
|
||||
ParsingUtils.setPropertyValue(element, attrBuilder, "concurrency-checks-enabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void parseMembershipAttributes(ParserContext parserContext, Element element,
|
||||
@@ -339,8 +354,7 @@ abstract class ParsingUtils {
|
||||
}
|
||||
|
||||
static void throwExceptionIfNotGemfireV7(String elementName, String attributeName, ParserContext parserContext) {
|
||||
boolean checkGemfireV7 = !GEMFIRE_VERSION.startsWith("7");
|
||||
if (checkGemfireV7) {
|
||||
if (!isGemfireV7OrAbove()) {
|
||||
String messagePrefix = (attributeName == null) ? "element '" + elementName + "'" : "attribute '"
|
||||
+ attributeName + " of element '" + elementName + "'";
|
||||
parserContext.getReaderContext().error(
|
||||
@@ -348,6 +362,13 @@ abstract class ParsingUtils {
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
static boolean isGemfireV7OrAbove() {
|
||||
|
||||
int version = Integer.parseInt(GEMFIRE_VERSION.substring(0,1));
|
||||
return version >= 7;
|
||||
|
||||
}
|
||||
|
||||
static void parseScope(Element element, BeanDefinitionBuilder builder) {
|
||||
String scope = element.getAttribute("scope");
|
||||
|
||||
Reference in New Issue
Block a user