You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ji...@apache.org on 2019/05/29 15:59:14 UTC
[geode] branch develop updated: Revert "GEODE-6803: Make CacheElement an interface and have RuntimeCacheEleme… (#3625)"
This is an automated email from the ASF dual-hosted git repository.
jinmeiliao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new b8fc62f Revert "GEODE-6803: Make CacheElement an interface and have RuntimeCacheEleme… (#3625)"
b8fc62f is described below
commit b8fc62fe71b5bd77f174ae08c92ea981afbc777b
Author: Jinmei Liao <ji...@pivotal.io>
AuthorDate: Wed May 29 08:58:44 2019 -0700
Revert "GEODE-6803: Make CacheElement an interface and have RuntimeCacheEleme… (#3625)"
This reverts commit 68dc56c1
---
.../integrationTest/resources/assembly_content.txt | 1 -
.../jdbc/internal/configuration/RegionMapping.java | 4 +-
.../api/LocatorClusterManagementService.java | 3 +-
.../mutators/ConfigurationManager.java | 2 +-
.../sanctioned-geode-core-serializables.txt | 2 +-
.../cache/configuration/RegionConfigTest.java | 13 -----
.../geode/internal/config/JAXBServiceTest.java | 6 +-
.../lucene/management/configuration/Index.java | 4 +-
.../cache/configuration/AbstractCacheElement.java | 66 ----------------------
.../geode/cache/configuration/CacheConfig.java | 2 +-
.../geode/cache/configuration/CacheElement.java | 58 +++++++++++++------
.../geode/cache/configuration/DiskStoreType.java | 2 +-
.../cache/configuration/JndiBindingsType.java | 4 +-
.../geode/cache/configuration/RegionConfig.java | 4 +-
.../management/api/ClusterManagementResult.java | 8 +--
.../management/configuration/MemberConfig.java | 5 +-
.../configuration/RuntimeCacheElement.java | 7 ++-
17 files changed, 70 insertions(+), 121 deletions(-)
diff --git a/geode-assembly/src/integrationTest/resources/assembly_content.txt b/geode-assembly/src/integrationTest/resources/assembly_content.txt
index bd22977..d67b198 100644
--- a/geode-assembly/src/integrationTest/resources/assembly_content.txt
+++ b/geode-assembly/src/integrationTest/resources/assembly_content.txt
@@ -286,7 +286,6 @@ javadoc/org/apache/geode/cache/client/SubscriptionNotEnabledException.html
javadoc/org/apache/geode/cache/client/package-frame.html
javadoc/org/apache/geode/cache/client/package-summary.html
javadoc/org/apache/geode/cache/client/package-tree.html
-javadoc/org/apache/geode/cache/configuration/AbstractCacheElement.html
javadoc/org/apache/geode/cache/configuration/CacheConfig.AsyncEventQueue.html
javadoc/org/apache/geode/cache/configuration/CacheConfig.CacheServer.html
javadoc/org/apache/geode/cache/configuration/CacheConfig.GatewayHub.Gateway.GatewayEndpoint.html
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java
index f265c35..aedbfe9 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/configuration/RegionMapping.java
@@ -28,7 +28,7 @@ import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.StringUtils;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.AbstractCacheElement;
+import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.XSDRootElement;
/**
@@ -40,7 +40,7 @@ import org.apache.geode.cache.configuration.XSDRootElement;
@XmlRootElement(name = "mapping", namespace = "http://geode.apache.org/schema/jdbc")
@XSDRootElement(namespace = "http://geode.apache.org/schema/jdbc",
schemaLocation = "http://geode.apache.org/schema/jdbc/jdbc-1.0.xsd")
-public class RegionMapping extends AbstractCacheElement {
+public class RegionMapping extends CacheElement {
@XmlElement(name = "field-mapping", namespace = "http://geode.apache.org/schema/jdbc")
protected final List<FieldMapping> fieldMappings = new ArrayList<>();
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java b/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
index fdad9f9..1643fc5 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/api/LocatorClusterManagementService.java
@@ -259,7 +259,8 @@ public class LocatorClusterManagementService implements ClusterManagementService
List<RuntimeCacheElement> resultList = new ArrayList<>();
// get a list of all the resultList from all groups that satisfy the filter criteria (all
- // filters have been applied except the group)
+ // filters
+ // have been applied except the group)
for (String group : persistenceService.getGroups()) {
CacheConfig currentPersistedConfig = persistenceService.getCacheConfig(group, true);
List<RuntimeCacheElement> listInGroup = manager.list(filter, currentPersistedConfig);
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java
index 83f31f9..1d22d86 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/configuration/mutators/ConfigurationManager.java
@@ -38,5 +38,5 @@ public interface ConfigurationManager<T extends CacheElement> {
void delete(T config, CacheConfig existing);
- List<? extends RuntimeCacheElement> list(T filterConfig, CacheConfig existing);
+ <R extends RuntimeCacheElement> List<R> list(T filterConfig, CacheConfig existing);
}
diff --git a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
index ad7b61b..09eca6b 100644
--- a/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
+++ b/geode-core/src/main/resources/org/apache/geode/internal/sanctioned-geode-core-serializables.txt
@@ -121,7 +121,7 @@ org/apache/geode/cache/client/internal/ContainsKeyOp$MODE,false
org/apache/geode/cache/client/internal/TXSynchronizationOp$CompletionType,false
org/apache/geode/cache/client/internal/pooling/ConnectionDestroyedException,true,-6918516787578041316
org/apache/geode/cache/configuration/CacheConfig$AsyncEventQueue,false,asyncEventListener:org/apache/geode/cache/configuration/DeclarableType,batchSize:java/lang/String,batchTimeInterval:java/lang/String,diskStoreName:java/lang/String,diskSynchronous:java/lang/Boolean,dispatcherThreads:java/lang/String,enableBatchConflation:java/lang/Boolean,forwardExpirationDestroy:java/lang/Boolean,gatewayEventFilters:java/util/List,gatewayEventSubstitutionFilter:org/apache/geode/cache/configuration/De [...]
-org/apache/geode/cache/configuration/AbstractCacheElement,false,group:java/lang/String
+org/apache/geode/cache/configuration/CacheElement,false,group:java/lang/String
org/apache/geode/cache/configuration/ClassNameType,false,className:java/lang/String
org/apache/geode/cache/configuration/DeclarableType,false,parameters:java/util/List
org/apache/geode/cache/configuration/DiskDirsType,false,diskDirs:java/util/List
diff --git a/geode-core/src/test/java/org/apache/geode/cache/configuration/RegionConfigTest.java b/geode-core/src/test/java/org/apache/geode/cache/configuration/RegionConfigTest.java
index 385b481..dc06e1c 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/configuration/RegionConfigTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/configuration/RegionConfigTest.java
@@ -258,17 +258,4 @@ public class RegionConfigTest {
assertThatThrownBy(() -> validator.validate(CacheElementOperation.CREATE, config))
.isInstanceOf(IllegalArgumentException.class);
}
-
- @Test
- public void regionWithGroup() throws Exception {
- RegionConfig regionConfig = new RegionConfig();
- regionConfig.setName("test");
- regionConfig.setType("REPLICATE");
- regionConfig.setGroup("group");
-
- CacheConfig cacheConfig = new CacheConfig();
- cacheConfig.getRegions().add(regionConfig);
- String xml = service.marshall(cacheConfig);
- assertThat(xml).doesNotContain("group");
- }
}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java b/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java
index 61b840d..99dc8e8 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/config/JAXBServiceTest.java
@@ -31,8 +31,8 @@ import javax.xml.bind.annotation.XmlType;
import org.junit.Before;
import org.junit.Test;
-import org.apache.geode.cache.configuration.AbstractCacheElement;
import org.apache.geode.cache.configuration.CacheConfig;
+import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.RegionConfig;
import org.apache.geode.cache.configuration.RegionType;
@@ -226,7 +226,7 @@ public class JAXBServiceTest {
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"id", "value"})
@XmlRootElement(name = "custom-one", namespace = "http://geode.apache.org/schema/CustomOne")
- public static class ElementOne extends AbstractCacheElement {
+ public static class ElementOne extends CacheElement {
@XmlElement(name = "id", namespace = "http://geode.apache.org/schema/CustomOne")
private String id;
@XmlElement(name = "value", namespace = "http://geode.apache.org/schema/CustomOne")
@@ -259,7 +259,7 @@ public class JAXBServiceTest {
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"id", "value"})
@XmlRootElement(name = "custom-two", namespace = "http://geode.apache.org/schema/CustomTwo")
- public static class ElementTwo extends AbstractCacheElement {
+ public static class ElementTwo extends CacheElement {
@XmlElement(name = "id", namespace = "http://geode.apache.org/schema/CustomTwo")
private String id;
@XmlElement(name = "value", namespace = "http://geode.apache.org/schema/CustomTwo")
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/configuration/Index.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/configuration/Index.java
index f746f15..2b324d3 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/configuration/Index.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/configuration/Index.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
-import org.apache.geode.cache.configuration.AbstractCacheElement;
+import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.cache.configuration.DeclarableType;
import org.apache.geode.cache.configuration.XSDRootElement;
@@ -71,7 +71,7 @@ import org.apache.geode.cache.configuration.XSDRootElement;
@XmlRootElement(name = "index", namespace = "http://geode.apache.org/schema/lucene")
@XSDRootElement(namespace = "http://geode.apache.org/schema/lucene",
schemaLocation = "http://geode.apache.org/schema/lucene/lucene-1.0.xsd")
-public class Index extends AbstractCacheElement {
+public class Index extends CacheElement {
@XmlElement(namespace = "http://geode.apache.org/schema/lucene", required = true)
protected List<Index.Field> field;
@XmlElement(namespace = "http://geode.apache.org/schema/lucene")
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/AbstractCacheElement.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/AbstractCacheElement.java
deleted file mode 100644
index a404adc..0000000
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/AbstractCacheElement.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.geode.cache.configuration;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.commons.lang3.StringUtils;
-
-import org.apache.geode.annotations.Experimental;
-
-@Experimental
-public abstract class AbstractCacheElement implements CacheElement {
- protected List<String> groups = new ArrayList<>();
-
- /**
- * this returns a non-null value
- * for cluster level element, it will return "cluster" for sure.
- */
- @XmlTransient
- public String getConfigGroup() {
- String group = getGroup();
- if (StringUtils.isBlank(group)) {
- return "cluster";
- }
- return group;
- }
-
- /**
- * this returns the first group set by the user
- * if no group is set, this returns null
- */
- @XmlTransient
- public String getGroup() {
- if (groups.size() == 0) {
- return null;
- }
- return groups.get(0);
- }
-
- public void setGroup(String group) {
- groups.clear();
-
- if (StringUtils.isBlank(group)) {
- return;
- }
- groups.add(group);
- }
-}
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
index 76ec03b..dcacf5f 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
+++ b/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java
@@ -1108,7 +1108,7 @@ public class CacheConfig {
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "",
propOrder = {"gatewayEventFilters", "gatewayEventSubstitutionFilter", "asyncEventListener"})
- public static class AsyncEventQueue extends AbstractCacheElement {
+ public static class AsyncEventQueue extends CacheElement {
@XmlElement(name = "gateway-event-filter", namespace = "http://geode.apache.org/schema/cache")
protected List<DeclarableType> gatewayEventFilters;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
index 8914fd4..268ae1d 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
+++ b/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheElement.java
@@ -1,21 +1,24 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ * 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.apache.geode.cache.configuration;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlTransient;
@@ -23,20 +26,25 @@ import javax.xml.bind.annotation.XmlTransient;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.geode.annotations.Experimental;
import org.apache.geode.lang.Identifiable;
+@Experimental
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "class")
-public interface CacheElement extends Identifiable<String>, Serializable {
- static <T extends Identifiable> boolean exists(List<T> list, String id) {
+public abstract class CacheElement implements Identifiable<String>, Serializable {
+ protected List<String> groups = new ArrayList<>();
+
+ public static <T extends Identifiable> boolean exists(List<T> list, String id) {
return list.stream().anyMatch(o -> o.getId().equals(id));
}
- static <T extends Identifiable> T findElement(List<T> list, String id) {
+ public static <T extends Identifiable> T findElement(List<T> list, String id) {
return list.stream().filter(o -> o.getId().equals(id)).findFirst().orElse(null);
}
- static <T extends Identifiable> void removeElement(List<T> list, String id) {
+ public static <T extends Identifiable> void removeElement(List<T> list, String id) {
list.removeIf(t -> t.getId().equals(id));
}
@@ -46,15 +54,33 @@ public interface CacheElement extends Identifiable<String>, Serializable {
*/
@XmlTransient
@JsonIgnore
- String getConfigGroup();
+ public String getConfigGroup() {
+ String group = getGroup();
+ if (StringUtils.isBlank(group)) {
+ return "cluster";
+ }
+ return group;
+ }
/**
* this returns the first group set by the user
* if no group is set, this returns null
*/
@XmlTransient
- String getGroup();
+ public String getGroup() {
+ if (groups.size() == 0) {
+ return null;
+ }
+ return groups.get(0);
+ }
@JsonSetter
- void setGroup(String group);
+ public void setGroup(String group) {
+ groups.clear();
+
+ if (StringUtils.isBlank(group)) {
+ return;
+ }
+ groups.add(group);
+ }
}
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
index e961527..ae8d959 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
+++ b/geode-management/src/main/java/org/apache/geode/cache/configuration/DiskStoreType.java
@@ -70,7 +70,7 @@ import org.apache.geode.annotations.Experimental;
@XmlType(name = "disk-store-type", namespace = "http://geode.apache.org/schema/cache",
propOrder = {"diskDirs"})
@Experimental
-public class DiskStoreType extends AbstractCacheElement {
+public class DiskStoreType extends CacheElement {
@XmlElement(name = "disk-dirs", namespace = "http://geode.apache.org/schema/cache")
protected DiskDirsType diskDirs;
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
index 46522df..04aa221 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
+++ b/geode-management/src/main/java/org/apache/geode/cache/configuration/JndiBindingsType.java
@@ -202,7 +202,7 @@ public class JndiBindingsType {
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"configProperties"})
@Experimental
- public static class JndiBinding extends AbstractCacheElement {
+ public static class JndiBinding extends CacheElement {
@XmlElement(name = "config-property", namespace = "http://geode.apache.org/schema/cache")
protected List<ConfigProperty> configProperties;
@@ -628,7 +628,7 @@ public class JndiBindingsType {
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "",
propOrder = {"configPropertyName", "configPropertyType", "configPropertyValue"})
- public static class ConfigProperty extends AbstractCacheElement {
+ public static class ConfigProperty extends CacheElement {
@XmlElement(name = "config-property-name", namespace = "http://geode.apache.org/schema/cache",
required = true)
diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
index aed9f3c..b041942 100644
--- a/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
+++ b/geode-management/src/main/java/org/apache/geode/cache/configuration/RegionConfig.java
@@ -156,7 +156,7 @@ import org.apache.geode.management.api.RestfulEndpoint;
@XmlType(name = "region-type", namespace = "http://geode.apache.org/schema/cache",
propOrder = {"regionAttributes", "indexes", "entries", "regionElements", "regions"})
@Experimental
-public class RegionConfig extends AbstractCacheElement implements RestfulEndpoint {
+public class RegionConfig extends CacheElement implements RestfulEndpoint {
public static final String REGION_CONFIG_ENDPOINT = "/regions";
@@ -530,7 +530,7 @@ public class RegionConfig extends AbstractCacheElement implements RestfulEndpoin
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
- public static class Index extends AbstractCacheElement implements RestfulEndpoint {
+ public static class Index extends CacheElement implements RestfulEndpoint {
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "expression")
diff --git a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementResult.java b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementResult.java
index 20b9897..d296ffa 100644
--- a/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementResult.java
+++ b/geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementResult.java
@@ -25,7 +25,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.management.configuration.RuntimeCacheElement;
@Experimental
public class ClusterManagementResult {
@@ -65,7 +65,7 @@ public class ClusterManagementResult {
// Override the mapper setting so that we always show result
@JsonInclude
@JsonProperty
- private List<? extends CacheElement> result = new ArrayList<>();
+ private List<? extends RuntimeCacheElement> result = new ArrayList<>();
public ClusterManagementResult() {}
@@ -115,11 +115,11 @@ public class ClusterManagementResult {
return statusCode;
}
- public <R extends CacheElement> List<R> getResult(Class<R> clazz) {
+ public <R extends RuntimeCacheElement> List<R> getResult(Class<R> clazz) {
return result.stream().map(clazz::cast).collect(Collectors.toList());
}
- public void setResult(List<? extends CacheElement> result) {
+ public void setResult(List<? extends RuntimeCacheElement> result) {
this.result = result;
}
}
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java b/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java
index 8eb9b35..49e460f 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/MemberConfig.java
@@ -21,12 +21,11 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.geode.annotations.Experimental;
-import org.apache.geode.cache.configuration.AbstractCacheElement;
+import org.apache.geode.cache.configuration.CacheElement;
import org.apache.geode.management.api.RestfulEndpoint;
@Experimental
-public class MemberConfig extends AbstractCacheElement
- implements RuntimeCacheElement, RestfulEndpoint {
+public class MemberConfig extends CacheElement implements RuntimeCacheElement, RestfulEndpoint {
private static final long serialVersionUID = -6262538068604902018L;
diff --git a/geode-management/src/main/java/org/apache/geode/management/configuration/RuntimeCacheElement.java b/geode-management/src/main/java/org/apache/geode/management/configuration/RuntimeCacheElement.java
index 9e8845d..b15e199 100644
--- a/geode-management/src/main/java/org/apache/geode/management/configuration/RuntimeCacheElement.java
+++ b/geode-management/src/main/java/org/apache/geode/management/configuration/RuntimeCacheElement.java
@@ -15,15 +15,18 @@
package org.apache.geode.management.configuration;
+import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlTransient;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import org.apache.geode.cache.configuration.CacheElement;
+import org.apache.geode.lang.Identifiable;
-public interface RuntimeCacheElement extends CacheElement {
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "class")
+public interface RuntimeCacheElement extends Identifiable<String>, Serializable {
@XmlTransient
List<String> getGroups();