Merge branch 'develop' into feature/GEODE-420 # Conflicts: # geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java # geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java # geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java # geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java # geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java # geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java # geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java # geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerStats.java # geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java # geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatHelper.java # geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/HostStatSampler.java # geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatArchiveWriter.java # geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java # geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java # geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/GemFireStatSamplerIntegrationTest.java # geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/SimpleStatSamplerIntegrationTest.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dfbc88b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dfbc88b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dfbc88b2 Branch: refs/heads/develop Commit: dfbc88b248cc2a01da19a85ac3ef1a9f0adce790 Parents: 86df802 e25ba5c Author: Udo Kohlmeyer <[email protected]> Authored: Fri Aug 19 06:54:23 2016 +1000 Committer: Udo Kohlmeyer <[email protected]> Committed: Fri Aug 19 06:54:23 2016 +1000 ---------------------------------------------------------------------- .../internal/DeltaSessionStatistics.java | 2 +- .../gemfire/modules/util/ModuleStatistics.java | 2 +- .../com/gemstone/gemfire/StatisticsFactory.java | 2 +- .../gemstone/gemfire/StatisticsTypeFactory.java | 2 +- .../com/gemstone/gemfire/admin/AlertLevel.java | 5 +- .../admin/internal/MemberHealthEvaluator.java | 2 + .../admin/jmx/internal/ManagedResourceType.java | 6 +- .../jmx/internal/RefreshNotificationType.java | 10 +- .../internal/AsyncEventQueueStats.java | 2 +- .../cache/client/internal/AbstractOp.java | 5 +- .../cache/client/internal/AddPDXEnumOp.java | 3 +- .../cache/client/internal/AddPDXTypeOp.java | 3 +- .../client/internal/AuthenticateUserOp.java | 2 - .../internal/AutoConnectionSourceImpl.java | 1 - .../client/internal/ClientPartitionAdvisor.java | 2 +- .../client/internal/ConnectionFactoryImpl.java | 2 +- .../cache/client/internal/ConnectionStats.java | 2 +- .../client/internal/EndpointManagerImpl.java | 2 +- .../client/internal/ExecuteFunctionNoAckOp.java | 2 +- .../client/internal/ExecuteFunctionOp.java | 10 +- .../internal/ExecuteRegionFunctionNoAckOp.java | 2 +- .../internal/ExecuteRegionFunctionOp.java | 88 +- .../ExecuteRegionFunctionSingleHopOp.java | 31 +- .../internal/ExplicitConnectionSourceImpl.java | 1 - .../cache/client/internal/InternalPool.java | 1 + .../gemfire/cache/client/internal/PoolImpl.java | 25 +- .../cache/client/internal/QueueManagerImpl.java | 14 +- .../internal/SingleHopClientExecutor.java | 44 +- .../internal/pooling/ConnectionManagerImpl.java | 32 +- .../cache/query/CqAttributesFactory.java | 232 +- .../cache/query/internal/CqQueryVsdStats.java | 2 +- .../query/internal/cq/CqAttributesImpl.java | 237 ++ .../query/internal/index/CompactRangeIndex.java | 3 + .../cache/query/internal/index/IndexStats.java | 2 +- .../gemfire/cache/server/ServerMetrics.java | 2 - .../distributed/ConfigurationProperties.java | 17 + .../gemfire/distributed/DistributedSystem.java | 15 +- .../internal/AbstractDistributionConfig.java | 26 + .../internal/DistributionAdvisor.java | 4 +- .../internal/DistributionConfig.java | 29 + .../internal/DistributionConfigImpl.java | 76 +- .../internal/DistributionManager.java | 50 +- .../internal/DistributionMessage.java | 1 - .../distributed/internal/DistributionStats.java | 2 +- .../FunctionExecutionPooledExecutor.java | 7 - .../internal/InternalDistributedSystem.java | 11 +- .../distributed/internal/InternalLocator.java | 4 - .../internal/LocatorLoadSnapshot.java | 4 - .../distributed/internal/LocatorStats.java | 2 +- .../internal/MembershipListener.java | 2 +- .../distributed/internal/ReplyMessage.java | 5 - .../distributed/internal/ReplyProcessor21.java | 9 +- .../distributed/internal/StartupMessage.java | 6 +- .../ThrottlingMemLinkedQueueWithDMStats.java | 1 - .../distributed/internal/locks/DLockStats.java | 2 +- .../internal/membership/InternalRole.java | 8 +- .../internal/membership/MembershipManager.java | 2 +- .../internal/membership/gms/SuspectMember.java | 3 +- .../membership/gms/interfaces/Service.java | 1 - .../membership/gms/messages/ViewAckMessage.java | 1 - .../gms/messenger/GMSQuorumChecker.java | 6 - .../gms/mgr/GMSMembershipManager.java | 5 +- .../internal/AbstractStatisticsFactory.java | 327 -- .../gemfire/internal/ArchiveSplitter.java | 522 --- .../internal/DummyStatisticsFactory.java | 134 - .../gemfire/internal/DummyStatisticsImpl.java | 242 -- .../gemfire/internal/GemFireStatSampler.java | 502 --- .../gemfire/internal/HostStatHelper.java | 291 -- .../gemfire/internal/HostStatSampler.java | 551 --- .../internal/InternalDataSerializer.java | 55 +- .../gemfire/internal/LinuxProcFsStatistics.java | 783 ---- .../gemfire/internal/LinuxProcessStats.java | 79 - .../gemfire/internal/LinuxSystemStats.java | 311 -- .../gemfire/internal/LocalStatListener.java | 40 - .../internal/LocalStatisticsFactory.java | 99 - .../gemfire/internal/LocalStatisticsImpl.java | 268 -- .../gemfire/internal/OSXProcessStats.java | 83 - .../gemfire/internal/OSXSystemStats.java | 228 -- .../gemfire/internal/OsStatisticsFactory.java | 41 - .../gemstone/gemfire/internal/ProcessStats.java | 60 - .../gemfire/internal/SimpleStatSampler.java | 112 - .../gemfire/internal/SolarisProcessStats.java | 217 -- .../gemfire/internal/SolarisSystemStats.java | 428 --- .../gemfire/internal/StatArchiveFormat.java | 197 -- .../gemfire/internal/StatArchiveReader.java | 3338 ----------------- .../gemfire/internal/StatArchiveWriter.java | 734 ---- .../gemfire/internal/StatSamplerStats.java | 153 - .../internal/StatisticDescriptorImpl.java | 383 -- .../gemfire/internal/StatisticsImpl.java | 589 --- .../gemfire/internal/StatisticsManager.java | 78 - .../internal/StatisticsTypeFactoryImpl.java | 140 - .../gemfire/internal/StatisticsTypeImpl.java | 258 -- .../gemfire/internal/StatisticsTypeXml.java | 280 -- .../gemstone/gemfire/internal/SystemAdmin.java | 5 +- .../com/gemstone/gemfire/internal/VMStats.java | 87 - .../gemfire/internal/VMStatsContract.java | 36 - .../internal/VMStatsContractFactory.java | 60 - .../gemfire/internal/WindowsProcessStats.java | 160 - .../gemfire/internal/WindowsSystemStats.java | 267 -- .../admin/remote/AddStatListenerResponse.java | 2 +- .../remote/AdminConsoleDisconnectMessage.java | 2 +- .../remote/CancelStatListenerResponse.java | 2 +- .../admin/remote/DistributionLocatorId.java | 6 +- .../internal/admin/remote/RemoteStat.java | 2 +- .../gemfire/internal/admin/remote/package.html | 2 +- .../admin/statalerts/StatisticInfoImpl.java | 4 +- .../internal/cache/AbstractLRURegionMap.java | 11 +- .../internal/cache/AbstractRegionMap.java | 951 ++--- .../gemfire/internal/cache/BucketRegion.java | 38 +- .../gemfire/internal/cache/CachePerfStats.java | 1 + .../internal/cache/CacheServerLauncher.java | 11 +- .../internal/cache/DiskDirectoryStats.java | 2 +- .../gemfire/internal/cache/DiskEntry.java | 583 ++- .../gemfire/internal/cache/DiskInitFile.java | 2 +- .../gemfire/internal/cache/DiskRegionStats.java | 2 +- .../gemfire/internal/cache/DiskStoreStats.java | 2 +- .../DistTXStateProxyImplOnCoordinator.java | 4 +- .../cache/DistributedClearOperation.java | 2 +- .../internal/cache/DistributedRegion.java | 46 +- .../gemfire/internal/cache/EntryEventImpl.java | 170 +- .../internal/cache/GemFireCacheImpl.java | 2 +- .../gemfire/internal/cache/LocalRegion.java | 518 +-- .../internal/cache/PartitionedRegion.java | 13 +- .../internal/cache/PartitionedRegionStats.java | 2 +- .../gemfire/internal/cache/PoolStats.java | 2 +- .../gemfire/internal/cache/ProxyRegionMap.java | 6 + .../gemfire/internal/cache/RegionMap.java | 4 + .../internal/cache/StateFlushOperation.java | 5 + .../cache/control/HeapMemoryMonitor.java | 8 +- .../cache/control/ResourceManagerStats.java | 2 +- .../cache/execute/AbstractExecution.java | 10 + .../cache/execute/FunctionServiceStats.java | 4 +- .../internal/cache/execute/FunctionStats.java | 5 +- .../FunctionStreamingResultCollector.java | 18 +- .../cache/execute/LocalResultCollectorImpl.java | 8 +- .../PartitionedRegionFunctionResultSender.java | 112 +- .../ServerToClientFunctionResultSender.java | 21 +- .../ServerToClientFunctionResultSender65.java | 3 + .../internal/cache/ha/HARegionQueueStats.java | 2 +- .../internal/cache/locks/TXLockToken.java | 6 +- .../cache/lru/HeapLRUCapacityController.java | 2 +- .../cache/lru/LRUCapacityController.java | 2 +- .../cache/lru/MemLRUCapacityController.java | 2 +- .../PRFunctionStreamingResultCollector.java | 19 +- .../internal/cache/tier/CachedRegionHelper.java | 32 +- .../cache/tier/sockets/AcceptorImpl.java | 19 +- .../cache/tier/sockets/BaseCommand.java | 2 - .../cache/tier/sockets/CacheClientNotifier.java | 2 +- .../tier/sockets/CacheClientNotifierStats.java | 3 +- .../tier/sockets/CacheClientProxyStats.java | 2 +- .../cache/tier/sockets/CacheClientUpdater.java | 1 + .../cache/tier/sockets/CacheServerStats.java | 7 +- .../cache/tier/sockets/ChunkedMessage.java | 11 +- .../tier/sockets/ClientBlacklistProcessor.java | 1 - .../cache/tier/sockets/ClientHealthMonitor.java | 1 - .../tier/sockets/ClientProxyMembershipID.java | 6 - .../cache/tier/sockets/CommandInitializer.java | 4 - .../internal/cache/tier/sockets/HandShake.java | 5 +- .../internal/cache/tier/sockets/Message.java | 36 +- .../cache/tier/sockets/ObjectPartList651.java | 2 - .../internal/cache/tier/sockets/Part.java | 1 - .../cache/tier/sockets/ServerConnection.java | 4 +- .../cache/tier/sockets/command/Destroy.java | 3 - .../cache/tier/sockets/command/Destroy65.java | 3 - .../tier/sockets/command/ExecuteFunction70.java | 3 + .../cache/tier/sockets/command/Get70.java | 19 +- .../cache/tier/sockets/command/Ping.java | 18 +- .../cache/tier/sockets/command/Put.java | 17 - .../cache/tier/sockets/command/Put61.java | 15 - .../cache/tier/sockets/command/Put65.java | 15 - .../cache/tier/sockets/command/PutAll.java | 21 - .../cache/tier/sockets/command/PutAll70.java | 22 - .../cache/tier/sockets/command/PutAll80.java | 22 - .../tier/sockets/command/RegisterInterest.java | 3 - .../sockets/command/RegisterInterest61.java | 3 - .../sockets/command/RegisterInterestList.java | 3 - .../sockets/command/RegisterInterestList61.java | 3 - .../sockets/command/RegisterInterestList66.java | 3 - .../cache/tier/sockets/command/RemoveAll.java | 22 - .../cache/tier/sockets/command/Request.java | 19 +- .../tier/sockets/command/RequestEventValue.java | 17 - .../cache/tier/sockets/command/Size.java | 21 - .../sockets/command/UnregisterInterest.java | 3 - .../sockets/command/UnregisterInterestList.java | 3 - .../cache/versions/RegionVersionVector.java | 12 +- .../internal/cache/wan/GatewaySenderStats.java | 2 +- .../cache/xmlcache/CacheXmlGenerator.java | 2 +- .../gemfire/internal/concurrent/Atomics.java | 6 +- .../gemfire/internal/i18n/LocalizedStrings.java | 2 +- .../internal/offheap/OffHeapStorage.java | 2 +- .../internal/security/GeodeSecurityUtil.java | 55 +- .../security/IntegratedSecurityService.java | 15 + .../internal/security/SecurableComponent.java | 53 + .../internal/security/SecurityService.java | 3 + .../statistics/AbstractStatisticsFactory.java | 327 ++ .../internal/statistics/ArchiveSplitter.java | 522 +++ .../internal/statistics/CallbackSampler.java | 3 - .../statistics/DummyStatisticsFactory.java | 135 + .../statistics/DummyStatisticsImpl.java | 242 ++ .../internal/statistics/GemFireStatSampler.java | 507 +++ .../internal/statistics/HostStatHelper.java | 305 ++ .../internal/statistics/HostStatSampler.java | 554 +++ .../statistics/IgnoreResourceException.java | 2 +- .../internal/statistics/LocalStatListener.java | 40 + .../statistics/LocalStatisticsFactory.java | 103 + .../statistics/LocalStatisticsImpl.java | 272 ++ .../internal/statistics/ResourceInstance.java | 2 +- .../internal/statistics/ResourceType.java | 2 +- .../internal/statistics/SimpleStatSampler.java | 112 + .../statistics/StatArchiveDescriptor.java | 4 +- .../internal/statistics/StatArchiveFormat.java | 197 ++ .../internal/statistics/StatArchiveHandler.java | 9 +- .../statistics/StatArchiveHandlerConfig.java | 2 +- .../internal/statistics/StatArchiveReader.java | 3342 ++++++++++++++++++ .../internal/statistics/StatArchiveWriter.java | 737 ++++ .../internal/statistics/StatSamplerStats.java | 153 + .../statistics/StatisticDescriptorImpl.java | 383 ++ .../internal/statistics/StatisticsImpl.java | 588 +++ .../internal/statistics/StatisticsManager.java | 78 + .../statistics/StatisticsTypeFactoryImpl.java | 140 + .../internal/statistics/StatisticsTypeImpl.java | 258 ++ .../internal/statistics/StatisticsTypeXml.java | 282 ++ .../gemfire/internal/statistics/VMStats.java | 87 + .../internal/statistics/VMStatsContract.java | 36 + .../statistics/VMStatsContractFactory.java | 60 + .../internal/statistics/ValueMonitor.java | 1 - .../gemfire/internal/statistics/package.html | 4 +- .../platform/LinuxProcFsStatistics.java | 783 ++++ .../statistics/platform/LinuxProcessStats.java | 84 + .../statistics/platform/LinuxSystemStats.java | 313 ++ .../statistics/platform/OSXProcessStats.java | 87 + .../statistics/platform/OSXSystemStats.java | 230 ++ .../platform/OsStatisticsFactory.java | 41 + .../statistics/platform/ProcessStats.java | 60 + .../platform/SolarisProcessStats.java | 222 ++ .../statistics/platform/SolarisSystemStats.java | 430 +++ .../platform/WindowsProcessStats.java | 165 + .../statistics/platform/WindowsSystemStats.java | 269 ++ .../stats50/Atomic50StatisticsImpl.java | 4 + .../gemfire/internal/stats50/VMStats50.java | 4 +- .../gemfire/internal/tcp/Connection.java | 3 - .../gemfire/internal/tcp/ConnectionTable.java | 6 - .../gemfire/internal/tcp/MsgDestreamer.java | 6 +- .../gemfire/internal/tcp/TCPConduit.java | 2 +- .../management/internal/ManagementAgent.java | 8 +- .../gemfire/management/internal/RestAgent.java | 2 +- .../internal/beans/MemberMBeanBridge.java | 8 + .../cli/AbstractCliAroundInterceptor.java | 6 +- .../domain/FixedPartitionAttributesInfo.java | 5 +- .../cli/domain/PartitionAttributesInfo.java | 19 +- .../cli/domain/RegionAttributesInfo.java | 4 +- .../internal/cli/help/utils/HelpUtils.java | 2 +- .../internal/cli/result/CommandResult.java | 6 +- .../pdx/internal/ClientTypeRegistration.java | 8 +- .../gemstone/gemfire/pdx/internal/EnumId.java | 1 - .../gemstone/gemfire/pdx/internal/EnumInfo.java | 1 - .../pdx/internal/LonerTypeRegistration.java | 2 - .../pdx/internal/PdxInstanceFactoryImpl.java | 4 +- .../gemfire/pdx/internal/PdxInstanceImpl.java | 22 +- .../gemfire/pdx/internal/PdxReaderImpl.java | 11 +- .../pdx/internal/PeerTypeRegistration.java | 1 - .../gemfire/pdx/internal/TypeRegistry.java | 28 +- .../gemfire/pdx/internal/json/PdxToJSON.java | 4 +- .../geode/security/SecurableComponents.java | 57 + .../templates/SampleSecurityManager.java | 50 +- .../com/gemstone/gemfire/GemFireTestCase.java | 91 - .../java/com/gemstone/gemfire/Invariant.java | 31 - .../com/gemstone/gemfire/InvariantResult.java | 27 - .../gemfire/LocalStatisticsJUnitTest.java | 50 - .../gemstone/gemfire/StatisticsTestCase.java | 388 -- .../gemfire/StatisticsTypeJUnitTest.java | 76 - .../gemfire/admin/AlertLevelJUnitTest.java | 64 + .../MemberHealthEvaluatorJUnitTest.java | 4 +- .../AutoConnectionSourceImplJUnitTest.java | 11 +- .../client/internal/QueueManagerJUnitTest.java | 6 + .../management/MemoryThresholdsDUnitTest.java | 6 +- .../gemfire/cache/query/data/Portfolio.java | 10 +- .../gemfire/cache/query/data/PortfolioData.java | 7 +- .../gemfire/cache/query/data/PortfolioNoDS.java | 7 +- .../gemfire/cache/query/data/PortfolioPdx.java | 7 +- .../functional/IUM6Bug32345ReJUnitTest.java | 4 +- ...ndexWithSngleFrmAndMultCondQryJUnitTest.java | 6 +- .../functional/IumMultConditionJUnitTest.java | 5 +- .../internal/cq/CqAttributesImplJUnitTest.java | 45 + .../gemfire/cache30/DiskRegionDUnitTest.java | 31 +- .../codeAnalysis/decode/CompiledClass.java | 2 +- .../AbstractDistributionConfigTest.java | 78 + .../internal/DistributionConfigJUnitTest.java | 80 +- .../membership/InternalRoleJUnitTest.java | 46 + .../internal/DataSerializableJUnitTest.java | 1 + .../internal/GemFireStatSamplerJUnitTest.java | 613 ---- .../internal/LocalStatisticsImplJUnitTest.java | 139 - .../internal/SimpleStatSamplerJUnitTest.java | 358 -- .../StatArchiveWriterReaderJUnitTest.java | 1728 --------- .../gemfire/internal/StatSamplerJUnitTest.java | 367 -- .../gemfire/internal/StatSamplerTestCase.java | 184 - .../remote/DistributionLocatorIdJUnitTest.java | 54 + .../internal/cache/ARMLockTestHookAdapter.java | 38 + .../cache/CacheServerLauncherJUnitTest.java | 54 + .../cache/ClearRvvLockingDUnitTest.java | 667 ++++ .../cache/DiskRegRecoveryJUnitTest.java | 33 +- .../internal/cache/EntryEventImplTest.java | 301 +- .../internal/cache/TestNonSizerObject.java | 4 +- .../cache/execute/FunctionServiceBase.java | 176 +- .../FunctionServiceClientAccessorPRBase.java | 145 + ...unctionServiceClientAccessorPRDUnitTest.java | 46 + ...lientAccessorPRMultipleMembersDUnitTest.java | 59 + ...essorPRMultipleMembersMultihopDUnitTest.java | 44 + .../execute/FunctionServiceClientBase.java | 61 + ...nServiceClientMultipleOnServerDUnitTest.java | 42 + .../FunctionServiceClientOnServerBase.java | 40 + .../FunctionServiceClientOnServerDUnitTest.java | 32 + .../FunctionServicePeerAccessorPRBase.java | 66 + .../FunctionServicePeerAccessorPRDUnitTest.java | 37 +- ...ePeerAccessorPRMultipleMembersDUnitTest.java | 43 + .../internal/cache/functions/TestFunction.java | 7 +- .../internal/cache/lru/LRUClockJUnitTest.java | 2 +- .../fixed/FixedPartitioningTestBase.java | 13 +- .../FixedPartitioningTestBaseJUnitTest.java | 63 + .../AsyncEventQueueStatsDUnitTest.java | 2 +- .../offheap/OffHeapStorageJUnitTest.java | 2 +- .../security/GeodeSecurityUtilTest.java | 157 +- .../security/SecurityConfigIntegrationTest.java | 56 + .../statistics/CallbackSamplerJUnitTest.java | 98 - .../statistics/CallbackSamplerTest.java | 98 + ...tributedSystemStatisticsIntegrationTest.java | 271 ++ ...utedSystemStatisticsTypeIntegrationTest.java | 90 + .../GemFireStatSamplerIntegrationTest.java | 616 ++++ .../internal/statistics/ResourceInstTest.java | 84 + .../statistics/SampleCollectorJUnitTest.java | 322 -- .../statistics/SampleCollectorTest.java | 322 ++ .../SimpleStatSamplerIntegrationTest.java | 351 ++ ...iveWithConsecutiveResourceInstGenerator.java | 223 ++ ...ithConsecutiveResourceInstGeneratorTest.java | 55 + ...hConsecutiveResourceInstIntegrationTest.java | 108 + .../StatArchiveWriterReaderIntegrationTest.java | 1634 +++++++++ .../statistics/StatMonitorHandlerJUnitTest.java | 236 -- .../statistics/StatMonitorHandlerTest.java | 235 ++ .../statistics/StatSamplerIntegrationTest.java | 363 ++ .../statistics/StatSamplerTestCase.java | 185 + .../gemfire/internal/statistics/StatUtils.java | 102 + .../statistics/StatisticsDUnitTest.java | 947 ----- .../statistics/StatisticsDistributedTest.java | 851 +++++ .../internal/statistics/StatisticsImplTest.java | 136 + .../statistics/StatisticsMonitorJUnitTest.java | 198 -- .../statistics/StatisticsMonitorTest.java | 198 ++ .../statistics/TestStatArchiveWriter.java | 6 +- .../statistics/TestStatisticsManager.java | 13 +- .../statistics/TestStatisticsSampler.java | 13 +- .../statistics/ValueMonitorIntegrationTest.java | 367 ++ .../statistics/ValueMonitorJUnitTest.java | 370 -- .../internal/stats50/AtomicStatsJUnitTest.java | 2 +- .../gemfire/management/ManagementTestBase.java | 6 +- .../bean/stats/MemberLevelStatsJUnitTest.java | 2 +- .../AbstractCliAroundInterceptorJUnitTest.java | 59 + ...edSecurityCacheLifecycleDistributedTest.java | 51 +- .../gemfire/security/SecurityTestUtils.java | 3 + .../security/templates/XmlAuthorization.java | 4 +- .../templates/SampleSecurityManagerTest.java | 28 +- .../gemfire/codeAnalysis/excludedClasses.txt | 2 + ...st_testWriteAfterSamplingBegins_expected.gfs | Bin 1970 -> 0 bytes ...est_testWriteWhenSamplingBegins_expected.gfs | Bin 1933 -> 0 bytes ...thConsecutiveResourceInstIntegrationTest.gfs | Bin 0 -> 1924 bytes ...st_testWriteAfterSamplingBegins_expected.gfs | Bin 0 -> 1976 bytes ...est_testWriteWhenSamplingBegins_expected.gfs | Bin 0 -> 1939 bytes geode-core/src/test/resources/security.json | 30 + .../query/internal/cq/CqServiceVsdStats.java | 4 +- .../lucene/internal/IndexListenerAdapter.java | 41 + .../cache/lucene/internal/LuceneIndexStats.java | 14 +- .../lucene/internal/LuceneServiceImpl.java | 9 +- .../internal/filesystem/FileSystemStats.java | 2 +- .../internal/management/LuceneIndexMetrics.java | 67 +- .../management/LuceneIndexStatsMonitor.java | 93 + .../management/LuceneServiceBridge.java | 34 +- .../internal/management/LuceneServiceMBean.java | 5 + .../management/ManagementIndexListener.java | 38 + .../lucene/internal/management/StatsKey.java | 35 + .../management/LuceneManagementDUnitTest.java | 267 ++ .../util/AutoBalancerIntegrationJUnitTest.java | 2 +- geode-site/website/README.md | 69 +- geode-site/website/content/community/index.html | 1 + .../client/internal/GatewaySenderBatchOp.java | 10 +- .../internal/locator/wan/LocatorDiscovery.java | 16 +- .../internal/locator/wan/LocatorHelper.java | 4 +- .../locator/wan/WanLocatorDiscovererImpl.java | 6 +- .../wan/GatewaySenderEventRemoteDispatcher.java | 13 +- .../cache/wan/GatewaySenderFactoryImpl.java | 2 +- .../wan/parallel/ParallelGatewaySenderImpl.java | 2 +- ...RemoteSerialGatewaySenderEventProcessor.java | 6 +- .../cache/CacheXml70GatewayDUnitTest.java | 32 +- .../cache/CacheXml80GatewayDUnitTest.java | 8 +- .../internal/cache/UpdateVersionDUnitTest.java | 20 +- .../cache/wan/CacheClientNotifierDUnitTest.java | 4 +- .../gemfire/internal/cache/wan/WANTestBase.java | 72 +- ...oncurrentParallelGatewaySenderDUnitTest.java | 8 +- ...allelGatewaySenderOperation_2_DUnitTest.java | 10 +- .../ConcurrentWANPropagation_1_DUnitTest.java | 568 +++ .../ConcurrentWANPropagation_2_DUnitTest.java | 448 +++ .../ConcurrentWANPropogation_1_DUnitTest.java | 568 --- .../ConcurrentWANPropogation_2_DUnitTest.java | 448 --- .../CommonParallelGatewaySenderDUnitTest.java | 8 +- ...wWANConcurrencyCheckForDestroyDUnitTest.java | 4 +- .../cache/wan/misc/PDXNewWanDUnitTest.java | 2 +- ...dRegion_ParallelWANPersistenceDUnitTest.java | 16 +- ...dRegion_ParallelWANPropagationDUnitTest.java | 1063 ++++++ ...dRegion_ParallelWANPropogationDUnitTest.java | 1065 ------ .../SenderWithTransportFilterDUnitTest.java | 20 +- ...downAllPersistentGatewaySenderDUnitTest.java | 14 +- .../wan/misc/WANConfigurationJUnitTest.java | 109 +- .../wan/misc/WANLocatorServerDUnitTest.java | 2 +- .../wan/misc/WanAutoDiscoveryDUnitTest.java | 6 +- .../cache/wan/misc/WanValidationsDUnitTest.java | 96 +- ...ropagationConcurrentOpsOffHeapDUnitTest.java | 44 + .../ParallelWANPropagationOffHeapDUnitTest.java | 43 + ...ropogationConcurrentOpsOffHeapDUnitTest.java | 44 - .../ParallelWANPropogationOffHeapDUnitTest.java | 43 - .../SerialWANPropagationOffHeapDUnitTest.java | 38 + ...ation_PartitionedRegionOffHeapDUnitTest.java | 39 + .../SerialWANPropogationOffHeapDUnitTest.java | 43 - ...ation_PartitionedRegionOffHeapDUnitTest.java | 43 - ...llelGatewaySenderQueueOverflowDUnitTest.java | 24 +- .../ParallelWANConflationDUnitTest.java | 4 +- ...ersistenceEnabledGatewaySenderDUnitTest.java | 12 +- ...llelWANPropagationClientServerDUnitTest.java | 22 +- ...lelWANPropagationConcurrentOpsDUnitTest.java | 4 +- .../ParallelWANPropagationDUnitTest.java | 2 +- .../wan/parallel/ParallelWANStatsDUnitTest.java | 6 +- ...tewaySenderDistributedDeadlockDUnitTest.java | 12 +- ...rialGatewaySenderEventListenerDUnitTest.java | 70 +- .../SerialGatewaySenderOperationsDUnitTest.java | 10 +- .../SerialGatewaySenderQueueDUnitTest.java | 26 +- ...ersistenceEnabledGatewaySenderDUnitTest.java | 14 +- .../serial/SerialWANPropagationDUnitTest.java | 1336 +++++++ .../SerialWANPropagationLoopBackDUnitTest.java | 8 +- ...NPropagation_PartitionedRegionDUnitTest.java | 412 +++ .../SerialWANPropagationsFeatureDUnitTest.java | 338 ++ .../serial/SerialWANPropogationDUnitTest.java | 1336 ------- ...NPropogation_PartitionedRegionDUnitTest.java | 412 --- .../SerialWANPropogationsFeatureDUnitTest.java | 338 -- .../wan/serial/SerialWANStatsDUnitTest.java | 10 +- .../wan/wancommand/WANCommandTestBase.java | 30 +- .../wan/wancommand/WanCommandListDUnitTest.java | 12 +- .../wancommand/WanCommandStatusDUnitTest.java | 6 +- .../management/WANManagementDUnitTest.java | 4 +- .../ClusterConfigurationDUnitTest.java | 6 +- .../pulse/TestRemoteClusterDUnitTest.java | 4 +- 446 files changed, 28846 insertions(+), 25512 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImpl.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/ConfigurationProperties.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java ---------------------------------------------------------------------- diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java index 571d4ba,cc544f6..ad43415 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java @@@ -40,8 -39,8 +40,9 @@@ import com.gemstone.gemfire.internal.Co import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import com.gemstone.gemfire.internal.logging.LogWriterImpl; + import com.gemstone.gemfire.internal.security.SecurableComponent; +import com.gemstone.gemfire.internal.net.SSLEnabledComponent; +import com.gemstone.gemfire.internal.net.SocketCreator; import com.gemstone.gemfire.memcached.GemFireMemcachedServer; /** @@@ -461,42 -505,25 +462,65 @@@ public abstract class AbstractDistribut * First check if sslComponents are in the list of valid components. If so, check that no other *-ssl-* properties other than cluster-ssl-* are set. * This would mean one is mixing the "old" with the "new" */ + @ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS) + protected SSLEnabledComponent[] checkLegacySSLWhenSSLEnabledComponentsSet(SSLEnabledComponent[] value) { + for (SSLEnabledComponent component : value) { + switch (component) { + case ALL: + case CLUSTER: + case SERVER: + case GATEWAY: + case JMX: + case HTTP_SERVICE: + case LOCATOR: + continue; + default: + throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_0_INVALID_TRY_1.toLocalizedString(new Object[] { + value, StringUtils.join(new String[] { + SSLEnabledComponent.ALL.getConstant(), + SSLEnabledComponent.CLUSTER.getConstant(), + SSLEnabledComponent.SERVER.getConstant(), + SSLEnabledComponent.GATEWAY.getConstant(), + SSLEnabledComponent.JMX.getConstant(), + SSLEnabledComponent.HTTP_SERVICE.getConstant(), + SSLEnabledComponent.LOCATOR.getConstant() + }, ",") + })); + } + } + if (value.length > 0) { + if (getClusterSSLEnabled() || getJmxManagerSSLEnabled() || getHttpServiceSSLEnabled() || getServerSSLEnabled() || getGatewaySSLEnabled()) { + throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_COMPONENTS_SET_INVALID_DEPRECATED_SSL_SET.toLocalizedString()); + } + } + return value; + } + + + ++ /** ++ * First check if sslComponents are in the list of valid components. If so, check that no other *-ssl-* properties other than cluster-ssl-* are set. ++ * This would mean one is mixing the "old" with the "new" ++ */ + @ConfigAttributeChecker(name=SECURITY_ENABLED_COMPONENTS) + protected String checkSecurityEnabledComponents(String value) { + // value with no commas + // empty value + // null + if (StringUtils.isEmpty(value) || SecurableComponent.NONE.name().equalsIgnoreCase(value)) { + return value; + } + if (!value.contains(",")) { + SecurableComponent.getEnum(value); + return value; + } + StringTokenizer stringTokenizer = new StringTokenizer(value, ","); + while (stringTokenizer.hasMoreTokens()){ + SecurableComponent.getEnum(stringTokenizer.nextToken()); + } + return value; + } + // AbstractConfig overriding methods @Override @@@ -946,19 -1163,8 +970,21 @@@ m.put(SECURITY_MANAGER, "User defined fully qualified class name implementing SecurityManager interface for integrated security. Defaults to \"{0}\". Legal values can be any \"class name\" implementing SecurityManager that is present in the classpath."); m.put(SECURITY_POST_PROCESSOR, "User defined fully qualified class name implementing PostProcessor interface for integrated security. Defaults to \"{0}\". Legal values can be any \"class name\" implementing PostProcessor that is present in the classpath."); + m.put(SECURITY_ENABLED_COMPONENTS, "A comma delimited list of components that should be secured"); + + m.put(SSL_ENABLED_COMPONENTS, "A comma delimited list of components that require SSL communications"); + + m.put(SSL_CIPHERS, "List of available SSL cipher suites that are to be enabled. Defaults to \"" + DEFAULT_SSL_CIPHERS + "\" meaning your provider''s defaults."); + m.put(SSL_PROTOCOLS, "List of available SSL protocols that are to be enabled. Defaults to \"" + DEFAULT_SSL_PROTOCOLS + "\" meaning defaults of your provider."); + m.put(SSL_REQUIRE_AUTHENTICATION, "If set to false, ciphers and protocols that permit anonymous clients are allowed. Defaults to \"" + DEFAULT_SSL_REQUIRE_AUTHENTICATION + "\"."); + m.put(SSL_KEYSTORE, "Location of the Java keystore file containing the certificate and private key."); + m.put(SSL_KEYSTORE_TYPE, "For Java keystore file format, this property has the value jks (or JKS)."); + m.put(SSL_KEYSTORE_PASSWORD, "Password to access the private key from the keystore."); + m.put(SSL_TRUSTSTORE, "Location of the Java keystore file containing the collection of trusted certificates."); + m.put(SSL_TRUSTSTORE_PASSWORD, "Password to unlock the truststore."); + m.put(SSL_DEFAULT_ALIAS, "The default certificate alias to be used in a multi-key keystore"); + m.put(SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION, "This property determines is the HTTP service with use mutual ssl authentication."); + dcAttDescriptions = Collections.unmodifiableMap(m); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java ---------------------------------------------------------------------- diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java index 3f60778,2ff6540..3663be2 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java @@@ -4186,385 -3985,35 +4186,414 @@@ public interface DistributionConfig ext @ConfigAttributeGetter(name = SECURITY_SHIRO_INIT) String getShiroInit(); + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_CLUSTER_ALIAS) + String getClusterSSLAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_CLUSTER_ALIAS) + void setClusterSSLAlias(String alias); + + /** + * The Default Cluster SSL alias + * @since Geode 1.0 + */ + String DEFAULT_SSL_ALIAS = ""; + + /** + * The name of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String CLUSTER_SSL_ALIAS_NAME = SSL_CLUSTER_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_LOCATOR_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_LOCATOR_ALIAS) + String getLocatorSSLAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_LOCATOR_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_LOCATOR_ALIAS) + void setLocatorSSLAlias(String alias); + + /** + * The name of the {@link ConfigurationProperties#SSL_LOCATOR_ALIAS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String LOCATOR_SSL_ALIAS_NAME = SSL_LOCATOR_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_GATEWAY_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_GATEWAY_ALIAS) + String getGatewaySSLAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_GATEWAY_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_GATEWAY_ALIAS) + void setGatewaySSLAlias(String alias); + + /** + * The name of the {@link ConfigurationProperties#SSL_GATEWAY_ALIAS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String GATEWAY_SSL_ALIAS_NAME = SSL_GATEWAY_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_CLUSTER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_HTTP_SERVICE_ALIAS) + String getHTTPServiceSSLAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_HTTP_SERVICE_ALIAS) + void setHTTPServiceSSLAlias(String alias); + + /** + * The name of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_ALIAS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String HTTP_SERVICE_SSL_ALIAS_NAME = SSL_HTTP_SERVICE_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_JMX_MANAGER_ALIAS) + String getJMXManagerSSLAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_JMX_MANAGER_ALIAS) + void setJMXManagerSSLAlias(String alias); + + /** + * The name of the {@link ConfigurationProperties#SSL_JMX_MANAGER_ALIAS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String JMX_MANAGER_SSL_ALIAS_NAME = SSL_JMX_MANAGER_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_SERVER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_SERVER_ALIAS) + String getServerSSLAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_SERVER_ALIAS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_SERVER_ALIAS) + void setServerSSLAlias(String alias); + + /** + * The name of the {@link ConfigurationProperties#SSL_SERVER_ALIAS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String SERVER_SSL_ALIAS_NAME = SSL_SERVER_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SSL_ENABLED_COMPONENTS) + SSLEnabledComponent[] getSSLEnabledComponents(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SSL_ENABLED_COMPONENTS) + void setSSLEnabledComponents(SSLEnabledComponent[] sslEnabledComponents); + + /** + * The name of the {@link ConfigurationProperties#SSL_ENABLED_COMPONENTS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = SSLEnabledComponent[].class) + String SSL_ENABLED_COMPONENTS_NAME = SSL_ENABLED_COMPONENTS; + + /** + * The default ssl enabled components + * @since Geode 1.0 + */ + SSLEnabledComponent[] DEFAULT_SSL_ENABLED_COMPONENTS = new SSLEnabledComponent[] {}; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_PROTOCOLS} + * property. + */ + @ConfigAttributeGetter(name = SSL_PROTOCOLS) + String getSSLProtocols(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_PROTOCOLS} + * property. + */ + @ConfigAttributeSetter(name = SSL_PROTOCOLS) + void setSSLProtocols(String protocols); + + /** + * The name of the {@link ConfigurationProperties#SSL_PROTOCOLS} property + */ + @ConfigAttribute(type = String.class) + String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_CIPHERS} + * property. + */ + @ConfigAttributeGetter(name = SSL_CIPHERS) + String getSSLCiphers(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_CIPHERS} + * property. + */ + @ConfigAttributeSetter(name = SSL_CIPHERS) + void setSSLCiphers(String ciphers); + + /** + * The name of the {@link ConfigurationProperties#SSL_CIPHERS} property + */ + @ConfigAttribute(type = String.class) + String SSL_CIPHERS_NAME = SSL_CIPHERS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_REQUIRE_AUTHENTICATION} + * property. + */ + @ConfigAttributeGetter(name = SSL_REQUIRE_AUTHENTICATION) + boolean getSSLRequireAuthentication(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_REQUIRE_AUTHENTICATION} + * property. + */ + @ConfigAttributeSetter(name = SSL_REQUIRE_AUTHENTICATION) + void setSSLRequireAuthentication(boolean enabled); + + /** + * The name of the {@link ConfigurationProperties#SSL_REQUIRE_AUTHENTICATION} property + */ + @ConfigAttribute(type = Boolean.class) + String SSL_REQUIRE_AUTHENTICATION_NAME = SSL_REQUIRE_AUTHENTICATION; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_KEYSTORE} + * property. + */ + @ConfigAttributeGetter(name = SSL_KEYSTORE) + String getSSLKeyStore(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_KEYSTORE} + * property. + */ + @ConfigAttributeSetter(name = SSL_KEYSTORE) + void setSSLKeyStore(String keyStore); + + /** + * The name of the {@link ConfigurationProperties#SSL_KEYSTORE} property + */ + @ConfigAttribute(type = String.class) + String SSL_KEYSTORE_NAME = SSL_KEYSTORE; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_KEYSTORE_TYPE} + * property. + */ + @ConfigAttributeGetter(name = SSL_KEYSTORE_TYPE) + String getSSLKeyStoreType(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_KEYSTORE_TYPE} + * property. + */ + @ConfigAttributeSetter(name = SSL_KEYSTORE_TYPE) + void setSSLKeyStoreType(String keyStoreType); + + /** + * The name of the {@link ConfigurationProperties#SSL_KEYSTORE_TYPE} property + */ + @ConfigAttribute(type = String.class) + String SSL_KEYSTORE_TYPE_NAME = SSL_KEYSTORE_TYPE; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_KEYSTORE_PASSWORD} + * property. + */ + @ConfigAttributeGetter(name = SSL_KEYSTORE_PASSWORD) + String getSSLKeyStorePassword(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_KEYSTORE_PASSWORD} + * property. + */ + @ConfigAttributeSetter(name = SSL_KEYSTORE_PASSWORD) + void setSSLKeyStorePassword(String keyStorePassword); + + /** + * The name of the {@link ConfigurationProperties#SSL_KEYSTORE_PASSWORD} property + */ + @ConfigAttribute(type = String.class) + String SSL_KEYSTORE_PASSWORD_NAME = SSL_KEYSTORE_PASSWORD; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE} + * property. + */ + @ConfigAttributeGetter(name = SSL_TRUSTSTORE) + String getSSLTrustStore(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE} + * property. + */ + @ConfigAttributeSetter(name = SSL_TRUSTSTORE) + void setSSLTrustStore(String trustStore); + + /** + * The name of the {@link ConfigurationProperties#SSL_TRUSTSTORE} property + */ + @ConfigAttribute(type = String.class) + String SSL_TRUSTSTORE_NAME = SSL_TRUSTSTORE; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_DEFAULT_ALIAS} + * property. + */ + @ConfigAttributeGetter(name = SSL_DEFAULT_ALIAS) + String getSSLDefaultAlias(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_DEFAULT_ALIAS} + * property. + */ + @ConfigAttributeSetter(name = SSL_DEFAULT_ALIAS) + void setSSLDefaultAlias(String sslDefaultAlias); + + /** + * The name of the {@link ConfigurationProperties#SSL_DEFAULT_ALIAS} property + */ + @ConfigAttribute(type = String.class) + String SSL_DEFAULT_ALIAS_NAME = SSL_DEFAULT_ALIAS; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE_PASSWORD} + * property. + */ + @ConfigAttributeGetter(name = SSL_TRUSTSTORE_PASSWORD) + String getSSLTrustStorePassword(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_TRUSTSTORE_PASSWORD} + * property. + */ + @ConfigAttributeSetter(name = SSL_TRUSTSTORE_PASSWORD) + void setSSLTrustStorePassword(String trustStorePassword); + + /** + * The name of the {@link ConfigurationProperties#SSL_TRUSTSTORE_PASSWORD} property + */ + @ConfigAttribute(type = String.class) + String SSL_TRUSTSTORE_PASSWORD_NAME = SSL_TRUSTSTORE_PASSWORD; + + /** + * Returns the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION} + * property. + */ + @ConfigAttributeGetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION) + boolean getSSLHTTPRequireAuthentication(); + + /** + * Sets the value of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION} + * property. + */ + @ConfigAttributeSetter(name = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION) + void setSSLHTTPRequireAuthentication(boolean requiresAuthentication); + + /** + * The name of the {@link ConfigurationProperties#SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION} property + */ + @ConfigAttribute(type = Boolean.class) + String SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION_NAME = SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION; + + /** + * The default value for http service ssl mutual authentication + */ + boolean DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION = false; + + /** + * Returns the value of the {@link ConfigurationProperties#SECURITY_ENABLED_COMPONENTS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeGetter(name = SECURITY_ENABLED_COMPONENTS) + String getSecurityEnabledComponents(); + + /** + * Sets the value of the {@link ConfigurationProperties#SECURITY_ENABLED_COMPONENTS} + * property. + * @since Geode 1.0 + */ + @ConfigAttributeSetter(name = SECURITY_ENABLED_COMPONENTS) + void setSecurityEnabledComponents(String securityEnabledComponents); + + /** + * The name of the {@link ConfigurationProperties#SECURITY_ENABLED_COMPONENTS} property + * @since Geode 1.0 + */ + @ConfigAttribute(type = String.class) + String SECURITY_ENABLED_COMPONENTS_NAME = SECURITY_ENABLED_COMPONENTS; + + /** + * The default ssl enabled components + * @since Geode 1.0 + */ + String DEFAULT_SECURITY_ENABLED_COMPONENTS = "all"; + //*************** Initializers to gather all the annotations in this class ************************ Map<String, ConfigAttribute> attributes = new HashMap<>(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java ---------------------------------------------------------------------- diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java index a5a9aa6,fd4743b..140401a --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java @@@ -40,13 -39,11 +40,14 @@@ import org.apache.geode.redis.GeodeRedi import com.gemstone.gemfire.GemFireConfigException; import com.gemstone.gemfire.GemFireIOException; +import com.gemstone.gemfire.InternalGemFireException; +import com.gemstone.gemfire.distributed.ConfigurationProperties; import com.gemstone.gemfire.distributed.DistributedSystem; + import org.apache.geode.security.SecurableComponents; import com.gemstone.gemfire.internal.ConfigSource; -import com.gemstone.gemfire.internal.SocketCreator; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; +import com.gemstone.gemfire.internal.net.SSLEnabledComponent; +import com.gemstone.gemfire.internal.net.SocketCreator; import com.gemstone.gemfire.internal.process.ProcessLauncherContext; import com.gemstone.gemfire.memcached.GemFireMemcachedServer; @@@ -450,130 -344,69 +451,131 @@@ public class DistributionConfigImpl ext private String jmxManagerHostnameForClients = DEFAULT_JMX_MANAGER_HOSTNAME_FOR_CLIENTS; private String jmxManagerPasswordFile = DEFAULT_JMX_MANAGER_PASSWORD_FILE; private String jmxManagerAccessFile = DEFAULT_JMX_MANAGER_ACCESS_FILE; - private int jmxManagerHttpPort = DEFAULT_HTTP_SERVICE_PORT; + private int jmxManagerHttpPort = DEFAULT_HTTP_SERVICE_PORT; private int jmxManagerUpdateRate = DEFAULT_JMX_MANAGER_UPDATE_RATE; - - private boolean jmxManagerSSL = DEFAULT_JMX_MANAGER_SSL; + + @Deprecated private boolean jmxManagerSSLEnabled = DEFAULT_JMX_MANAGER_SSL_ENABLED; + @Deprecated private boolean jmxManagerSslRequireAuthentication = DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION; + @Deprecated private String jmxManagerSslProtocols = DEFAULT_JMX_MANAGER_SSL_PROTOCOLS; + @Deprecated private String jmxManagerSslCiphers = DEFAULT_JMX_MANAGER_SSL_CIPHERS; + @Deprecated private Properties jmxManagerSslProperties = new Properties(); - - protected String jmxManagerSSLKeyStore = DEFAULT_JMX_MANAGER_SSL_KEYSTORE; - protected String jmxManagerSSLKeyStoreType = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_TYPE; - protected String jmxManagerSSLKeyStorePassword = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_PASSWORD; - protected String jmxManagerSSLTrustStore = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE; - protected String jmxManagerSSLTrustStorePassword = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD; - + @Deprecated + private String jmxManagerSSLKeyStore = DEFAULT_JMX_MANAGER_SSL_KEYSTORE; + @Deprecated + private String jmxManagerSSLKeyStoreType = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_TYPE; + @Deprecated + private String jmxManagerSSLKeyStorePassword = DEFAULT_JMX_MANAGER_SSL_KEYSTORE_PASSWORD; + @Deprecated + private String jmxManagerSSLTrustStore = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE; + @Deprecated + private String jmxManagerSSLTrustStorePassword = DEFAULT_JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD; + + private String jmxManagerSSLAlias = DEFAULT_SSL_ALIAS; + + @Deprecated private boolean serverSSLEnabled = DEFAULT_SERVER_SSL_ENABLED; + @Deprecated private boolean serverSslRequireAuthentication = DEFAULT_SERVER_SSL_REQUIRE_AUTHENTICATION; + @Deprecated private String serverSslProtocols = DEFAULT_SERVER_SSL_PROTOCOLS; + @Deprecated private String serverSslCiphers = DEFAULT_SERVER_SSL_CIPHERS; + @Deprecated private Properties serverSslProperties = new Properties(); - - protected String serverSSLKeyStore = DEFAULT_SERVER_SSL_KEYSTORE; - protected String serverSSLKeyStoreType = DEFAULT_SERVER_SSL_KEYSTORE_TYPE; - protected String serverSSLKeyStorePassword = DEFAULT_SERVER_SSL_KEYSTORE_PASSWORD; - protected String serverSSLTrustStore = DEFAULT_SERVER_SSL_TRUSTSTORE; - protected String serverSSLTrustStorePassword = DEFAULT_SERVER_SSL_TRUSTSTORE_PASSWORD; - + @Deprecated + private String serverSSLKeyStore = DEFAULT_SERVER_SSL_KEYSTORE; + @Deprecated + private String serverSSLKeyStoreType = DEFAULT_SERVER_SSL_KEYSTORE_TYPE; + @Deprecated + private String serverSSLKeyStorePassword = DEFAULT_SERVER_SSL_KEYSTORE_PASSWORD; + @Deprecated + private String serverSSLTrustStore = DEFAULT_SERVER_SSL_TRUSTSTORE; + @Deprecated + private String serverSSLTrustStorePassword = DEFAULT_SERVER_SSL_TRUSTSTORE_PASSWORD; + + private String serverSSLAlias = DEFAULT_SSL_ALIAS; + + @Deprecated private boolean gatewaySSLEnabled = DEFAULT_GATEWAY_SSL_ENABLED; + @Deprecated private boolean gatewaySslRequireAuthentication = DEFAULT_GATEWAY_SSL_REQUIRE_AUTHENTICATION; + @Deprecated private String gatewaySslProtocols = DEFAULT_GATEWAY_SSL_PROTOCOLS; + @Deprecated private String gatewaySslCiphers = DEFAULT_GATEWAY_SSL_CIPHERS; + @Deprecated private Properties gatewaySslProperties = new Properties(); - - protected String gatewaySSLKeyStore = DEFAULT_GATEWAY_SSL_KEYSTORE; - protected String gatewaySSLKeyStoreType = DEFAULT_GATEWAY_SSL_KEYSTORE_TYPE; - protected String gatewaySSLKeyStorePassword = DEFAULT_GATEWAY_SSL_KEYSTORE_PASSWORD; - protected String gatewaySSLTrustStore = DEFAULT_GATEWAY_SSL_TRUSTSTORE; - protected String gatewaySSLTrustStorePassword = DEFAULT_GATEWAY_SSL_TRUSTSTORE_PASSWORD; - - + @Deprecated + private String gatewaySSLKeyStore = DEFAULT_GATEWAY_SSL_KEYSTORE; + @Deprecated + private String gatewaySSLKeyStoreType = DEFAULT_GATEWAY_SSL_KEYSTORE_TYPE; + @Deprecated + private String gatewaySSLKeyStorePassword = DEFAULT_GATEWAY_SSL_KEYSTORE_PASSWORD; + @Deprecated + private String gatewaySSLTrustStore = DEFAULT_GATEWAY_SSL_TRUSTSTORE; + @Deprecated + private String gatewaySSLTrustStorePassword = DEFAULT_GATEWAY_SSL_TRUSTSTORE_PASSWORD; + + + private String gatewaySSLAlias = DEFAULT_SSL_ALIAS; + + @Deprecated private boolean httpServiceSSLEnabled = DEFAULT_HTTP_SERVICE_SSL_ENABLED; + @Deprecated private boolean httpServiceSSLRequireAuthentication = DEFAULT_HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION; + @Deprecated private String httpServiceSSLProtocols = DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS; + @Deprecated private String httpServiceSSLCiphers = DEFAULT_HTTP_SERVICE_SSL_CIPHERS; + @Deprecated private Properties httpServiceSSLProperties = new Properties(); - - protected String httpServiceSSLKeyStore = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE; - protected String httpServiceSSLKeyStoreType = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_TYPE; - protected String httpServiceSSLKeyStorePassword = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_PASSWORD; - protected String httpServiceSSLTrustStore = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE; - protected String httpServiceSSLTrustStorePassword = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD; - + @Deprecated + private String httpServiceSSLKeyStore = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE; + @Deprecated + private String httpServiceSSLKeyStoreType = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_TYPE; + @Deprecated + private String httpServiceSSLKeyStorePassword = DEFAULT_HTTP_SERVICE_SSL_KEYSTORE_PASSWORD; + @Deprecated + private String httpServiceSSLTrustStore = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE; + @Deprecated + private String httpServiceSSLTrustStorePassword = DEFAULT_HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD; + + private String httpServiceSSLAlias = DEFAULT_SSL_ALIAS; + + private SSLEnabledComponent[] sslEnabledComponents = DEFAULT_SSL_ENABLED_COMPONENTS; + + private String sslProtocols = DEFAULT_SSL_PROTOCOLS; + private String sslCiphers = DEFAULT_SSL_CIPHERS; + private boolean sslRequireAuthentication = DEFAULT_SSL_REQUIRE_AUTHENTICATION; + private String sslKeyStore = DEFAULT_SSL_KEYSTORE; + private String sslKeyStoreType = DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE; + private String sslKeyStorePassword = DEFAULT_SSL_KEYSTORE_PASSWORD; + private String sslTrustStore = DEFAULT_SSL_TRUSTSTORE; + private String sslTrustStorePassword = DEFAULT_SSL_TRUSTSTORE_PASSWORD; + private boolean sslHttpServiceRequireAuthentication = DEFAULT_SSL_HTTP_SERVICE_REQUIRE_AUTHENTICATION; + + private String locatorSSLAlias = DEFAULT_SSL_ALIAS; + + private String sslDefaultAlias = DEFAULT_SSL_ALIAS; + private Map<String, ConfigSource> sourceMap = Collections.synchronizedMap(new HashMap<String, ConfigSource>()); - + protected String userCommandPackages = DEFAULT_USER_COMMAND_PACKAGES; - /** - * "off-heap-memory-size" with value of "" or "<size>[g|m]" - */ + private String securityEnabledComponents = DEFAULT_SECURITY_ENABLED_COMPONENTS; + + /** "off-heap-memory-size" with value of "" or "<size>[g|m]" */ ++ protected String offHeapMemorySize = DEFAULT_OFF_HEAP_MEMORY_SIZE; - - /** Whether pages should be locked into memory or allowed to swap to disk */ + + /** + * Whether pages should be locked into memory or allowed to swap to disk + */ private boolean lockMemory = DEFAULT_LOCK_MEMORY; private String shiroInit = ""; @@@ -754,28 -592,8 +756,30 @@@ this.shiroInit = other.getShiroInit(); this.securityManager = other.getSecurityManager(); this.postProcessor = other.getPostProcessor(); + + this.securityEnabledComponents = ((DistributionConfigImpl) other).securityEnabledComponents; + this.clusterSSLAlias = other.getClusterSSLAlias(); + this.gatewaySSLAlias = other.getGatewaySSLAlias(); + this.httpServiceSSLAlias = other.getHTTPServiceSSLAlias(); + this.jmxManagerSSLAlias = other.getJMXManagerSSLAlias(); + this.serverSSLAlias = other.getServerSSLAlias(); + this.locatorSSLAlias = other.getLocatorSSLAlias(); + + this.sslEnabledComponents = ((DistributionConfigImpl) other).sslEnabledComponents; + + this.sslCiphers = other.getSSLCiphers(); + this.sslProtocols = other.getSSLProtocols(); + this.sslRequireAuthentication = other.getSSLRequireAuthentication(); + this.sslKeyStore = other.getSSLKeyStore(); + this.sslKeyStorePassword = other.getSSLKeyStorePassword(); + this.sslKeyStoreType = other.getSSLKeyStoreType(); + this.sslTrustStore = other.getSSLTrustStore(); + this.sslTrustStorePassword = other.getSSLTrustStorePassword(); + this.sslProperties = other.getSSLProperties(); + this.sslDefaultAlias = other.getSSLDefaultAlias(); + this.sslHttpServiceRequireAuthentication = other.getSSLHTTPRequireAuthentication(); + + } /** @@@ -2485,177 -2324,16 +2492,187 @@@ } @Override + public String getSecurityEnabledComponents() { + return securityEnabledComponents; + } + + @Override + public void setSecurityEnabledComponents(final String securityEnabledComponents) { + this.securityEnabledComponents = (String) checkAttribute(SECURITY_ENABLED_COMPONENTS, securityEnabledComponents); + } + ++ @Override + public String getClusterSSLAlias() { + return clusterSSLAlias; + } + + @Override + public void setClusterSSLAlias(final String alias) { + clusterSSLAlias = alias; + } + + @Override + public String getLocatorSSLAlias() { + return locatorSSLAlias; + } + + @Override + public void setLocatorSSLAlias(final String locatorSSLAlias) { + this.locatorSSLAlias = locatorSSLAlias; + } + + @Override + public String getGatewaySSLAlias() { + return gatewaySSLAlias; + } + + @Override + public void setGatewaySSLAlias(final String alias) { + gatewaySSLAlias = alias; + } + + @Override + public String getHTTPServiceSSLAlias() { + return httpServiceSSLAlias; + } + + @Override + public void setHTTPServiceSSLAlias(final String alias) { + httpServiceSSLAlias = alias; + } + + @Override + public String getJMXManagerSSLAlias() { + return jmxManagerSSLAlias; + } + + @Override + public void setJMXManagerSSLAlias(final String alias) { + jmxManagerSSLAlias = alias; + } + + @Override + public String getServerSSLAlias() { + return serverSSLAlias; + } + + @Override + public void setServerSSLAlias(final String alias) { + serverSSLAlias = alias; + } + + @Override + public SSLEnabledComponent[] getSSLEnabledComponents() { + return sslEnabledComponents; + } + + @Override + public void setSSLEnabledComponents(final SSLEnabledComponent[] sslEnabledComponents) { + this.sslEnabledComponents = sslEnabledComponents; + } + + @Override + public String getSSLProtocols() { + return sslProtocols; + } + + @Override + public void setSSLProtocols(final String sslProtocols) { + this.sslProtocols = sslProtocols; + } + + @Override + public String getSSLCiphers() { + return sslCiphers; + } + + @Override + public void setSSLCiphers(final String sslCiphers) { + this.sslCiphers = sslCiphers; + } + + @Override + public boolean getSSLRequireAuthentication() { + return sslRequireAuthentication; + } + + @Override + public void setSSLRequireAuthentication(final boolean sslRequireAuthentication) { + this.sslRequireAuthentication = sslRequireAuthentication; + } + + @Override + public String getSSLKeyStore() { + return sslKeyStore; + } + + @Override + public void setSSLKeyStore(final String sslKeyStore) { + this.sslKeyStore = sslKeyStore; + } + + @Override + public String getSSLKeyStoreType() { + return sslKeyStoreType; + } + + @Override + public void setSSLKeyStoreType(final String sslKeyStoreType) { + this.sslKeyStoreType = sslKeyStoreType; + } + + @Override + public String getSSLKeyStorePassword() { + return sslKeyStorePassword; + } + + @Override + public void setSSLKeyStorePassword(final String sslKeyStorePassword) { + this.sslKeyStorePassword = sslKeyStorePassword; + } + + @Override + public String getSSLTrustStore() { + return sslTrustStore; + } + + @Override + public void setSSLTrustStore(final String sslTrustStore) { + this.sslTrustStore = sslTrustStore; + } + + @Override + public String getSSLDefaultAlias() { + return sslDefaultAlias; + } + + @Override + public void setSSLDefaultAlias(final String sslDefaultAlias) { + this.sslDefaultAlias = sslDefaultAlias; + } + + @Override + public String getSSLTrustStorePassword() { + return sslTrustStorePassword; + } + + @Override + public void setSSLTrustStorePassword(final String sslTrustStorePassword) { + this.sslTrustStorePassword = sslTrustStorePassword; + } + + @Override + public boolean getSSLHTTPRequireAuthentication() { + return sslHttpServiceRequireAuthentication; + } + + @Override + public void setSSLHTTPRequireAuthentication(final boolean requiresAuthenatication) { + this.sslHttpServiceRequireAuthentication = requiresAuthenatication; + } + /////////////////////// Utility Methods /////////////////////// + /** * Two instances of <code>DistributedConfigImpl</code> are equal if all of * their configuration properties are the same. Be careful if you need to @@@ -3019,362 -2602,268 +3036,410 @@@ if (locatorWaitTime != other.locatorWaitTime) { return false; } - if (logDiskSpaceLimit != other.logDiskSpaceLimit) + if (logDiskSpaceLimit != other.logDiskSpaceLimit) { return false; + } if (logFile == null) { - if (other.logFile != null) + if (other.logFile != null) { return false; - } else if (!logFile.equals(other.logFile)) + } + } else if (!logFile.equals(other.logFile)) { return false; - if (logFileSizeLimit != other.logFileSizeLimit) + } + if (logFileSizeLimit != other.logFileSizeLimit) { return false; - if (logLevel != other.logLevel) + } + if (logLevel != other.logLevel) { return false; - if (maxNumReconnectTries != other.maxNumReconnectTries) + } + if (maxNumReconnectTries != other.maxNumReconnectTries) { return false; - if (maxWaitTimeForReconnect != other.maxWaitTimeForReconnect) + } + if (maxWaitTimeForReconnect != other.maxWaitTimeForReconnect) { return false; + } if (mcastAddress == null) { - if (other.mcastAddress != null) + if (other.mcastAddress != null) { return false; - } else if (!mcastAddress.equals(other.mcastAddress)) + } + } else if (!mcastAddress.equals(other.mcastAddress)) { return false; + } if (mcastFlowControl == null) { - if (other.mcastFlowControl != null) + if (other.mcastFlowControl != null) { return false; - } else if (!mcastFlowControl.equals(other.mcastFlowControl)) + } + } else if (!mcastFlowControl.equals(other.mcastFlowControl)) { return false; - if (mcastPort != other.mcastPort) + } + if (mcastPort != other.mcastPort) { return false; - if (mcastRecvBufferSize != other.mcastRecvBufferSize) + } + if (mcastRecvBufferSize != other.mcastRecvBufferSize) { return false; - if (mcastSendBufferSize != other.mcastSendBufferSize) + } + if (mcastSendBufferSize != other.mcastSendBufferSize) { return false; - if (mcastTtl != other.mcastTtl) + } + if (mcastTtl != other.mcastTtl) { return false; - if (memberTimeout != other.memberTimeout) + } + if (memberTimeout != other.memberTimeout) { return false; - if (!Arrays.equals(membershipPortRange, other.membershipPortRange)) + } + if (!Arrays.equals(membershipPortRange, other.membershipPortRange)) { return false; - if (memcachedPort != other.memcachedPort) + } + if (memcachedPort != other.memcachedPort) { return false; + } if (memcachedProtocol == null) { - if (other.memcachedProtocol != null) + if (other.memcachedProtocol != null) { return false; - } else if (!memcachedProtocol.equals(other.memcachedProtocol)) + } + } else if (!memcachedProtocol.equals(other.memcachedProtocol)) { return false; - if (modifiable != other.modifiable) + } + if (modifiable != other.modifiable) { return false; + } if (name == null) { - if (other.name != null) + if (other.name != null) { return false; - } else if (!name.equals(other.name)) + } + } else if (!name.equals(other.name)) { return false; + } if (props == null) { - if (other.props != null) + if (other.props != null) { return false; - } else if (!props.equals(other.props)) + } + } else if (!props.equals(other.props)) { return false; + } if (redundancyZone == null) { - if (other.redundancyZone != null) + if (other.redundancyZone != null) { return false; - } else if (!redundancyZone.equals(other.redundancyZone)) + } + } else if (!redundancyZone.equals(other.redundancyZone)) { return false; + } if (remoteLocators == null) { - if (other.remoteLocators != null) + if (other.remoteLocators != null) { return false; - } else if (!remoteLocators.equals(other.remoteLocators)) + } + } else if (!remoteLocators.equals(other.remoteLocators)) { return false; - if (removeUnresponsiveClient != other.removeUnresponsiveClient) + } + if (removeUnresponsiveClient != other.removeUnresponsiveClient) { return false; + } if (roles == null) { - if (other.roles != null) + if (other.roles != null) { return false; - } else if (!roles.equals(other.roles)) + } + } else if (!roles.equals(other.roles)) { return false; + } if (security == null) { - if (other.security != null) + if (other.security != null) { return false; - } else if (!security.equals(other.security)) + } + } else if (!security.equals(other.security)) { return false; + } if (securityClientAccessor == null) { - if (other.securityClientAccessor != null) + if (other.securityClientAccessor != null) { return false; - } else if (!securityClientAccessor.equals(other.securityClientAccessor)) + } + } else if (!securityClientAccessor.equals(other.securityClientAccessor)) { return false; + } if (securityClientAccessorPP == null) { - if (other.securityClientAccessorPP != null) + if (other.securityClientAccessorPP != null) { return false; - } else if (!securityClientAccessorPP.equals(other.securityClientAccessorPP)) + } + } else if (!securityClientAccessorPP.equals(other.securityClientAccessorPP)) { return false; + } if (securityClientAuthInit == null) { - if (other.securityClientAuthInit != null) + if (other.securityClientAuthInit != null) { return false; - } else if (!securityClientAuthInit.equals(other.securityClientAuthInit)) + } + } else if (!securityClientAuthInit.equals(other.securityClientAuthInit)) { return false; + } if (securityClientAuthenticator == null) { - if (other.securityClientAuthenticator != null) + if (other.securityClientAuthenticator != null) { return false; - } else if (!securityClientAuthenticator - .equals(other.securityClientAuthenticator)) - return false; - if (securityManager == null) { - if (other.securityManager != null) + } + } else if (!securityClientAuthenticator.equals(other.securityClientAuthenticator)) { + if (securityManager == null) { + if (other.securityManager != null) { + return false; + } + } else if (!securityManager.equals(other.securityManager)) { return false; - } else if (!securityManager - .equals(other.securityManager)) - return false; - if (postProcessor == null) { - if (other.postProcessor != null) + } + if (postProcessor == null) { + if (other.postProcessor != null) { + return false; + } + } else if (!postProcessor.equals(other.postProcessor)) { return false; - } else if (!postProcessor - .equals(other.postProcessor)) - return false; - if (shiroInit == null) { - if (other.shiroInit != null) + } + if (shiroInit == null) { + if (other.shiroInit != null) { + return false; + } + } else if (!shiroInit.equals(other.shiroInit)) { return false; - } else if (!shiroInit - .equals(other.shiroInit)) - return false; + } + } if (securityClientDHAlgo == null) { - if (other.securityClientDHAlgo != null) + if (other.securityClientDHAlgo != null) { return false; - } else if (!securityClientDHAlgo.equals(other.securityClientDHAlgo)) + } + } else if (!securityClientDHAlgo.equals(other.securityClientDHAlgo)) { return false; + } if (securityLogFile == null) { - if (other.securityLogFile != null) + if (other.securityLogFile != null) { return false; - } else if (!securityLogFile.equals(other.securityLogFile)) + } + } else if (!securityLogFile.equals(other.securityLogFile)) { return false; - if (securityLogLevel != other.securityLogLevel) + } + if (securityLogLevel != other.securityLogLevel) { return false; + } if (securityPeerAuthInit == null) { - if (other.securityPeerAuthInit != null) + if (other.securityPeerAuthInit != null) { return false; - } else if (!securityPeerAuthInit.equals(other.securityPeerAuthInit)) + } + } else if (!securityPeerAuthInit.equals(other.securityPeerAuthInit)) { return false; + } if (securityPeerAuthenticator == null) { - if (other.securityPeerAuthenticator != null) + if (other.securityPeerAuthenticator != null) { return false; - } else if (!securityPeerAuthenticator - .equals(other.securityPeerAuthenticator)) + } + } else if (!securityPeerAuthenticator.equals(other.securityPeerAuthenticator)) { return false; - if (securityPeerMembershipTimeout != other.securityPeerMembershipTimeout) + } + if (securityPeerMembershipTimeout != other.securityPeerMembershipTimeout) { return false; + } if (serverBindAddress == null) { - if (other.serverBindAddress != null) + if (other.serverBindAddress != null) { return false; - } else if (!serverBindAddress.equals(other.serverBindAddress)) + } + } else if (!serverBindAddress.equals(other.serverBindAddress)) { return false; - if (serverSSLEnabled != other.serverSSLEnabled) + } + if (serverSSLEnabled != other.serverSSLEnabled) { return false; + } if (serverSSLKeyStore == null) { - if (other.serverSSLKeyStore != null) + if (other.serverSSLKeyStore != null) { return false; - } else if (!serverSSLKeyStore.equals(other.serverSSLKeyStore)) + } + } else if (!serverSSLKeyStore.equals(other.serverSSLKeyStore)) { return false; + } if (serverSSLKeyStorePassword == null) { - if (other.serverSSLKeyStorePassword != null) + if (other.serverSSLKeyStorePassword != null) { return false; - } else if (!serverSSLKeyStorePassword - .equals(other.serverSSLKeyStorePassword)) + } + } else if (!serverSSLKeyStorePassword.equals(other.serverSSLKeyStorePassword)) { return false; + } if (serverSSLKeyStoreType == null) { - if (other.serverSSLKeyStoreType != null) + if (other.serverSSLKeyStoreType != null) { return false; - } else if (!serverSSLKeyStoreType.equals(other.serverSSLKeyStoreType)) + } + } else if (!serverSSLKeyStoreType.equals(other.serverSSLKeyStoreType)) { return false; + } if (serverSSLTrustStore == null) { - if (other.serverSSLTrustStore != null) + if (other.serverSSLTrustStore != null) { return false; - } else if (!serverSSLTrustStore.equals(other.serverSSLTrustStore)) + } + } else if (!serverSSLTrustStore.equals(other.serverSSLTrustStore)) { return false; + } if (serverSSLTrustStorePassword == null) { - if (other.serverSSLTrustStorePassword != null) + if (other.serverSSLTrustStorePassword != null) { return false; - } else if (!serverSSLTrustStorePassword - .equals(other.serverSSLTrustStorePassword)) + } + } else if (!serverSSLTrustStorePassword.equals(other.serverSSLTrustStorePassword)) { return false; + } if (serverSslCiphers == null) { - if (other.serverSslCiphers != null) + if (other.serverSslCiphers != null) { return false; - } else if (!serverSslCiphers.equals(other.serverSslCiphers)) + } + } else if (!serverSslCiphers.equals(other.serverSslCiphers)) { return false; + } if (serverSslProperties == null) { - if (other.serverSslProperties != null) + if (other.serverSslProperties != null) { return false; - } else if (!serverSslProperties.equals(other.serverSslProperties)) + } + } else if (!serverSslProperties.equals(other.serverSslProperties)) { return false; + } if (serverSslProtocols == null) { - if (other.serverSslProtocols != null) + if (other.serverSslProtocols != null) { return false; - } else if (!serverSslProtocols.equals(other.serverSslProtocols)) + } + } else if (!serverSslProtocols.equals(other.serverSslProtocols)) { return false; - if (serverSslRequireAuthentication != other.serverSslRequireAuthentication) + } + if (serverSslRequireAuthentication != other.serverSslRequireAuthentication) { return false; - if (socketBufferSize != other.socketBufferSize) + } + if (socketBufferSize != other.socketBufferSize) { return false; - if (socketLeaseTime != other.socketLeaseTime) + } + if (socketLeaseTime != other.socketLeaseTime) { return false; + } if (sourceMap == null) { - if (other.sourceMap != null) + if (other.sourceMap != null) { return false; - } else if (!sourceMap.equals(other.sourceMap)) + } + } else if (!sourceMap.equals(other.sourceMap)) { return false; - if (sslCiphers == null) { - if (other.sslCiphers != null) + } + if (sslProperties == null) { + if (other.sslProperties != null) { return false; - } else if (!sslCiphers.equals(other.sslCiphers)) + } + } else if (!sslProperties.equals(other.sslProperties)) { return false; - if (sslEnabled != other.sslEnabled) + } + if (startDevRestApi != other.startDevRestApi) { return false; - if (sslProperties == null) { - if (other.sslProperties != null) + } + if (startLocator == null) { + if (other.startLocator != null) { return false; - } else if (!sslProperties.equals(other.sslProperties)) + } + } else if (!startLocator.equals(other.startLocator)) { return false; + if (sslProtocols == null) { + if (other.sslProtocols != null) + return false; + } else if (!sslProtocols.equals(other.sslProtocols)) + return false; + if (sslRequireAuthentication != other.sslRequireAuthentication) + return false; + if (startDevRestApi != other.startDevRestApi) + return false; + if (startLocator == null) { + if (other.startLocator != null) + return false; + } else if (!startLocator.equals(other.startLocator)) + return false; + if (startLocatorPort != other.startLocatorPort) + return false; + if (statisticArchiveFile == null) { + if (other.statisticArchiveFile != null) + return false; + } else if (!statisticArchiveFile.equals(other.statisticArchiveFile)) + return false; + if (statisticSampleRate != other.statisticSampleRate) + return false; + if (statisticSamplingEnabled != other.statisticSamplingEnabled) + return false; + if (tcpPort != other.tcpPort) + return false; + if (udpFragmentSize != other.udpFragmentSize) + return false; + if (udpRecvBufferSize != other.udpRecvBufferSize) + return false; + if (udpSendBufferSize != other.udpSendBufferSize) + return false; + if (useSharedConfiguration != other.useSharedConfiguration) + return false; + if (userCommandPackages == null) { + if (other.userCommandPackages != null) + return false; + } else if (!userCommandPackages.equals(other.userCommandPackages)) + return false; + if (userDefinedProps == null) { + if (other.userDefinedProps != null) + return false; + } else if (!userDefinedProps.equals(other.userDefinedProps)) + return false; + if (!StringUtils.equals(securityEnabledComponents, other.securityEnabledComponents)) { + return false; + } + } + if (startLocatorPort != other.startLocatorPort) { + return false; + } + if (statisticArchiveFile == null) { + if (other.statisticArchiveFile != null) { + return false; + } + } else if (!statisticArchiveFile.equals(other.statisticArchiveFile)) { + return false; + } + if (statisticSampleRate != other.statisticSampleRate) { + return false; + } + if (statisticSamplingEnabled != other.statisticSamplingEnabled) { + return false; + } + if (tcpPort != other.tcpPort) { + return false; + } + if (udpFragmentSize != other.udpFragmentSize) { + return false; + } + if (udpRecvBufferSize != other.udpRecvBufferSize) { + return false; + } + if (udpSendBufferSize != other.udpSendBufferSize) { + return false; + } + if (useSharedConfiguration != other.useSharedConfiguration) { + return false; + } + if (userCommandPackages == null) { + if (other.userCommandPackages != null) { + return false; + } + } else if (!userCommandPackages.equals(other.userCommandPackages)) { + return false; + } + if (userDefinedProps == null) { + if (other.userDefinedProps != null) { + return false; + } + } else if (!userDefinedProps.equals(other.userDefinedProps)) { + return false; + } + if (clusterSSLAlias != other.clusterSSLAlias) { + return false; + } + if (serverSSLAlias != other.serverSSLAlias) { + return false; + } + if (httpServiceSSLAlias != other.httpServiceSSLAlias) { + return false; + } + if (jmxManagerSSLAlias != other.jmxManagerSSLAlias) { + return false; + } + if (gatewaySSLAlias != other.gatewaySSLAlias) { + return false; + } + if (sslEnabledComponents != other.sslEnabledComponents) { + return false; + } return true; } @@@ -3517,17 -3141,14 +3582,22 @@@ result = prime * result + udpRecvBufferSize; result = prime * result + udpSendBufferSize; result = prime * result + (useSharedConfiguration ? 1231 : 1237); + result = prime * result + + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode()); + result = prime * result + + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode()); + result = prime * result + ((securityEnabledComponents == null) ? 0 : securityEnabledComponents.hashCode()); + result = prime * result + ((userCommandPackages == null) ? 0 : userCommandPackages.hashCode()); + result = prime * result + ((userDefinedProps == null) ? 0 : userDefinedProps.hashCode()); + result = prime * result + ((clusterSSLAlias == null) ? 0 : clusterSSLAlias.hashCode()); + result = prime * result + ((serverSSLAlias == null) ? 0 : serverSSLAlias.hashCode()); + result = prime * result + ((jmxManagerSSLAlias == null) ? 0 : jmxManagerSSLAlias.hashCode()); + result = prime * result + ((gatewaySSLAlias == null) ? 0 : gatewaySSLAlias.hashCode()); + result = prime * result + ((httpServiceSSLAlias == null) ? 0 : httpServiceSSLAlias.hashCode()); + result = prime * result + ((sslEnabledComponents == null) ? 0 : sslEnabledComponents.hashCode()); return result; } - + /** * Used by gemfire build.xml to generate a default gemfire.properties * for use by applications. See bug 30995 for the feature request. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java ---------------------------------------------------------------------- diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java index 1d0081e,49a4c97..79de8f1 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java @@@ -101,10 -53,16 +101,18 @@@ import com.gemstone.gemfire.internal.lo import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage; import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender; import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders; +import com.gemstone.gemfire.internal.net.SSLConfigurationFactory; +import com.gemstone.gemfire.internal.net.SocketCreatorFactory; import com.gemstone.gemfire.internal.offheap.MemoryAllocator; import com.gemstone.gemfire.internal.offheap.OffHeapStorage; + import com.gemstone.gemfire.internal.statistics.DummyStatisticsImpl; + import com.gemstone.gemfire.internal.statistics.GemFireStatSampler; + import com.gemstone.gemfire.internal.statistics.platform.LinuxProcFsStatistics; + import com.gemstone.gemfire.internal.statistics.LocalStatisticsImpl; + import com.gemstone.gemfire.internal.statistics.platform.OsStatisticsFactory; + import com.gemstone.gemfire.internal.statistics.StatisticsImpl; + import com.gemstone.gemfire.internal.statistics.StatisticsManager; + import com.gemstone.gemfire.internal.statistics.StatisticsTypeFactoryImpl; import com.gemstone.gemfire.internal.tcp.ConnectionTable; import com.gemstone.gemfire.internal.util.concurrent.StoppableCondition; import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock; @@@ -1128,9 -1110,9 +1136,8 @@@ public class InternalDistributedSystem // Run the shutdown, if any if (sdListener != null) { try { - // TODO: should we make sure this times out? sdListener.onShutdown(this); - } - catch (VirtualMachineError err) { + } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dfbc88b2/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java ---------------------------------------------------------------------- diff --cc geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java index d96d0ce,46d9610..f1eb629 mode 100755,100644..100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java @@@ -159,34 -135,26 +159,32 @@@ public class InternalLocator extends Lo * being colocated in a normal member this field will be null. */ private Cache myCache; - - /** locator state file */ + + /** + * locator state file + */ private File stateFile; - - /** product use logging */ + + /** + * product use logging + */ private ProductUseLog productUseLog; - + private boolean peerLocator; - + private ServerLocator serverLocator; - + protected volatile LocatorStats stats; - //TODO - these to properties are a waste of memory once - //the system is started. private Properties env; - - /** the TcpHandler used for peer location */ + + /** + * the TcpHandler used for peer location + */ private NetLocator locatorImpl; - + private DistributionConfigImpl config; - + private LocatorMembershipListener locatorListener; private WanLocatorDiscoverer locatorDiscoverer; @@@ -684,9 -708,7 +682,7 @@@ */ public void startDistributedSystem() throws UnknownHostException { InternalDistributedSystem existing = InternalDistributedSystem.getConnectedInstance(); - + - //TODO : For now set this property to create a PDX registry that does nothing - // Investigate keeping the typeRegistry in the locators if (existing != null) { // LOG: changed from config to info logger.info(LocalizedMessage.create(LocalizedStrings.InternalLocator_USING_EXISTING_DISTRIBUTED_SYSTEM__0, existing));
