geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [08/33] incubator-geode git commit: GEODE-913: refactor AbstractDistributionConfig
Date Wed, 17 Feb 2016 23:10:43 GMT
GEODE-913: refactor AbstractDistributionConfig

* use annotations to annotate the config attributes and its setters/getters/checkers
* delete multiple huge if/else statements to use annoations
* delete unnecessary checks use annotated checkers.
* delete all isXXModifiers to use attribute lists to denote if the attribute is modifiable
or not.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/70059905
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/70059905
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/70059905

Branch: refs/heads/feature/GEODE-831
Commit: 700599052b74072115b4b17b25de23dcd78cd8c2
Parents: 3adb0b8
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Thu Feb 4 07:57:27 2016 -0800
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Thu Feb 11 18:36:22 2016 -0800

----------------------------------------------------------------------
 .../admin/jmx/internal/AgentConfigImpl.java     |   25 +-
 .../internal/AbstractDistributionConfig.java    | 2690 ++----------------
 .../distributed/internal/ConfigAttribute.java   |   36 +
 .../internal/ConfigAttributeChecker.java        |   31 +
 .../internal/ConfigAttributeDesc.java           |   31 +
 .../internal/ConfigAttributeGetter.java         |   31 +
 .../internal/ConfigAttributeSetter.java         |   31 +
 .../internal/DistributionConfig.java            | 1061 ++++---
 .../internal/DistributionConfigImpl.java        |  361 +--
 .../internal/RuntimeDistributionConfigImpl.java |   74 +-
 .../gemfire/internal/AbstractConfig.java        |   60 +-
 .../gemstone/gemfire/internal/ConfigSource.java |   64 +-
 .../gemfire/internal/logging/LogConfig.java     |   12 +-
 .../internal/DistributionConfigJUnitTest.java   |  313 ++
 .../gemfire/internal/ConfigSourceJUnitTest.java |   89 +
 15 files changed, 1621 insertions(+), 3288 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70059905/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
index 9d602f6..985c8c0 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
@@ -16,21 +16,6 @@
  */
 package com.gemstone.gemfire.admin.jmx.internal;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.admin.DistributedSystemConfig;
 import com.gemstone.gemfire.admin.DistributionLocatorConfig;
@@ -38,12 +23,18 @@ import com.gemstone.gemfire.admin.internal.DistributedSystemConfigImpl;
 import com.gemstone.gemfire.admin.internal.InetAddressUtil;
 import com.gemstone.gemfire.admin.jmx.Agent;
 import com.gemstone.gemfire.admin.jmx.AgentConfig;
-import com.gemstone.gemfire.distributed.internal.AbstractDistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.util.IOUtils;
 
+import java.io.*;
+import java.net.InetAddress;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
 /**
  * Provides the JMX Agent configuration properties.
  * <p>


Mime
View raw message