This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch feature/GEODE-3940
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 65617ba226002d033c1b3b2698adc26137b9359d
Merge: 7377e1b e67456d
Author: Darrel Schneider <[email protected]>
AuthorDate: Mon Nov 13 16:38:41 2017 -0800

    Merge remote-tracking branch 'origin/develop' into feature/GEODE-3940

 .../StartLocatorCommandIntegrationTest.java        |   6 +-
 .../StartServerCommandIntegrationTest.java         |   6 +-
 .../source/subnavs/geode-subnav.erb                |   3 +
 .../org/apache/geode/distributed/internal/DM.java  |  17 +
 .../distributed/internal/DistributionManager.java  |  18 +-
 .../internal/LonerDistributionManager.java         |  22 +-
 .../internal/cache/CreateRegionProcessor.java      |   2 +-
 .../internal/cache/DestroyRegionOperation.java     |  12 +-
 .../internal/cache/DistributedCacheOperation.java  |   3 +-
 .../geode/internal/cache/GemFireCacheImpl.java     |  11 +-
 .../internal/cache/RemoteOperationMessage.java     |   4 +-
 .../cache/SearchLoadAndWriteProcessor.java         |  14 +-
 .../geode/internal/cache/StateFlushOperation.java  |   8 +-
 .../geode/internal/cache/TXCommitMessage.java      |   6 +-
 .../cache/persistence/MembershipFlushRequest.java  |   2 +-
 .../cache/persistence/MembershipViewRequest.java   |   2 +-
 .../persistence/PersistentStateQueryMessage.java   |   2 +-
 .../PrepareNewPersistentMemberMessage.java         |   2 +-
 .../persistence/RemovePersistentMemberMessage.java |   2 +-
 .../cache/tier/sockets/CacheClientProxy.java       |   3 +-
 .../tier/sockets/ClientInterestMessageImpl.java    |   6 +-
 .../geode/management/internal/cli/CliUtil.java     |  58 +-
 .../management/internal/cli/GfshParseResult.java   |   5 +
 .../cli/commands/DescribeClientCommand.java        | 168 ++---
 .../cli/commands/DescribeConfigCommand.java        |  80 +-
 .../cli/commands/DescribeDiskStoreCommand.java     |  44 +-
 .../cli/commands/DescribeMemberCommand.java        | 112 ++-
 .../cli/commands/DestroyFunctionCommand.java       |   2 +-
 .../cli/commands/DestroyRegionCommand.java         |  55 +-
 .../internal/cli/commands/ExportDataCommand.java   |   6 +-
 .../internal/cli/commands/ExportLogsCommand.java   |  20 +-
 .../internal/cli/commands/GCCommand.java           |  62 +-
 .../cli/commands/GatewayCommandsUtils.java         |  17 -
 .../internal/cli/commands/GfshCommand.java         | 116 +--
 .../internal/cli/commands/HistoryCommand.java      |  12 +-
 .../internal/cli/commands/ImportDataCommand.java   |   6 +-
 .../internal/cli/commands/ListClientCommand.java   | 115 ++-
 .../cli/commands/ListDiskStoresCommand.java        |  23 +-
 .../internal/cli/commands/ListGatewayCommand.java  | 101 ++-
 .../internal/cli/commands/ListIndexCommand.java    |  20 +-
 .../commands/LoadBalanceGatewaySenderCommand.java  |  71 +-
 .../internal/cli/commands/LocateEntryCommand.java  |   2 +-
 .../cli/commands/PauseGatewaySenderCommand.java    |  74 +-
 .../internal/cli/commands/PutCommand.java          |   2 +-
 .../cli/commands/ResumeGatewaySenderCommand.java   |  70 +-
 .../internal/cli/commands/ShowLogCommand.java      |  59 +-
 .../internal/cli/commands/ShowMetricsCommand.java  |   7 +-
 .../internal/cli/commands/ShutdownCommand.java     |   3 +-
 .../cli/commands/StartGatewayReceiverCommand.java  |  73 +-
 .../cli/commands/StartGatewaySenderCommand.java    | 145 ++--
 .../internal/cli/commands/StartLocatorCommand.java | 344 ++++-----
 .../internal/cli/commands/StartServerCommand.java  | 388 +++++-----
 .../cli/commands/StatusGatewayReceiverCommand.java |  55 +-
 .../cli/commands/StatusGatewaySenderCommand.java   |  61 +-
 .../cli/commands/StopGatewayReceiverCommand.java   |  71 +-
 .../cli/commands/StopGatewaySenderCommand.java     |  65 +-
 .../commands/lifecycle/StartJConsoleCommand.java   |   2 +-
 .../commands/lifecycle/StartJVisualVMCommand.java  |   2 +-
 .../cli/commands/lifecycle/StartPulseCommand.java  |   2 +-
 .../cli/commands/lifecycle/StartVsdCommand.java    |   2 +-
 .../commands/lifecycle/StatusLocatorCommand.java   |  63 +-
 .../commands/lifecycle/StatusServerCommand.java    |  68 +-
 .../cli/commands/lifecycle/StopLocatorCommand.java | 107 ++-
 .../cli/commands/lifecycle/StopServerCommand.java  | 101 ++-
 ...Exception.java => EntityNotFoundException.java} |  32 +-
 .../{CliException.java => UserErrorException.java} |  12 +-
 .../cli/functions/DataCommandFunction.java         |   4 +-
 .../cli/functions/DescribeDiskStoreFunction.java   |   4 +-
 .../cli/functions/RegionCreateFunction.java        |   3 +-
 .../cli/functions/RegionDestroyFunction.java       |  47 +-
 .../internal/cli/remote/CommandExecutor.java       |  39 +-
 .../cli/util/DiskStoreNotFoundException.java       |  47 --
 .../internal/cli/util/MemberNotFoundException.java |  47 --
 .../geode/internal/cache/CommitFunction.java       |   3 +-
 .../management/RegionManagementDUnitTest.java      |  11 +-
 .../management/internal/cli/CliUtilDUnitTest.java  | 481 ++++--------
 ...a => DescribeConfigCommandIntegrationTest.java} |  30 +-
 .../cli/commands/DescribeConfigCommandTest.java}   |  34 +-
 .../commands/DescribeMembersCommandDUnitTest.java  |   5 +-
 .../commands/DestroyRegionCommandDUnitTest.java    |  35 +-
 .../cli/commands/DestroyRegionCommandTest.java     |  86 ++-
 .../cli/commands/DiskStoreCommandsJUnitTest.java   |  75 +-
 .../cli/commands/ExportDataCommandTest.java}       |  36 +-
 .../cli/commands/ExportDataIntegrationTest.java    |  14 +-
 .../cli/commands/ExportLogsCommandTest.java        |  11 +-
 .../cli/commands/GemfireDataCommandsDUnitTest.java | 822 +--------------------
 .../cli/commands/GfshCommandJUnitTest.java         | 635 ++--------------
 .../cli/commands/ImportDataCommandTest.java}       |  35 +-
 .../cli/commands/ImportDataIntegrationTest.java    |  21 +-
 .../ListAndDescribeDiskStoreCommandsDUnitTest.java |   6 +-
 .../cli/commands/ListIndexCommandJUnitTest.java    |   2 +-
 .../cli/commands/LocateEntryDUnitTest.java         |  96 +++
 .../cli/commands/PutCommandIntegrationTest.java    |  74 ++
 .../cli/commands/ShowLogCommandDUnitTest.java      |   3 +-
 .../geode/management/internal/cli/dto/Key.java}    |  30 +-
 .../geode/management/internal/cli/dto/Value.java}  |  21 +-
 .../DescribeDiskStoreFunctionJUnitTest.java        |  14 +-
 .../cli/functions/RegionDestroyFunctionTest.java   |  97 +++
 .../internal/cli/remote/CommandExecutorTest.java   |  79 +-
 .../java/org/apache/geode/test/fake/Fakes.java     |   1 +
 ...ionRuleAssert.java => CommandResultAssert.java} |  48 +-
 ...eExecution.java => CommandResultExecution.java} |  19 +-
 .../geode/test/junit/rules/GfshParserRule.java     |   6 +
 .../test/junit/rules/GfshShellConnectionRule.java  |   6 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 +
 .../geode/codeAnalysis/sanctionedSerializables.txt |   5 +-
 .../system_requirements/host_machine.html.md.erb   |  11 +-
 .../monitor_tune/chapter_overview.html.md.erb      |   4 +
 .../disabling_tcp_syn_cookies.html.md.erb          |  42 ++
 .../lucene/internal/cli/LuceneIndexCommands.java   | 101 +--
 .../internal/cli/LuceneIndexCommandsDUnitTest.java |   9 +-
 .../internal/cli/LuceneIndexCommandsJUnitTest.java |  18 +-
 .../PauseGatewaySenderCommandDUnitTest.java        |  26 +-
 .../ResumeGatewaySenderCommandDUnitTest.java       |  30 +-
 .../StartGatewayReceiverCommandDUnitTest.java      |  13 +-
 .../StartGatewaySenderCommandDUnitTest.java        |  12 +-
 .../StopGatewayReceiverCommandDUnitTest.java       |  14 +-
 .../StopGatewaySenderCommandDUnitTest.java         |  13 +-
 118 files changed, 2327 insertions(+), 4053 deletions(-)

