geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/2] geode git commit: Aggressive cleanup
Date Tue, 25 Jul 2017 00:30:12 GMT
Aggressive cleanup


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

Branch: refs/heads/FunctionContext
Commit: 94f74294c621c3244bd24f297705dafe118d9155
Parents: cfa54f5
Author: Kirk Lund <klund@apache.org>
Authored: Mon Jul 24 17:29:48 2017 -0700
Committer: Kirk Lund <klund@apache.org>
Committed: Mon Jul 24 17:29:48 2017 -0700

----------------------------------------------------------------------
 .../CreateAlterDestroyRegionCommands.java       |   4 +-
 .../internal/cli/commands/DataCommands.java     |   4 +-
 .../functions/AlterRuntimeConfigFunction.java   |   2 +-
 .../functions/AsyncEventQueueFunctionArgs.java  |  12 +-
 .../cli/functions/ChangeLogLevelFunction.java   |   4 +-
 .../cli/functions/CliFunctionResult.java        |   4 -
 .../functions/CloseDurableClientFunction.java   |   2 +-
 .../cli/functions/CloseDurableCqFunction.java   |   2 +-
 .../cli/functions/ContinuousQueryFunction.java  |  11 +-
 .../CreateAsyncEventQueueFunction.java          |   6 +-
 .../functions/CreateDefinedIndexesFunction.java |   5 +-
 .../cli/functions/CreateDiskStoreFunction.java  |   2 +-
 .../cli/functions/CreateIndexFunction.java      |   6 +-
 .../cli/functions/DataCommandFunction.java      |  74 ++--
 .../functions/DescribeDiskStoreFunction.java    |  21 +-
 .../cli/functions/DestroyDiskStoreFunction.java |   2 +-
 .../cli/functions/DestroyIndexFunction.java     |   2 +-
 .../cli/functions/ExportDataFunction.java       |   2 +-
 .../cli/functions/ExportLogsFunction.java       |  13 +-
 .../FetchRegionAttributesFunction.java          |  31 +-
 .../FetchSharedConfigurationStatusFunction.java |   2 +-
 .../GatewayReceiverCreateFunction.java          |   4 +-
 .../functions/GatewaySenderCreateFunction.java  |   4 +-
 .../functions/GatewaySenderDestroyFunction.java |   6 +-
 .../GatewaySenderDestroyFunctionArgs.java       |   3 +-
 .../functions/GatewaySenderFunctionArgs.java    |  14 +-
 .../GetMemberConfigInformationFunction.java     |  14 +-
 .../functions/GetMemberInformationFunction.java |  53 ++-
 .../functions/GetRegionDescriptionFunction.java |   7 +-
 .../cli/functions/GetRegionsFunction.java       |   5 +-
 .../cli/functions/GetStackTracesFunction.java   |   5 +-
 .../GetSubscriptionQueueSizeFunction.java       |  10 +-
 .../cli/functions/ImportDataFunction.java       |  20 +-
 .../functions/ListAsyncEventQueuesFunction.java |   4 +-
 .../cli/functions/ListDeployedFunction.java     |  11 +-
 .../cli/functions/ListDiskStoresFunction.java   |  11 +-
 .../functions/ListDurableCqNamesFunction.java   |   8 +-
 .../cli/functions/ListFunctionFunction.java     |  13 +-
 .../cli/functions/ListIndexFunction.java        |   9 +-
 .../cli/functions/MembersForRegionFunction.java |  24 +-
 .../internal/cli/functions/NetstatFunction.java |  95 +++--
 .../cli/functions/RebalanceFunction.java        |  34 +-
 .../cli/functions/RegionAlterFunction.java      |  67 ++--
 .../cli/functions/RegionCreateFunction.java     | 109 +++---
 .../cli/functions/RegionDestroyFunction.java    |  17 +-
 .../cli/functions/RegionFunctionArgs.java       | 385 ++++++++-----------
 .../ShowMissingDiskStoresFunction.java          |  11 +-
 .../cli/functions/ShutDownFunction.java         |  11 +-
 .../cli/functions/SizeExportLogsFunction.java   |   4 +-
 .../cli/functions/UndeployFunction.java         |  16 +-
 .../cli/functions/UnregisterFunction.java       |   4 +-
 .../cli/functions/UserFunctionExecution.java    |   7 +-
 .../functions/DataCommandFunctionJUnitTest.java |   6 +-
 53 files changed, 588 insertions(+), 614 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
index edc83f8..4d6e0c7 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
@@ -259,6 +259,7 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
         String cacheWriterClass =
             cacheWriter != null ? cacheWriter : regionAttributesResult.getCacheWriterClass();
 