diff --cc geode-core/src/main/java/org/apache/geode/distributed/internal/DM.java
index bdc18f4,43de293..31f2154
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/DM.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/DM.java
@@@ -24,7 -24,8 +24,9 @@@ import java.util.Set
  import java.util.concurrent.ExecutorService;
  
  import org.apache.geode.CancelCriterion;
 +import org.apache.geode.admin.GemFireHealthConfig;
+ import org.apache.geode.cache.Cache;
+ import org.apache.geode.cache.CacheClosedException;
  import org.apache.geode.distributed.DistributedMember;
  import org.apache.geode.distributed.Role;
  import org.apache.geode.distributed.internal.locks.ElderState;
@@@ -461,13 -466,22 +463,28 @@@ public interface DM extends ReplySende
  
    int getDMType();
  
+   /**
+    * The returned cache will be null if the cache does not yet exist. Note 
that the returned cache
+    * may be one that is already closed. Callers of 
GemFireCacheImpl.getInstance() should try to use
+    * this method.
+    */
    InternalCache getCache();
  
+   /**
+    * Returns an existing non-closed cache associated with this DM. Callers of
+    * CacheFactory.getAnyInstance(), 
CacheFactory.getInstance(DistributedSystem) or
+    * GemFireCacheImpl.getExisting() should try to use this method.
+    *
+    * @throws CacheClosedException if a cache has not yet been associated with 
this DM or it has been
+    *         {@link Cache#isClosed closed}.
+    */
+   InternalCache getExistingCache();
+ 
    void setCache(InternalCache instance);
 +
 +  HealthMonitor getHealthMonitor(InternalDistributedMember owner);
 +
 +  void removeHealthMonitor(InternalDistributedMember owner, int theId);
 +
 +  void createHealthMonitor(InternalDistributedMember owner, 
GemFireHealthConfig cfg);
  }