+        // use constructor with RegionAttributes (NOTE: evictionMax and compressor are null)
         regionFunctionArgs = new RegionFunctionArgs(regionPath, useAttributesFrom, skipIfExists,
             keyConstraint, valueConstraint, statisticsEnabled, entryIdle, entryTTL, regionIdle,
             regionTTL, diskStore, diskSynchronous, enableAsyncConflation,
@@ -266,7 +267,7 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
             asyncEventQueueIds, gatewaySenderIds, concurrencyChecksEnabled, cloningEnabled,
             concurrencyLevel, prColocatedWith, prLocalMaxMemory, prRecoveryDelay, prRedundantCopies,
             prStartupRecoveryDelay, prTotalMaxMemory, prTotalNumBuckets, offHeap, mcastEnabled,
-            regionAttributes, partitionResolver);
+            partitionResolver, regionAttributes);
 
         if (regionAttributes.getPartitionAttributes() == null
             && regionFunctionArgs.hasPartitionAttributes()) {
@@ -277,6 +278,7 @@ public class CreateAlterDestroyRegionCommands implements GfshCommand {
                   useAttributesFrom));
         }
       } else {
+        // use constructor with RegionShortcut (NOTE: evictionMax is null)
         regionFunctionArgs = new RegionFunctionArgs(regionPath, regionShortcut, useAttributesFrom,
             skipIfExists, keyConstraint, valueConstraint, statisticsEnabled, entryIdle, entryTTL,
             regionIdle, regionTTL, diskStore, diskSynchronous, enableAsyncConflation,

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
index 69daca6..4dd04cf 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DataCommands.java
@@ -966,8 +966,8 @@ public class DataCommands implements GfshCommand {
             false);
       }
     } else {
-      dataResult = getfn.get(null, key, keyClass, valueClass, regionPath, loadOnCacheMiss,
-          cache.getSecurityService());
+      dataResult =
+          getfn.get(null, key, keyClass, regionPath, loadOnCacheMiss, cache.getSecurityService());
     }
     dataResult.setKeyClass(keyClass);
     if (valueClass != null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AlterRuntimeConfigFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AlterRuntimeConfigFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AlterRuntimeConfigFunction.java
index 3beca94..2505516 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AlterRuntimeConfigFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AlterRuntimeConfigFunction.java
@@ -31,7 +31,7 @@ import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.management.internal.cli.CliUtil;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 
-public class AlterRuntimeConfigFunction implements InternalEntity, Function {
+public class AlterRuntimeConfigFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
   private static Logger logger = LogService.getLogger();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AsyncEventQueueFunctionArgs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AsyncEventQueueFunctionArgs.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AsyncEventQueueFunctionArgs.java
index 2a67270..aaeb9ed 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AsyncEventQueueFunctionArgs.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/AsyncEventQueueFunctionArgs.java
@@ -40,11 +40,13 @@ public class AsyncEventQueueFunctionArgs implements Serializable {
   private final Properties listenerProperties;
   private final boolean forwardExpirationDestroy;
 
-  public AsyncEventQueueFunctionArgs(String asyncEventQueueId, boolean isParallel,
-      boolean enableBatchConflation, int batchSize, int batchTimeInterval, boolean persistent,
-      String diskStoreName, boolean diskSynchronous, int maxQueueMemory, int dispatcherThreads,
-      String orderPolicy, String[] gatewayEventFilters, String gatewaySubstitutionFilter,
-      String listenerClassName, Properties listenerProperties, boolean forwardExpirationDestroy) {
+  public AsyncEventQueueFunctionArgs(final String asyncEventQueueId, final boolean isParallel,
+      final boolean enableBatchConflation, final int batchSize, final int batchTimeInterval,
+      final boolean persistent, final String diskStoreName, final boolean diskSynchronous,
+      final int maxQueueMemory, final int dispatcherThreads, final String orderPolicy,
+      final String[] gatewayEventFilters, final String gatewaySubstitutionFilter,
+      final String listenerClassName, final Properties listenerProperties,
+      final boolean forwardExpirationDestroy) {
     this.asyncEventQueueId = asyncEventQueueId;
     this.isParallel = isParallel;
     this.enableBatchConflation = enableBatchConflation;

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ChangeLogLevelFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ChangeLogLevelFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ChangeLogLevelFunction.java
index 1961f0a..fe9a515 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ChangeLogLevelFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ChangeLogLevelFunction.java
@@ -35,7 +35,7 @@ import org.apache.geode.internal.logging.log4j.LogWriterLogger;
 /**
  * Class for change log level function
  * 
- * since 8.0
+ * @since GemFire 8.0
  */
 public class ChangeLogLevelFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
@@ -49,7 +49,7 @@ public class ChangeLogLevelFunction implements Function, InternalEntity {
     try {
       LogWriterLogger logwriterLogger = (LogWriterLogger) cache.getLogger();
       Object[] args = (Object[]) context.getArguments();
-      final String logLevel = (String) args[0];
+      String logLevel = (String) args[0];
       Level log4jLevel = LogLevel.getLevel(logLevel);
       logwriterLogger.setLevel(log4jLevel);
       System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, logLevel);

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
index 7c6ce3c..914f092 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CliFunctionResult.java
@@ -174,10 +174,6 @@ public class CliFunctionResult implements Comparable<CliFunctionResult>, DataSer
     return this.xmlEntity;
   }
 
-  public byte[] getByteData() {
-    return this.byteData;
-  }
-
   @Override
   public int compareTo(final CliFunctionResult o) {
     if (this.memberIdOrName == null && o.memberIdOrName == null) {

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableClientFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableClientFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableClientFunction.java
index 4918544..3decf83 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableClientFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableClientFunction.java
@@ -27,7 +27,7 @@ import org.apache.geode.management.internal.cli.i18n.CliStrings;
 /**
  * Function to close a durable client
  */
-public class CloseDurableClientFunction implements InternalEntity, Function {
+public class CloseDurableClientFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableCqFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableCqFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableCqFunction.java
index 6793028..c9d7728 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableCqFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CloseDurableCqFunction.java
@@ -27,7 +27,7 @@ import org.apache.geode.management.internal.cli.i18n.CliStrings;
 /**
  * Function to close a durable cq
  */
-public class CloseDurableCqFunction implements InternalEntity, Function {
+public class CloseDurableCqFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ContinuousQueryFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ContinuousQueryFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ContinuousQueryFunction.java
index 2810b16..15ba98b 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ContinuousQueryFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ContinuousQueryFunction.java
@@ -36,24 +36,28 @@ public class ContinuousQueryFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     try {
       String clientID = (String) context.getArguments();
       Cache cache = context.getCache();
+
       if (cache.getCacheServers().size() > 0) {
         CacheServerImpl server = (CacheServerImpl) cache.getCacheServers().iterator().next();
+
         if (server != null) {
           AcceptorImpl acceptorImpl = server.getAcceptor();
+
           if (acceptorImpl != null) {
             CacheClientNotifier cacheClientNotifier = acceptorImpl.getCacheClientNotifier();
+
             if (cacheClientNotifier != null) {
               Collection<CacheClientProxy> cacheClientProxySet =
                   cacheClientNotifier.getClientProxies();
               ClientInfo clientInfo = null;
               boolean foundClientinCCP = false;
+
               Iterator<CacheClientProxy> it = cacheClientProxySet.iterator();
               while (it.hasNext()) {
-
                 CacheClientProxy ccp = it.next();
                 if (ccp != null) {
                   String clientIdFromProxy = ccp.getProxyID().getDSMembership();
@@ -118,6 +122,9 @@ public class ContinuousQueryFunction implements Function, InternalEntity {
     return false;
   }
 
+  /**
+   * Info details about cache client.
+   */
   public class ClientInfo implements Serializable {
     private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateAsyncEventQueueFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateAsyncEventQueueFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateAsyncEventQueueFunction.java
index a76df15..9f35538 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateAsyncEventQueueFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateAsyncEventQueueFunction.java
@@ -47,7 +47,7 @@ import org.apache.geode.management.internal.configuration.domain.XmlEntity;
  *
  * @since GemFire 8.0
  */
-public class CreateAsyncEventQueueFunction implements InternalEntity, Function {
+public class CreateAsyncEventQueueFunction implements Function, InternalEntity {
   private static final Logger logger = LogService.getLogger();
   private static final long serialVersionUID = 1L;
 
@@ -147,10 +147,12 @@ public class CreateAsyncEventQueueFunction implements InternalEntity, Function {
 
     try {
       return ClassPathLoader.getLatest().forName(className);
+
     } catch (ClassNotFoundException e) {
       throw new RuntimeException(CliStrings.format(
           CliStrings.CREATE_ASYNC_EVENT_QUEUE__MSG__COULD_NOT_FIND_CLASS_0_SPECIFIED_FOR_1,
           className, neededFor), e);
+
     } catch (ClassCastException e) {
       throw new RuntimeException(CliStrings.format(
           CliStrings.CREATE_ASYNC_EVENT_QUEUE__MSG__CLASS_0_SPECIFIED_FOR_1_IS_NOT_OF_EXPECTED_TYPE,
@@ -161,10 +163,12 @@ public class CreateAsyncEventQueueFunction implements InternalEntity, Function {
   private static Object newInstance(final Class<?> klass, final String neededFor) {
     try {
       return klass.newInstance();
+
     } catch (InstantiationException e) {
       throw new RuntimeException(CliStrings.format(
           CliStrings.CREATE_ASYNC_EVENT_QUEUE__MSG__COULD_NOT_INSTANTIATE_CLASS_0_SPECIFIED_FOR_1,
           klass, neededFor), e);
+
     } catch (IllegalAccessException e) {
       throw new RuntimeException(CliStrings.format(
           CliStrings.CREATE_ASYNC_EVENT_QUEUE__MSG__COULD_NOT_ACCESS_CLASS_0_SPECIFIED_FOR_1, klass,

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDefinedIndexesFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDefinedIndexesFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDefinedIndexesFunction.java
index a026085..18eb0b9 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDefinedIndexesFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDefinedIndexesFunction.java
@@ -26,7 +26,7 @@ import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.management.internal.cli.domain.IndexInfo;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 
-public class CreateDefinedIndexesFunction implements InternalEntity, Function {
+public class CreateDefinedIndexesFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
@@ -37,6 +37,7 @@ public class CreateDefinedIndexesFunction implements InternalEntity, Function {
       Cache cache = context.getCache();
       memberId = cache.getDistributedSystem().getDistributedMember().getId();
       QueryService queryService = cache.getQueryService();
+
       Set<IndexInfo> indexDefinitions = (Set<IndexInfo>) context.getArguments();
       for (IndexInfo indexDefinition : indexDefinitions) {
         String indexName = indexDefinition.getIndexName();
@@ -50,7 +51,9 @@ public class CreateDefinedIndexesFunction implements InternalEntity, Function {
           queryService.defineIndex(indexName, indexedExpression, regionPath);
         }
       }
+
       queryService.createDefinedIndexes();
+
       context.getResultSender().lastResult(new CliFunctionResult(memberId));
 
     } catch (MultiIndexCreationException e) {

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDiskStoreFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDiskStoreFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDiskStoreFunction.java
index 85b8e98..6ccd67d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDiskStoreFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateDiskStoreFunction.java
@@ -34,7 +34,7 @@ import org.apache.geode.management.internal.configuration.domain.XmlEntity;
  *
  * @since GemFire 8.0
  */
-public class CreateDiskStoreFunction implements InternalEntity, Function {
+public class CreateDiskStoreFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
   private static final Logger logger = LogService.getLogger();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateIndexFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateIndexFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateIndexFunction.java
index 897bd0d..1c332ee 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateIndexFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/CreateIndexFunction.java
@@ -31,11 +31,11 @@ import org.apache.geode.management.internal.configuration.domain.XmlEntity;
 /**
  * Function to create index in a member, based on different arguments passed to it
  */
-public class CreateIndexFunction implements InternalEntity, Function {
+public class CreateIndexFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     IndexInfo indexInfo = (IndexInfo) context.getArguments();
     String memberId = null;
 
@@ -46,8 +46,10 @@ public class CreateIndexFunction implements InternalEntity, Function {
       String indexName = indexInfo.getIndexName();
       String indexedExpression = indexInfo.getIndexedExpression();
       String fromClause = indexInfo.getRegionPath();
+
       // Check to see if the region path contains an alias e.g "/region1 r1"
       // Then the first string will be the regionPath
+
       String[] regionPathTokens = fromClause.trim().split(" ");
       String regionPath = regionPathTokens[0];
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java
index 6a0d3e9..afad0d7 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DataCommandFunction.java
@@ -65,36 +65,13 @@ import org.apache.geode.pdx.PdxInstance;
 /**
  * @since GemFire 7.0
  */
-public class DataCommandFunction implements InternalEntity, Function {
+public class DataCommandFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
   private static final Logger logger = LogService.getLogger();
 
   private static final int NESTED_JSON_LENGTH = 20;
 
-  private boolean optimizeForWrite = false;
-  private InternalCache cache;
-
-  @Override
-  public boolean hasResult() {
-    return true;
-  }
-
-  @Override
-  public boolean isHA() {
-    return false;
-  }
-
-  /**
-   * Read only function
-   */
-  @Override
-  public boolean optimizeForWrite() {
-    return optimizeForWrite;
-  }
-
-  public void setOptimizeForWrite(boolean optimizeForWrite) {
-    this.optimizeForWrite = optimizeForWrite;
-  }
+  private transient InternalCache cache;
 
   @Override
   public void execute(final FunctionContext functionContext) {
@@ -129,6 +106,21 @@ public class DataCommandFunction implements InternalEntity, Function {
     }
   }
 
+  @Override
+  public boolean hasResult() {
+    return true;
+  }
+
+  @Override
+  public boolean optimizeForWrite() {
+    return false;
+  }
+
+  @Override
+  public boolean isHA() {
+    return false;
+  }
+
   private DataCommandResult remove(final DataCommandRequest request) {
     String key = request.getKey();
     String keyClass = request.getKeyClass();
@@ -144,8 +136,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     String valueClass = request.getValueClass();
     String regionName = request.getRegionName();
     Boolean loadOnCacheMiss = request.isLoadOnCacheMiss();
-    return get(request.getPrincipal(), key, keyClass, valueClass, regionName, loadOnCacheMiss,
-        securityService);
+    return get(request.getPrincipal(), key, keyClass, regionName, loadOnCacheMiss, securityService);
   }
 
   private DataCommandResult locateEntry(final DataCommandRequest request) {
@@ -154,7 +145,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     String valueClass = request.getValueClass();
     String regionName = request.getRegionName();
     boolean recursive = request.isRecursive();
-    return locateEntry(key, keyClass, valueClass, regionName, recursive);
+    return locateEntry(key, keyClass, regionName, recursive);
   }
 
   private DataCommandResult put(final DataCommandRequest request) {
@@ -198,15 +189,18 @@ public class DataCommandFunction implements InternalEntity, Function {
 
     try {
       Object results = query.execute();
+
       if (tracedQuery.isTraced()) {
-        queryVerboseMsg = getLogMessage(queryObserver, startTime, queryString);
+        queryVerboseMsg = getLogMessage(queryObserver, startTime);
         queryObserver.reset2();
       }
+
       if (results instanceof SelectResults) {
         select_SelectResults((SelectResults) results, principal, list, nestedObjectCount);
       } else {
         select_NonSelectResults(results, list);
       }
+
       return DataCommandResult.createSelectResult(queryString, list, queryVerboseMsg, null, null,
           true);
 
@@ -236,6 +230,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     } catch (GfJsonException e) {
       logger.info("Exception occurred:", e);
       jsonBean = new GfJsonObject();
+
       try {
         jsonBean.put("msg", e.getMessage());
       } catch (GfJsonException e1) {
@@ -258,7 +253,7 @@ public class DataCommandFunction implements InternalEntity, Function {
 
       if (object instanceof Struct) {
         StructImpl impl = (StructImpl) object;
-        GfJsonObject jsonStruct = getJSONForStruct(impl, nestedObjectCount);
+        GfJsonObject jsonStruct = getJSONForStruct(impl);
         if (logger.isDebugEnabled()) {
           logger.debug("SelectResults : Adding select json string : {}", jsonStruct);
         }
@@ -284,6 +279,7 @@ public class DataCommandFunction implements InternalEntity, Function {
         } catch (GfJsonException e) {
           logger.error(e.getMessage(), e);
           jsonBean = new GfJsonObject();
+
           try {
             jsonBean.put("msg", e.getMessage());
           } catch (GfJsonException e1) {
@@ -309,8 +305,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     }
   }
 
-  private GfJsonObject getJSONForStruct(final StructImpl impl, final AtomicInteger ai)
-      throws GfJsonException {
+  private GfJsonObject getJSONForStruct(final StructImpl impl) throws GfJsonException {
     String fields[] = impl.getFieldNames();
     Object[] values = impl.getFieldValues();
     GfJsonObject jsonObject = new GfJsonObject();
@@ -398,7 +393,7 @@ public class DataCommandFunction implements InternalEntity, Function {
   }
 
   public DataCommandResult get(final Object principal, final String key, final String keyClass,
-      final String valueClass, final String regionName, final Boolean loadOnCacheMiss,
+      final String regionName, final Boolean loadOnCacheMiss,
       final SecurityService securityService) {
 
     if (StringUtils.isEmpty(regionName)) {
@@ -471,8 +466,8 @@ public class DataCommandFunction implements InternalEntity, Function {
     }
   }
 
-  DataCommandResult locateEntry(final String key, final String keyClass, final String valueClass,
-      final String regionPath, final boolean recursive) {
+  DataCommandResult locateEntry(final String key, final String keyClass, final String regionPath,
+      final boolean recursive) {
 
     if (StringUtils.isEmpty(regionPath)) {
       return DataCommandResult.createLocateEntryResult(key, null, null,
@@ -519,10 +514,12 @@ public class DataCommandFunction implements InternalEntity, Function {
     Object keyObject;
     try {
       keyObject = getClassObject(key, keyClass);
+
     } catch (ClassNotFoundException e) {
       logger.error(e.getMessage(), e);
       return DataCommandResult.createLocateEntryResult(key, null, null,
           "ClassNotFoundException " + keyClass, false);
+
     } catch (IllegalArgumentException e) {
       logger.error(e.getMessage(), e);
       return DataCommandResult.createLocateEntryResult(key, null, null,
@@ -613,6 +610,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     } else {
       Object keyObject;
       Object valueObject;
+
       try {
         keyObject = getClassObject(key, keyClass);
       } catch (ClassNotFoundException e) {
@@ -685,7 +683,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     return getObjectFromJson(string, klass);
   }
 
-  private static Object[] getJSONForNonPrimitiveObject(Object obj) {
+  private static Object[] getJSONForNonPrimitiveObject(final Object obj) {
     Object[] array = new Object[2];
     if (obj == null) {
       array[0] = null;
@@ -754,6 +752,7 @@ public class DataCommandFunction implements InternalEntity, Function {
           }
         }
         return json.toString();
+
       } catch (GfJsonException e) {
         return null;
       }
@@ -804,8 +803,7 @@ public class DataCommandFunction implements InternalEntity, Function {
     return list;
   }
 
-  private static String getLogMessage(final QueryObserver observer, final long startTime,
-      final String query) {
+  private static String getLogMessage(final QueryObserver observer, final long startTime) {
     String usedIndexesString = null;
     float time = 0.0f;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DescribeDiskStoreFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DescribeDiskStoreFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DescribeDiskStoreFunction.java
index ce30140..3b26ed9 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DescribeDiskStoreFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DescribeDiskStoreFunction.java
@@ -15,12 +15,10 @@
 package org.apache.geode.management.internal.cli.functions;
 
 import java.io.File;
-import java.util.Properties;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.DiskStore;
 import org.apache.geode.cache.EvictionAction;
 import org.apache.geode.cache.Region;
@@ -49,9 +47,10 @@ import org.apache.geode.management.internal.cli.util.DiskStoreNotFoundException;
  * @see org.apache.geode.cache.execute.FunctionContext
  * @see org.apache.geode.internal.InternalEntity
  * @see org.apache.geode.management.internal.cli.domain.DiskStoreDetails
+ *
  * @since GemFire 7.0
  */
-public class DescribeDiskStoreFunction implements InternalEntity, Function {
+public class DescribeDiskStoreFunction implements Function, InternalEntity {
   private static final Logger logger = LogService.getLogger();
 
   public void execute(final FunctionContext context) {
@@ -102,14 +101,6 @@ public class DescribeDiskStoreFunction implements InternalEntity, Function {
     }
   }
 
-  // TODO: delete assertState
-  protected static void assertState(final boolean condition, final String message,
-      final Object... args) {
-    if (!condition) {
-      throw new IllegalStateException(String.format(message, args));
-    }
-  }
-
   private void setDiskDirDetails(final DiskStore diskStore,
       final DiskStoreDetails diskStoreDetails) {
     File[] diskDirs = diskStore.getDiskDirs();
@@ -245,4 +236,12 @@ public class DescribeDiskStoreFunction implements InternalEntity, Function {
     }
   }
 
+  // TODO: delete assertState
+  protected static void assertState(final boolean condition, final String message,
+      final Object... args) {
+    if (!condition) {
+      throw new IllegalStateException(String.format(message, args));
+    }
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction.java
index 2cd5f74..baaf973 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyDiskStoreFunction.java
@@ -33,7 +33,7 @@ import org.apache.geode.management.internal.configuration.domain.XmlEntity;
  * 
  * @since GemFire 8.0
  */
-public class DestroyDiskStoreFunction implements InternalEntity, Function {
+public class DestroyDiskStoreFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
   private static final Logger logger = LogService.getLogger();
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyIndexFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyIndexFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyIndexFunction.java
index acb8991..915cb60 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyIndexFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/DestroyIndexFunction.java
@@ -29,7 +29,7 @@ import org.apache.geode.management.internal.cli.domain.IndexInfo;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.management.internal.configuration.domain.XmlEntity;
 
-public class DestroyIndexFunction implements InternalEntity, Function {
+public class DestroyIndexFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportDataFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportDataFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportDataFunction.java
index e6ac89c..e0876d5 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportDataFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportDataFunction.java
@@ -29,7 +29,7 @@ import org.apache.geode.management.internal.cli.i18n.CliStrings;
  * Function which carries out the export of a region to a file on a member. Uses the
  * RegionSnapshotService to export the data
  */
-public class ExportDataFunction implements InternalEntity, Function {
+public class ExportDataFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   public void execute(final FunctionContext context) {

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunction.java
index 0c5e4fe..f1a3d57 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunction.java
@@ -116,6 +116,11 @@ public class ExportLogsFunction implements Function, InternalEntity {
     }
   }
 
+  @Override
+  public boolean isHA() {
+    return false;
+  }
+
   public static Region createOrGetExistingExportLogsRegion(final boolean isInitiatingMember,
       final InternalCache cache) throws IOException, ClassNotFoundException {
     Region exportLogsRegion = cache.getRegion(EXPORT_LOGS_REGION);
@@ -144,11 +149,9 @@ public class ExportLogsFunction implements Function, InternalEntity {
     exportLogsRegion.destroyRegion();
   }
 
-  @Override
-  public boolean isHA() {
-    return false;
-  }
-
+  /**
+   * Arguments for ExportLogsFunction.
+   */
   public static class Args implements Serializable {
 
     private final LocalDateTime startTime;

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction.java
index dd2a96d..ba7fc54 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchRegionAttributesFunction.java
@@ -27,13 +27,14 @@ import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.FunctionContext;
+import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 
 /**
  * @since GemFire 7.0
  */
-public class FetchRegionAttributesFunction implements Function {
+public class FetchRegionAttributesFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 4366812590788342070L;
   private static final Logger logger = LogService.getLogger();
 
@@ -80,35 +81,45 @@ public class FetchRegionAttributesFunction implements Function {
     return result;
   }
 
-  // TODO: make FetchRegionAttributesFunctionResult immutable
+  /**
+   * Result of executing FetchRegionAttributesFunction.
+   */
   public static class FetchRegionAttributesFunctionResult<K, V> implements Serializable {
     private static final long serialVersionUID = -3970828263897978845L;
 
-    private RegionAttributes<K, V> regionAttributes;
-    private String[] cacheListenerClasses;
-    private String cacheLoaderClass;
-    private String cacheWriterClass;
+    private final RegionAttributes<K, V> regionAttributes;
+    private final String[] cacheListenerClasses;
+    private final String cacheLoaderClass;
+    private final String cacheWriterClass;
 
     public FetchRegionAttributesFunctionResult(final AttributesFactory<K, V> afactory) {
-      this.regionAttributes = afactory.create();
+      RegionAttributes<K, V> regionAttributes = afactory.create();
 
-      CacheListener<K, V>[] cacheListeners = this.regionAttributes.getCacheListeners();
+      CacheListener<K, V>[] cacheListeners = regionAttributes.getCacheListeners();
       if (cacheListeners != null && cacheListeners.length != 0) {
         cacheListenerClasses = new String[cacheListeners.length];
         for (int i = 0; i < cacheListeners.length; i++) {
           cacheListenerClasses[i] = cacheListeners[i].getClass().getName();
         }
         afactory.initCacheListeners(null);
+      } else {
+        cacheListenerClasses = null;
       }
-      CacheLoader<K, V> cacheLoader = this.regionAttributes.getCacheLoader();
+
+      CacheLoader<K, V> cacheLoader = regionAttributes.getCacheLoader();
       if (cacheLoader != null) {
         cacheLoaderClass = cacheLoader.getClass().getName();
         afactory.setCacheLoader(null);
+      } else {
+        cacheLoaderClass = null;
       }
-      CacheWriter<K, V> cacheWriter = this.regionAttributes.getCacheWriter();
+
+      CacheWriter<K, V> cacheWriter = regionAttributes.getCacheWriter();
       if (cacheWriter != null) {
         cacheWriterClass = cacheWriter.getClass().getName();
         afactory.setCacheWriter(null);
+      } else {
+        cacheWriterClass = null;
       }
 
       // recreate attributes

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchSharedConfigurationStatusFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchSharedConfigurationStatusFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchSharedConfigurationStatusFunction.java
index 26df380..a7204d3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchSharedConfigurationStatusFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/FetchSharedConfigurationStatusFunction.java
@@ -24,7 +24,7 @@ import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.management.internal.configuration.domain.SharedConfigurationStatus;
 
-public class FetchSharedConfigurationStatusFunction implements InternalEntity, Function {
+public class FetchSharedConfigurationStatusFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewayReceiverCreateFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewayReceiverCreateFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewayReceiverCreateFunction.java
index e8d4a26..2d27569 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewayReceiverCreateFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewayReceiverCreateFunction.java
@@ -37,7 +37,7 @@ import org.apache.geode.management.internal.configuration.domain.XmlEntity;
 /**
  * The function to a create GatewayReceiver using given configuration parameters.
  */
-public class GatewayReceiverCreateFunction implements InternalEntity, Function {
+public class GatewayReceiverCreateFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 8746830191680509335L;
   private static final Logger logger = LogService.getLogger();
 
@@ -75,7 +75,7 @@ public class GatewayReceiverCreateFunction implements InternalEntity, Function {
       resultSender.lastResult(new CliFunctionResult(memberNameOrId, xmlEntity,
           CliStrings.format(
               CliStrings.CREATE_GATEWAYRECEIVER__MSG__GATEWAYRECEIVER_CREATED_ON_0_ONPORT_1,
-              new Object[] {memberNameOrId, createdGatewayReceiver.getPort()})));
+              memberNameOrId, createdGatewayReceiver.getPort())));
 
     } catch (IllegalStateException e) {
       resultSender.lastResult(handleException(memberNameOrId, e.getMessage(), e));

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderCreateFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderCreateFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderCreateFunction.java
index 8ef61a7..cb9d02d 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderCreateFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderCreateFunction.java
@@ -34,7 +34,7 @@ import org.apache.geode.management.internal.cli.CliUtil;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.management.internal.configuration.domain.XmlEntity;
 
-public class GatewaySenderCreateFunction implements InternalEntity, Function {
+public class GatewaySenderCreateFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 8746830191680509335L;
   private static final Logger logger = LogService.getLogger();
 
@@ -55,7 +55,7 @@ public class GatewaySenderCreateFunction implements InternalEntity, Function {
           new XmlEntity(CacheXml.GATEWAY_SENDER, "id", gatewaySenderCreateArgs.getId());
       resultSender.lastResult(new CliFunctionResult(memberNameOrId, xmlEntity,
           CliStrings.format(CliStrings.CREATE_GATEWAYSENDER__MSG__GATEWAYSENDER_0_CREATED_ON_1,
-              new Object[] {createdGatewaySender.getId(), memberNameOrId})));
+              createdGatewaySender.getId(), memberNameOrId)));
 
     } catch (GatewaySenderException e) {
       resultSender.lastResult(handleException(memberNameOrId, e.getMessage(), e));

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction.java
index 1ff9506..6ac5387 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunction.java
@@ -27,7 +27,7 @@ import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.management.internal.cli.CliUtil;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 
-public class GatewaySenderDestroyFunction implements InternalEntity, Function {
+public class GatewaySenderDestroyFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
   private static final Logger logger = LogService.getLogger();
 
@@ -50,11 +50,11 @@ public class GatewaySenderDestroyFunction implements InternalEntity, Function {
         gatewaySender.destroy();
       } else {
         throw new GatewaySenderException(
-            "GateWaySender with Id  " + gatewaySenderDestroyFunctionArgs.getId() + " not found");
+            "GatewaySender with id " + gatewaySenderDestroyFunctionArgs.getId() + " not found");
       }
       resultSender.lastResult(new CliFunctionResult(memberNameOrId, true,
           CliStrings.format(CliStrings.DESTROY_GATEWAYSENDER__MSG__GATEWAYSENDER_0_DESTROYED_ON_1,
-              new Object[] {gatewaySenderDestroyFunctionArgs.getId(), memberNameOrId})));
+              gatewaySenderDestroyFunctionArgs.getId(), memberNameOrId)));
 
     } catch (GatewaySenderException gse) {
       resultSender.lastResult(handleException(memberNameOrId, gse.getMessage(), gse));

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunctionArgs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunctionArgs.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunctionArgs.java
index 7e34e61..440acbb 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunctionArgs.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderDestroyFunctionArgs.java
@@ -17,12 +17,11 @@ package org.apache.geode.management.internal.cli.functions;
 import java.io.Serializable;
 
 public class GatewaySenderDestroyFunctionArgs implements Serializable {
-
   private static final long serialVersionUID = 3848480256348119530L;
 
   private final String id;
 
-  public GatewaySenderDestroyFunctionArgs(String id) {
+  public GatewaySenderDestroyFunctionArgs(final String id) {
     this.id = id;
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderFunctionArgs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderFunctionArgs.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderFunctionArgs.java
index 0e6e011..8dbda6e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderFunctionArgs.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GatewaySenderFunctionArgs.java
@@ -17,7 +17,6 @@ package org.apache.geode.management.internal.cli.functions;
 import java.io.Serializable;
 
 public class GatewaySenderFunctionArgs implements Serializable {
-
   private static final long serialVersionUID = -5158224572470173267L;
 
   private final String id;
@@ -41,12 +40,13 @@ public class GatewaySenderFunctionArgs implements Serializable {
   private final String[] gatewayEventFilters;
   private final String[] gatewayTransportFilters;
 
-  public GatewaySenderFunctionArgs(String id, Integer remoteDSId, Boolean parallel,
-      Boolean manualStart, Integer socketBufferSize, Integer socketReadTimeout,
-      Boolean enableBatchConflation, Integer batchSize, Integer batchTimeInterval,
-      Boolean enablePersistence, String diskStoreName, Boolean diskSynchronous,
-      Integer maxQueueMemory, Integer alertThreshold, Integer dispatcherThreads, String orderPolicy,
-      String[] gatewayEventFilters, String[] gatewayTransportFilters) {
+  public GatewaySenderFunctionArgs(final String id, final Integer remoteDSId,
+      final Boolean parallel, final Boolean manualStart, final Integer socketBufferSize,
+      final Integer socketReadTimeout, final Boolean enableBatchConflation, final Integer batchSize,
+      final Integer batchTimeInterval, final Boolean enablePersistence, final String diskStoreName,
+      final Boolean diskSynchronous, final Integer maxQueueMemory, final Integer alertThreshold,
+      final Integer dispatcherThreads, final String orderPolicy, final String[] gatewayEventFilters,
+      final String[] gatewayTransportFilters) {
 
     this.id = id;
     this.remoteDSId = remoteDSId;

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberConfigInformationFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberConfigInformationFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberConfigInformationFunction.java
index e733aa1..cd9eb4c 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberConfigInformationFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberConfigInformationFunction.java
@@ -17,7 +17,6 @@ package org.apache.geode.management.internal.cli.functions;
 import static org.apache.geode.distributed.ConfigurationProperties.SOCKET_BUFFER_SIZE;
 
 import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -39,12 +38,11 @@ import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.ha.HARegionQueue;
 import org.apache.geode.management.internal.cli.domain.MemberConfigurationInfo;
 
-public class GetMemberConfigInformationFunction implements InternalEntity, Function {
-
+public class GetMemberConfigInformationFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     Object argsObject = context.getArguments();
     boolean hideDefaults = (Boolean) argsObject;
 
@@ -136,7 +134,6 @@ public class GetMemberConfigInformationFunction implements InternalEntity, Funct
    * @return a map containing the cache attributes - default values
    */
   private Map<String, String> getCacheAttributesDefaultValues() {
-    String d = CacheConfig.DEFAULT_PDX_DISK_STORE;
     Map<String, String> cacheAttributesDefault = new HashMap<>();
     cacheAttributesDefault.put("pdx-disk-store", "");
     cacheAttributesDefault.put("pdx-read-serialized",
@@ -190,8 +187,8 @@ public class GetMemberConfigInformationFunction implements InternalEntity, Funct
   /**
    * Removes the default values from the attributesMap based on defaultAttributesMap
    */
-  private void removeDefaults(Map<String, String> attributesMap,
-      Map<String, String> defaultAttributesMap) {
+  private void removeDefaults(final Map<String, String> attributesMap,
+      final Map<String, String> defaultAttributesMap) {
     // Make a copy to avoid the CME's
     Set<String> attributesSet = new HashSet<>(attributesMap.keySet());
 
@@ -212,8 +209,7 @@ public class GetMemberConfigInformationFunction implements InternalEntity, Funct
   }
 
   private List<String> getJvmInputArguments() {
-    RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
-    return runtimeBean.getInputArguments();
+    return ManagementFactory.getRuntimeMXBean().getInputArguments();
   }
 
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberInformationFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberInformationFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberInformationFunction.java
index ed66bee..f8abc2e 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberInformationFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetMemberInformationFunction.java
@@ -17,7 +17,6 @@ package org.apache.geode.management.internal.cli.functions;
 import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryMXBean;
 import java.lang.management.MemoryUsage;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -39,30 +38,11 @@ import org.apache.geode.management.internal.cli.domain.MemberInformation;
 /**
  * @since GemFire 7.0
  */
-public class GetMemberInformationFunction implements InternalEntity, Function {
-
+public class GetMemberInformationFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public boolean hasResult() {
-    return true;
-  }
-
-  @Override
-  public boolean isHA() {
-    return true;
-  }
-
-  /**
-   * Read only function
-   */
-  @Override
-  public boolean optimizeForWrite() {
-    return false;
-  }
-
-  @Override
-  public void execute(FunctionContext functionContext) {
+  public void execute(final FunctionContext functionContext) {
     try {
       InternalCache cache = (InternalCache) functionContext.getCache();
 
@@ -102,29 +82,48 @@ public class GetMemberInformationFunction implements InternalEntity, Function {
           CacheServerInfo cacheServerInfo = new CacheServerInfo(bindAddress, port, isRunning);
           memberInfo.addCacheServerInfo(cacheServerInfo);
         }
+
         Map<ClientProxyMembershipID, CacheClientStatus> allConnectedClients =
             InternalClientMembership.getStatusForAllClientsIgnoreSubscriptionStatus();
-        Iterator<ClientProxyMembershipID> it = allConnectedClients.keySet().iterator();
-        int numConnections = 0;
 
-        while (it.hasNext()) {
-          CacheClientStatus status = allConnectedClients.get(it.next());
+        int numConnections = 0;
+        for (ClientProxyMembershipID clientProxyMembershipID : allConnectedClients.keySet()) {
+          CacheClientStatus status = allConnectedClients.get(clientProxyMembershipID);
           numConnections = numConnections + status.getNumberOfConnections();
         }
+
         memberInfo.setClientCount(numConnections);
+
       } else {
         memberInfo.setServer(false);
       }
+
       functionContext.getResultSender().lastResult(memberInfo);
 
     } catch (CacheClosedException e) {
       functionContext.getResultSender().sendException(e);
+
     } catch (Exception e) {
       functionContext.getResultSender().sendException(e);
     }
   }
 
-  private long bytesToMeg(long bytes) {
+  @Override
+  public boolean hasResult() {
+    return true;
+  }
+
+  @Override
+  public boolean isHA() {
+    return true;
+  }
+
+  @Override
+  public boolean optimizeForWrite() {
+    return false;
+  }
+
+  private long bytesToMeg(final long bytes) {
     return bytes / (1024L * 1024L);
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionDescriptionFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionDescriptionFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionDescriptionFunction.java
index 00145a1..657d4a8 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionDescriptionFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionDescriptionFunction.java
@@ -22,13 +22,13 @@ import org.apache.geode.cache.execute.FunctionContext;
 import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.management.internal.cli.domain.RegionDescriptionPerMember;
 
-public class GetRegionDescriptionFunction implements InternalEntity, Function {
-
+public class GetRegionDescriptionFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     String regionPath = (String) context.getArguments();
+
     try {
       Cache cache = context.getCache();
       Region<?, ?> region = cache.getRegion(regionPath);
@@ -44,6 +44,7 @@ public class GetRegionDescriptionFunction implements InternalEntity, Function {
 
     } catch (CacheClosedException e) {
       context.getResultSender().sendException(e);
+
     } catch (Exception e) {
       context.getResultSender().sendException(e);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunction.java
index e125ed3..e6a6173 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetRegionsFunction.java
@@ -28,11 +28,10 @@ import org.apache.geode.management.internal.cli.domain.RegionInformation;
  * Function that retrieves regions hosted on every member
  */
 public class GetRegionsFunction implements Function, InternalEntity {
-
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext functionContext) {
+  public void execute(final FunctionContext functionContext) {
     try {
       Cache cache = functionContext.getCache();
       Set<Region<?, ?>> regions = cache.rootRegions(); // should never return a null
@@ -46,8 +45,10 @@ public class GetRegionsFunction implements Function, InternalEntity {
           RegionInformation regInfo = new RegionInformation(region, true);
           regionInformationSet.add(regInfo);
         }
+
         functionContext.getResultSender().lastResult(regionInformationSet.toArray());
       }
+
     } catch (Exception e) {
       functionContext.getResultSender().sendException(e);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetStackTracesFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetStackTracesFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetStackTracesFunction.java
index 23d8436..2714537 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetStackTracesFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetStackTracesFunction.java
@@ -21,12 +21,11 @@ import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.internal.OSProcess;
 import org.apache.geode.management.internal.cli.domain.StackTracesPerMember;
 
-public class GetStackTracesFunction implements InternalEntity, Function {
-
+public class GetStackTracesFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     try {
       Cache cache = context.getCache();
       String memberNameOrId = cache.getDistributedSystem().getDistributedMember().getName();

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetSubscriptionQueueSizeFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetSubscriptionQueueSizeFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetSubscriptionQueueSizeFunction.java
index a39c125..3e5b556 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetSubscriptionQueueSizeFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/GetSubscriptionQueueSizeFunction.java
@@ -31,14 +31,13 @@ import org.apache.geode.management.internal.cli.i18n.CliStrings;
 /**
  * Function to get subscription-queue-size
  */
-public class GetSubscriptionQueueSizeFunction implements InternalEntity, Function {
-
+public class GetSubscriptionQueueSizeFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   @Override
-  public void execute(FunctionContext context) {
-    final Cache cache = context.getCache();
-    final String memberNameOrId =
+  public void execute(final FunctionContext context) {
+    Cache cache = context.getCache();
+    String memberNameOrId =
         CliUtil.getMemberNameOrId(cache.getDistributedSystem().getDistributedMember());
     String args[] = (String[]) context.getArguments();
     String durableClientId = null, cqName = null;
@@ -92,6 +91,7 @@ public class GetSubscriptionQueueSizeFunction implements InternalEntity, Functio
 
     } catch (Exception e) {
       result.setExceptionMessage(e.getMessage());
+
     } finally {
       context.getResultSender().lastResult(result);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ImportDataFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ImportDataFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ImportDataFunction.java
index 78b6d38..68ed7cf 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ImportDataFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ImportDataFunction.java
@@ -30,23 +30,24 @@ import org.apache.geode.management.internal.cli.i18n.CliStrings;
  * Function which carries out the import of a region to a file on a member. Uses the
  * RegionSnapshotService to import the data
  */
-public class ImportDataFunction implements InternalEntity, Function {
-
+public class ImportDataFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
-  public void execute(FunctionContext context) {
-    final Object[] args = (Object[]) context.getArguments();
-    final String regionName = (String) args[0];
-    final String importFileName = (String) args[1];
+  public void execute(final FunctionContext context) {
+    Object[] args = (Object[]) context.getArguments();
+    String regionName = (String) args[0];
+    String importFileName = (String) args[1];
+
     boolean invokeCallbacks = false;
     if (args.length > 2) {
       invokeCallbacks = (boolean) args[2];
     }
 
     try {
-      final Cache cache = context.getCache();
-      final Region<?, ?> region = cache.getRegion(regionName);
-      final String hostName = cache.getDistributedSystem().getDistributedMember().getHost();
+      Cache cache = context.getCache();
+      Region<?, ?> region = cache.getRegion(regionName);
+      String hostName = cache.getDistributedSystem().getDistributedMember().getHost();
+
       if (region != null) {
         RegionSnapshotService<?, ?> snapshotService = region.getSnapshotService();
         SnapshotOptions options = snapshotService.createOptions();
@@ -56,6 +57,7 @@ public class ImportDataFunction implements InternalEntity, Function {
         String successMessage = CliStrings.format(CliStrings.IMPORT_DATA__SUCCESS__MESSAGE,
             importFile.getCanonicalPath(), hostName, regionName);
         context.getResultSender().lastResult(successMessage);
+
       } else {
         throw new IllegalArgumentException(
             CliStrings.format(CliStrings.REGION_NOT_FOUND, regionName));

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListAsyncEventQueuesFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListAsyncEventQueuesFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListAsyncEventQueuesFunction.java
index aacd198..e9bcc17 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListAsyncEventQueuesFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListAsyncEventQueuesFunction.java
@@ -38,10 +38,8 @@ import org.apache.geode.management.internal.cli.domain.AsyncEventQueueDetails;
  *
  * @since GemFire 8.0
  */
-public class ListAsyncEventQueuesFunction implements InternalEntity, Function {
-
+public class ListAsyncEventQueuesFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
-
   private static final Logger logger = LogService.getLogger();
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDeployedFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDeployedFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDeployedFunction.java
index 16ea3e3..5633946 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDeployedFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDeployedFunction.java
@@ -31,19 +31,17 @@ import org.apache.geode.internal.JarDeployer;
 import org.apache.geode.internal.logging.LogService;
 
 public class ListDeployedFunction implements Function, InternalEntity {
-
   private static final long serialVersionUID = 1L;
-
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     // Declared here so that it's available when returning a Throwable
     String memberId = "";
 
     try {
       Cache cache = context.getCache();
-      final JarDeployer jarDeployer = ClassPathLoader.getLatest().getJarDeployer();
+      JarDeployer jarDeployer = ClassPathLoader.getLatest().getJarDeployer();
 
       DistributedMember member = cache.getDistributedSystem().getDistributedMember();
 
@@ -53,8 +51,9 @@ public class ListDeployedFunction implements Function, InternalEntity {
         memberId = member.getName();
       }
 
-      final List<DeployedJar> jarClassLoaders = jarDeployer.findDeployedJars();
-      final String[] jars = new String[jarClassLoaders.size() * 2];
+      List<DeployedJar> jarClassLoaders = jarDeployer.findDeployedJars();
+      String[] jars = new String[jarClassLoaders.size() * 2];
+
       int index = 0;
       for (DeployedJar jarClassLoader : jarClassLoaders) {
         jars[index++] = jarClassLoader.getJarName();

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDiskStoresFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDiskStoresFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDiskStoresFunction.java
index ae3f34e..0b5f1a6 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDiskStoresFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDiskStoresFunction.java
@@ -40,17 +40,18 @@ import org.apache.geode.management.internal.cli.domain.DiskStoreDetails;
  *
  * @since GemFire 7.0
  */
-public class ListDiskStoresFunction implements InternalEntity, Function {
+public class ListDiskStoresFunction implements Function, InternalEntity {
 
+  @Override
   public void execute(final FunctionContext context) {
-    final Set<DiskStoreDetails> memberDiskStores = new HashSet<>();
+    Set<DiskStoreDetails> memberDiskStores = new HashSet<>();
 
     try {
-      final InternalCache cache = (InternalCache) context.getCache();
+      InternalCache cache = (InternalCache) context.getCache();
 
-      final DistributedMember member = cache.getMyId();
+      DistributedMember member = cache.getMyId();
 
-      for (final DiskStore memberDiskStore : cache.listDiskStoresIncludingRegionOwned()) {
+      for (DiskStore memberDiskStore : cache.listDiskStoresIncludingRegionOwned()) {
         memberDiskStores.add(new DiskStoreDetails(memberDiskStore.getDiskStoreUUID(),
             memberDiskStore.getName(), member.getId(), member.getName()));
       }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDurableCqNamesFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDurableCqNamesFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDurableCqNamesFunction.java
index 5831df4..d9db328 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDurableCqNamesFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListDurableCqNamesFunction.java
@@ -43,13 +43,12 @@ import org.apache.geode.management.internal.cli.i18n.CliStrings;
  *
  * @since GemFire 7.0.1
  */
-public class ListDurableCqNamesFunction implements InternalEntity, Function {
-
+public class ListDurableCqNamesFunction implements Function, InternalEntity {
   private static final long serialVersionUID = 1L;
 
   public void execute(final FunctionContext context) {
-    final Cache cache = context.getCache();
-    final DistributedMember member = cache.getDistributedSystem().getDistributedMember();
+    Cache cache = context.getCache();
+    DistributedMember member = cache.getDistributedSystem().getDistributedMember();
     String memberNameOrId = CliUtil.getMemberNameOrId(member);
     DurableCqNamesResult result = new DurableCqNamesResult(memberNameOrId);
 
@@ -82,6 +81,7 @@ public class ListDurableCqNamesFunction implements InternalEntity, Function {
 
     } catch (Exception e) {
       result.setExceptionMessage(e.getMessage());
+
     } finally {
       context.getResultSender().lastResult(result);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListFunctionFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListFunctionFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListFunctionFunction.java
index e784da4..d078a5b 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListFunctionFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListFunctionFunction.java
@@ -33,19 +33,17 @@ import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.internal.logging.LogService;
 
 public class ListFunctionFunction implements Function, InternalEntity {
-
   private static final long serialVersionUID = 1L;
-
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public void execute(FunctionContext context) {
+  public void execute(final FunctionContext context) {
     // Declared here so that it's available when returning a Throwable
     String memberId = "";
 
     try {
-      final Object[] args = (Object[]) context.getArguments();
-      final String stringPattern = (String) args[0];
+      Object[] args = (Object[]) context.getArguments();
+      String stringPattern = (String) args[0];
 
       Cache cache = context.getCache();
       DistributedMember member = cache.getDistributedSystem().getDistributedMember();
@@ -56,10 +54,12 @@ public class ListFunctionFunction implements Function, InternalEntity {
         memberId = member.getName();
       }
 
-      final Map<String, Function> functions = FunctionService.getRegisteredFunctions();
+      Map<String, Function> functions = FunctionService.getRegisteredFunctions();
       CliFunctionResult result;
+
       if (stringPattern == null || stringPattern.isEmpty()) {
         result = new CliFunctionResult(memberId, functions.keySet().toArray(new String[0]));
+
       } else {
         Pattern pattern = Pattern.compile(stringPattern);
         List<String> resultList = new LinkedList<String>();
@@ -71,6 +71,7 @@ public class ListFunctionFunction implements Function, InternalEntity {
         }
         result = new CliFunctionResult(memberId, resultList.toArray(new String[0]));
       }
+
       context.getResultSender().lastResult(result);
 
     } catch (CacheClosedException cce) {

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListIndexFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListIndexFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListIndexFunction.java
index fd8bc6b..163f7b3 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListIndexFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ListIndexFunction.java
@@ -39,20 +39,21 @@ import org.apache.geode.management.internal.cli.domain.IndexDetails;
  *
  * @since GemFire 7.0
  */
-public class ListIndexFunction implements InternalEntity, Function {
+public class ListIndexFunction implements Function, InternalEntity {
 
   public void execute(final FunctionContext context) {
     try {
-      final Set<IndexDetails> indexDetailsSet = new HashSet<>();
+      Set<IndexDetails> indexDetailsSet = new HashSet<>();
 
-      final Cache cache = context.getCache();
-      final DistributedMember member = cache.getDistributedSystem().getDistributedMember();
+      Cache cache = context.getCache();
+      DistributedMember member = cache.getDistributedSystem().getDistributedMember();
 
       for (final Index index : cache.getQueryService().getIndexes()) {
         indexDetailsSet.add(new IndexDetails(member, index));
       }
 
       context.getResultSender().lastResult(indexDetailsSet);
+
     } catch (Exception e) {
       context.getResultSender().sendException(e);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/94f74294/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/MembersForRegionFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/MembersForRegionFunction.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/MembersForRegionFunction.java
index d0668b7..931e01c 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/MembersForRegionFunction.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/MembersForRegionFunction.java
@@ -21,7 +21,6 @@ import java.util.Map;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.FunctionContext;
@@ -29,22 +28,20 @@ import org.apache.geode.internal.InternalEntity;
 import org.apache.geode.internal.logging.LogService;
 
 /**
- * 
  * @since GemFire 8.0
  */
-
 public class MembersForRegionFunction implements Function, InternalEntity {
   private static final Logger logger = LogService.getLogger();
-
   private static final long serialVersionUID = 8746830191680509335L;
 
   @Override
-  public void execute(FunctionContext context) {
-    Map<String, String> resultMap = new HashMap<String, String>();
+  public void execute(final FunctionContext context) {
+    Map<String, String> resultMap = new HashMap<>();
+
     try {
       Cache cache = context.getCache();
       String memberNameOrId = cache.getDistributedSystem().getDistributedMember().getId();
-      Object args = (Object) context.getArguments();
+      Object args = context.getArguments();
       String regionName = ((String) args);
       Region<Object, Object> region = cache.getRegion(regionName);
 
@@ -59,9 +56,10 @@ public class MembersForRegionFunction implements Function, InternalEntity {
           resultMap.put("", "");
         }
       }
+
       context.getResultSender().lastResult(resultMap);
+
     } catch (Exception ex) {
-      Cache cache = CacheFactory.getAnyInstance();
       logger.info("MembersForRegionFunction exception {}", ex.getMessage(), ex);
       resultMap.put("", "");
       context.getResultSender().lastResult(resultMap);
@@ -69,11 +67,6 @@ public class MembersForRegionFunction implements Function, InternalEntity {
   }
 
   @Override
-  public boolean isHA() {
-    return false;
-  }
-
-  @Override
   public boolean hasResult() {
     return true;
   }
@@ -83,4 +76,9 @@ public class MembersForRegionFunction implements Function, InternalEntity {
     return false;
   }
 
+  @Override
+  public boolean isHA() {
+    return false;
+  }
+
 }


Mime
View raw message