diff --cc 
geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
index b1213ca,ffe4054..142f72c
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
@@@ -22,7 -22,7 +22,8 @@@ import java.util.concurrent.*
  
  import org.apache.geode.CancelCriterion;
  import org.apache.geode.InternalGemFireError;
 +import org.apache.geode.admin.GemFireHealthConfig;
+ import org.apache.geode.cache.CacheClosedException;
  import org.apache.geode.distributed.DistributedMember;
  import org.apache.geode.distributed.DurableClientAttributes;
  import org.apache.geode.distributed.Role;
@@@ -1385,25 -1390,17 +1391,35 @@@ public class LonerDistributionManager i
    }
  
    @Override
-   public void setCache(InternalCache instance) {
-     this.cache = instance;
+   public InternalCache getExistingCache() {
+     InternalCache result = this.cache;
+     if (result == null) {
+       throw new CacheClosedException(
+           
LocalizedStrings.CacheFactory_A_CACHE_HAS_NOT_YET_BEEN_CREATED.toLocalizedString());
+     }
+     result.getCancelCriterion().checkCancelInProgress(null);
+     if (result.isClosed()) {
+       throw result.getCacheClosedException(
+           
LocalizedStrings.CacheFactory_THE_CACHE_HAS_BEEN_CLOSED.toLocalizedString(), 
null);
+     }
+     return result;
    }
 +
 +  @Override
 +  public HealthMonitor getHealthMonitor(InternalDistributedMember owner) {
 +    throw new UnsupportedOperationException(
 +        "getHealthMonitor is not supported by " + getClass().getSimpleName());
 +  }
 +
 +  @Override
 +  public void removeHealthMonitor(InternalDistributedMember owner, int theId) 
{
 +    throw new UnsupportedOperationException(
 +        "removeHealthMonitor is not supported by " + 
getClass().getSimpleName());
 +  }
 +
 +  @Override
 +  public void createHealthMonitor(InternalDistributedMember owner, 
GemFireHealthConfig cfg) {
 +    throw new UnsupportedOperationException(
 +        "createHealthMonitor is not supported by " + 
getClass().getSimpleName());
 +  }
  }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to