You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ec...@apache.org on 2017/08/10 15:20:35 UTC
[27/27] geode-native git commit: GEODE-2729: Remove global variables
GEODE-2729: Remove global variables
- Remove CacheImpl::getInstance calls
- Converted PdxTypeRegistry clear to non-static method
- Adding Type Registry to cpp code as a public object.
- Convert static PoolManager method calls into instance method calls
- Remove PoolFactory/PoolManager global connectionPool singleton
- Allows multiple PoolFactories per Cache
- Remove default pool logic from Cache into PoolManager
- Add mutli-cache integration test
Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/da389793
Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/da389793
Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/da389793
Branch: refs/heads/develop
Commit: da389793ef291fd812d0aa0c2b714b6e4ced92e5
Parents: 5b1634a
Author: David Kimura <dk...@pivotal.io>
Authored: Tue Jun 6 21:46:43 2017 +0000
Committer: David Kimura <dk...@pivotal.io>
Committed: Thu Aug 10 07:52:15 2017 -0700
----------------------------------------------------------------------
src/clicache/integration-test/CacheHelperN.cs | 101 +-
.../integration-test/DataOutputTests.cs | 8 +-
.../integration-test/DistributedSystemTests.cs | 2 +-
src/clicache/integration-test/PutGetTestsN.cs | 505 +-----
.../integration-test/SerializationTestsN.cs | 41 +-
...ThinClientAppDomainFunctionExecutionTests.cs | 2 +-
.../ThinClientAppDomainQueryTests.cs | 14 +-
.../integration-test/ThinClientCallbackArgN.cs | 6 +-
.../integration-test/ThinClientCqIRTestsN.cs | 10 +-
.../integration-test/ThinClientCqTestsN.cs | 24 +-
.../integration-test/ThinClientDeltaTestN.cs | 20 +-
.../ThinClientDurableCqTestsN.cs | 14 +-
.../integration-test/ThinClientDurableTestsN.cs | 14 +-
.../ThinClientFunctionExecutionTestsN.cs | 14 +-
.../ThinClientHARegionTestsN.cs | 6 +-
.../integration-test/ThinClientPdxTests.cs | 613 +------
.../integration-test/ThinClientPoolTestsN.cs | 16 +-
.../integration-test/ThinClientQueryTestsN.cs | 97 +-
.../integration-test/ThinClientRegionTestsN.cs | 2 +-
.../ThinClientSecurityAuthzTestBaseN.cs | 4 +-
.../ThinClientSecurityAuthzTestsMUN.cs | 8 +-
.../ThinClientStatisticTestsN.cs | 28 +-
.../ThinClientStringArrayTestsN.cs | 10 +-
src/clicache/src/Cache.cpp | 47 +-
src/clicache/src/Cache.hpp | 10 +
src/clicache/src/CacheFactory.cpp | 414 +----
src/clicache/src/CacheFactory.hpp | 442 +----
src/clicache/src/CacheableHashSet.hpp | 6 +-
src/clicache/src/DataInput.cpp | 25 +-
src/clicache/src/DataInput.hpp | 12 +-
src/clicache/src/DataOutput.cpp | 4 +-
src/clicache/src/DataOutput.hpp | 10 +-
src/clicache/src/DistributedSystem.cpp | 416 +----
src/clicache/src/DistributedSystem.hpp | 48 +-
src/clicache/src/Execution.cpp | 4 +-
src/clicache/src/LocalRegion.cpp | 81 +-
src/clicache/src/Pool.cpp | 2 +-
src/clicache/src/PoolFactory.cpp | 4 +-
src/clicache/src/PoolFactory.hpp | 2 +-
src/clicache/src/PoolManager.cpp | 12 +-
src/clicache/src/PoolManager.hpp | 35 +-
src/clicache/src/Properties.cpp | 114 +-
src/clicache/src/Properties.hpp | 39 +-
src/clicache/src/Query.cpp | 2 +-
src/clicache/src/Region.cpp | 117 +-
src/clicache/src/ResultCollector.cpp | 2 +-
src/clicache/src/Serializable.cpp | 123 +-
src/clicache/src/Serializable.hpp | 32 +-
src/clicache/src/StatisticsFactory.cpp | 31 +-
src/clicache/src/StatisticsFactory.hpp | 14 +-
src/clicache/src/impl/AuthenticatedCache.cpp | 10 +-
src/clicache/src/impl/CacheLoader.hpp | 2 +-
src/clicache/src/impl/CliCallbackDelgate.cpp | 40 +
src/clicache/src/impl/CliCallbackDelgate.hpp | 18 +-
src/clicache/src/impl/DelegateWrapper.hpp | 16 +-
.../src/impl/FixedPartitionResolver.hpp | 2 +-
src/clicache/src/impl/ManagedAuthInitialize.cpp | 2 +-
src/clicache/src/impl/ManagedAuthInitialize.hpp | 2 +-
src/clicache/src/impl/ManagedCacheableDelta.cpp | 4 +-
src/clicache/src/impl/ManagedCacheableDelta.hpp | 4 +-
.../src/impl/ManagedCacheableDeltaBytes.cpp | 24 +-
.../src/impl/ManagedCacheableDeltaBytes.hpp | 41 +-
src/clicache/src/impl/ManagedCacheableKey.cpp | 21 +-
src/clicache/src/impl/ManagedCacheableKey.hpp | 9 +-
.../src/impl/ManagedCacheableKeyBytes.cpp | 16 +-
.../src/impl/ManagedCacheableKeyBytes.hpp | 3 +-
src/clicache/src/impl/ManagedString.hpp | 3 +-
src/clicache/src/impl/PartitionResolver.hpp | 2 +-
src/clicache/src/impl/PdxHelper.cpp | 88 +-
src/clicache/src/impl/PdxHelper.hpp | 13 +-
.../src/impl/PdxInstanceFactoryImpl.cpp | 9 +-
.../src/impl/PdxInstanceFactoryImpl.hpp | 13 +-
src/clicache/src/impl/PdxInstanceImpl.cpp | 51 +-
src/clicache/src/impl/PdxInstanceImpl.hpp | 11 +-
.../src/impl/PdxManagedCacheableKey.cpp | 11 +-
.../src/impl/PdxManagedCacheableKey.hpp | 6 +-
.../src/impl/PdxManagedCacheableKeyBytes.cpp | 114 +-
.../src/impl/PdxManagedCacheableKeyBytes.hpp | 29 +-
src/clicache/src/impl/PdxTypeRegistry.cpp | 16 +-
src/clicache/src/impl/PdxTypeRegistry.hpp | 48 +-
.../src/impl/PersistenceManagerProxy.hpp | 2 +-
src/clicache/src/impl/SafeConvert.hpp | 28 +-
src/cppcache/include/geode/AuthInitialize.hpp | 2 +-
src/cppcache/include/geode/Cache.hpp | 34 +-
src/cppcache/include/geode/CacheFactory.hpp | 434 +----
src/cppcache/include/geode/CqOperation.hpp | 1 -
src/cppcache/include/geode/DataInput.hpp | 33 +-
src/cppcache/include/geode/DataOutput.hpp | 27 +-
src/cppcache/include/geode/Delta.hpp | 4 +
.../include/geode/DistributedSystem.hpp | 75 +-
src/cppcache/include/geode/GeodeCache.hpp | 18 +-
src/cppcache/include/geode/PdxInstance.hpp | 12 +-
src/cppcache/include/geode/PdxSerializable.hpp | 2 -
src/cppcache/include/geode/PdxWrapper.hpp | 17 +-
src/cppcache/include/geode/Pool.hpp | 11 +-
src/cppcache/include/geode/PoolFactory.hpp | 8 +-
src/cppcache/include/geode/PoolManager.hpp | 30 +-
src/cppcache/include/geode/Region.hpp | 1668 +++++++++---------
src/cppcache/include/geode/RegionFactory.hpp | 37 +-
src/cppcache/include/geode/Serializable.hpp | 30 +-
src/cppcache/include/geode/SystemProperties.hpp | 8 +-
src/cppcache/include/geode/TypeRegistry.hpp | 69 +
src/cppcache/include/geode/geode_types.hpp | 1 -
.../geode/statistics/StatisticsFactory.hpp | 18 +-
.../BuiltinCacheableWrappers.hpp | 18 +-
src/cppcache/integration-test/CMakeLists.txt | 2 -
src/cppcache/integration-test/CacheHelper.cpp | 126 +-
src/cppcache/integration-test/CacheHelper.hpp | 1 -
src/cppcache/integration-test/DeltaEx.hpp | 20 +-
src/cppcache/integration-test/QueryHelper.hpp | 6 +-
.../integration-test/ThinClientDistOps.hpp | 12 +-
.../integration-test/ThinClientDistOps2.hpp | 8 +-
.../integration-test/ThinClientDurable.hpp | 4 +-
.../ThinClientDurableFailover.hpp | 4 +-
.../ThinClientDurableInterest.hpp | 4 +-
.../ThinClientFailoverInterestAllWithCache.hpp | 4 +-
.../integration-test/ThinClientHelper.hpp | 2 +-
.../ThinClientLocalCacheLoader.hpp | 2 -
.../ThinClientMultipleCaches.hpp | 104 ++
.../integration-test/ThinClientNotification.hpp | 2 +-
.../ThinClientPdxSerializer.hpp | 53 +-
.../ThinClientPdxSerializers.hpp | 5 +-
.../integration-test/ThinClientPutAll.hpp | 26 +-
.../ThinClientPutAllWithCallBack.hpp | 28 +-
.../integration-test/ThinClientPutGetAll.hpp | 79 +-
.../integration-test/ThinClientSecurity.hpp | 7 +-
.../integration-test/ThinClientTransactions.hpp | 15 +-
.../ThinClientTransactionsXA.hpp | 15 +-
src/cppcache/integration-test/fw_dunit.cpp | 2 -
.../integration-test/testAttributesMutator.cpp | 6 +-
src/cppcache/integration-test/testCache.cpp | 3 +-
src/cppcache/integration-test/testCacheless.cpp | 19 +-
src/cppcache/integration-test/testConnect.cpp | 18 +-
.../integration-test/testDataOutput.cpp | 44 +-
.../integration-test/testEntriesMap.cpp | 777 --------
.../testEntriesMapForVersioning.cpp | 1297 --------------
.../integration-test/testExpiration.cpp | 3 +-
.../testOverflowPutGetSqLite.cpp | 2 +-
.../integration-test/testRegionTemplateArgs.cpp | 237 ++-
.../integration-test/testSerialization.cpp | 101 +-
.../testThinClientAfterRegionLive.cpp | 5 +-
.../integration-test/testThinClientBigValue.cpp | 8 +-
.../testThinClientCacheableStringArray.cpp | 16 +-
.../testThinClientCacheablesLimits.cpp | 4 +-
.../testThinClientClearRegion.cpp | 8 +-
.../testThinClientConflation.cpp | 4 +-
.../testThinClientContainsKeyOnServer.cpp | 8 +-
.../integration-test/testThinClientCq.cpp | 45 +-
.../integration-test/testThinClientCqDelta.cpp | 47 +-
.../testThinClientCqDurable.cpp | 75 +-
.../testThinClientCqFailover.cpp | 30 +-
.../testThinClientCqHAFailover.cpp | 27 +-
.../integration-test/testThinClientCqIR.cpp | 26 +-
.../testThinClientDeltaWithNotification.cpp | 17 +-
.../testThinClientExecuteFunctionPrSHOP.cpp | 6 +-
.../testThinClientGetInterests.cpp | 3 +-
.../testThinClientHAQueryFailover.cpp | 27 +-
.../integration-test/testThinClientHeapLRU.cpp | 6 +-
.../testThinClientIntResPolKeysInv.cpp | 2 +-
.../testThinClientInterest1Cacheless.cpp | 8 +-
.../testThinClientInterest1_Bug1001.cpp | 14 +-
.../testThinClientInterestNotify.cpp | 4 +-
.../testThinClientListenerCallbackArgTest.cpp | 11 +-
.../testThinClientListenerEvents.cpp | 4 +-
.../integration-test/testThinClientLocator.cpp | 8 +-
.../testThinClientMultipleCaches.cpp | 21 +
...nClientNotificationWithDeltaWithoutcache.cpp | 17 +-
.../testThinClientPRSingleHop.cpp | 33 +-
.../testThinClientPRSingleHopServerGroup.cpp | 27 +-
.../testThinClientPdxDeltaWithNotification.cpp | 9 +-
.../integration-test/testThinClientPdxEnum.cpp | 3 +-
.../testThinClientPdxInstance.cpp | 259 +--
.../integration-test/testThinClientPdxTests.cpp | 1234 +++++++------
.../testThinClientPoolAttrTest.cpp | 31 +-
.../testThinClientPoolExecuteFunction.cpp | 16 +-
...ExecuteFunctionDisableChunkHandlerThread.cpp | 4 +-
.../testThinClientPoolExecuteFunctionPrSHOP.cpp | 21 +-
...ClientPoolExecuteFunctionThrowsException.cpp | 4 +-
.../testThinClientPoolExecuteHAFunction.cpp | 7 +-
...estThinClientPoolExecuteHAFunctionPrSHOP.cpp | 7 +-
.../testThinClientPutAllPRSingleHop.cpp | 22 +-
.../testThinClientPutWithDelta.cpp | 10 +-
...nClientRegionQueryDifferentServerConfigs.cpp | 14 +-
.../testThinClientRegionQueryExclusiveness.cpp | 29 +-
.../testThinClientRemoteQueryFailover.cpp | 18 +-
.../testThinClientRemoteQueryFailoverPdx.cpp | 16 +-
.../testThinClientRemoteQueryRS.cpp | 20 +-
.../testThinClientRemoteQuerySS.cpp | 17 +-
.../testThinClientRemoteQueryTimeout.cpp | 16 +-
.../testThinClientRemoteRegionQuery.cpp | 13 +-
.../testThinClientSSLWithSecurityAuthz.cpp | 9 +-
.../testThinClientSecurityAuthorization.cpp | 11 +-
.../testThinClientSecurityAuthorizationMU.cpp | 22 -
.../testThinClientSecurityCQAuthorization.cpp | 27 +-
.../testThinClientSecurityCQAuthorizationMU.cpp | 27 +-
...inClientSecurityDurableCQAuthorizationMU.cpp | 23 +-
.../testThinClientSecurityMultiUserTest.cpp | 1 -
.../testThinClientStatistics.cpp | 50 +-
.../testThinClientTicket317.cpp | 8 +-
src/cppcache/integration-test/testUtils.hpp | 12 +-
.../testXmlCacheCreationWithPools.cpp | 27 +-
src/cppcache/src/AdminRegion.cpp | 13 +-
src/cppcache/src/AttributesFactory.cpp | 13 -
src/cppcache/src/Cache.cpp | 78 +-
src/cppcache/src/CacheFactory.cpp | 458 +----
src/cppcache/src/CacheImpl.cpp | 243 +--
src/cppcache/src/CacheImpl.hpp | 108 +-
src/cppcache/src/CachePerfStats.hpp | 19 +-
src/cppcache/src/CacheRegionHelper.cpp | 48 +
src/cppcache/src/CacheRegionHelper.hpp | 31 +-
.../src/CacheTransactionManagerImpl.cpp | 27 +-
.../src/CacheTransactionManagerImpl.hpp | 9 +-
src/cppcache/src/CacheXmlCreation.cpp | 33 +-
src/cppcache/src/CacheXmlCreation.hpp | 10 +-
src/cppcache/src/CacheXmlParser.cpp | 166 +-
src/cppcache/src/CacheXmlParser.hpp | 9 +-
src/cppcache/src/CacheableEnum.cpp | 10 +-
src/cppcache/src/CacheableObjectPartList.hpp | 11 +
src/cppcache/src/CacheableString.cpp | 4 +-
src/cppcache/src/ClientMetadata.hpp | 1 +
src/cppcache/src/ClientMetadataService.cpp | 45 +-
src/cppcache/src/ClientProxyMembershipID.cpp | 151 +-
src/cppcache/src/ClientProxyMembershipID.hpp | 13 +-
.../src/ClientProxyMembershipIDFactory.cpp | 44 +
.../src/ClientProxyMembershipIDFactory.hpp | 49 +
src/cppcache/src/ConcurrentEntriesMap.cpp | 19 +-
src/cppcache/src/ConcurrentEntriesMap.hpp | 14 +-
src/cppcache/src/CppCacheLibrary.cpp | 8 -
src/cppcache/src/CqEventImpl.cpp | 6 +-
src/cppcache/src/CqQueryImpl.cpp | 42 +-
src/cppcache/src/CqQueryImpl.hpp | 3 +-
src/cppcache/src/CqQueryVsdStats.cpp | 92 +-
src/cppcache/src/CqQueryVsdStats.hpp | 48 +-
src/cppcache/src/CqService.cpp | 24 +-
src/cppcache/src/CqService.hpp | 3 +-
src/cppcache/src/CqServiceVsdStats.cpp | 103 +-
src/cppcache/src/CqServiceVsdStats.hpp | 52 +-
src/cppcache/src/DataInput.cpp | 10 +-
src/cppcache/src/DataInputInternal.hpp | 43 +
src/cppcache/src/DataOutput.cpp | 14 +-
src/cppcache/src/DataOutputInternal.hpp | 44 +
src/cppcache/src/Delta.cpp | 13 +-
src/cppcache/src/DiffieHellman.cpp | 27 +-
src/cppcache/src/DiffieHellman.hpp | 9 +-
src/cppcache/src/DiskVersionTag.hpp | 40 +-
src/cppcache/src/DistributedSystem.cpp | 351 ++--
src/cppcache/src/DistributedSystemImpl.cpp | 32 +-
src/cppcache/src/DistributedSystemImpl.hpp | 2 +-
src/cppcache/src/EntriesMap.hpp | 8 +-
src/cppcache/src/EntriesMapFactory.cpp | 52 +-
src/cppcache/src/EntryExpiryHandler.cpp | 6 +-
src/cppcache/src/ExecutionImpl.cpp | 12 +-
src/cppcache/src/ExpMapEntry.cpp | 24 +-
src/cppcache/src/ExpMapEntry.hpp | 26 +-
src/cppcache/src/FarSideEntryOp.cpp | 9 +-
src/cppcache/src/FarSideEntryOp.hpp | 4 +-
src/cppcache/src/FunctionService.cpp | 33 +-
.../InternalCacheTransactionManager2PCImpl.cpp | 13 +-
src/cppcache/src/LRUAction.cpp | 2 +-
src/cppcache/src/LRUEntriesMap.cpp | 10 +-
src/cppcache/src/LRUEntriesMap.hpp | 9 +-
src/cppcache/src/LRUExpMapEntry.cpp | 24 +-
src/cppcache/src/LRUExpMapEntry.hpp | 27 +-
src/cppcache/src/LRUMapEntry.cpp | 19 +-
src/cppcache/src/LRUMapEntry.hpp | 8 +-
src/cppcache/src/LocalRegion.cpp | 283 +--
src/cppcache/src/LocalRegion.hpp | 8 +-
src/cppcache/src/MapEntry.cpp | 18 +-
src/cppcache/src/MapEntry.hpp | 34 +-
src/cppcache/src/MapEntryT.hpp | 18 +-
src/cppcache/src/MapSegment.cpp | 24 +-
src/cppcache/src/MapSegment.hpp | 24 +-
src/cppcache/src/PdxHelper.cpp | 188 +-
src/cppcache/src/PdxHelper.hpp | 4 +-
src/cppcache/src/PdxInstanceFactoryImpl.cpp | 16 +-
src/cppcache/src/PdxInstanceFactoryImpl.hpp | 11 +-
src/cppcache/src/PdxInstanceImpl.cpp | 421 ++---
src/cppcache/src/PdxInstanceImpl.hpp | 71 +-
src/cppcache/src/PdxLocalReader.cpp | 37 +-
src/cppcache/src/PdxLocalReader.hpp | 9 +-
src/cppcache/src/PdxLocalWriter.cpp | 88 +-
src/cppcache/src/PdxLocalWriter.hpp | 30 +-
src/cppcache/src/PdxReaderWithTypeCollector.cpp | 13 +-
src/cppcache/src/PdxReaderWithTypeCollector.hpp | 5 +-
src/cppcache/src/PdxRemoteReader.hpp | 5 +-
src/cppcache/src/PdxRemoteWriter.cpp | 42 +-
src/cppcache/src/PdxRemoteWriter.hpp | 28 +-
src/cppcache/src/PdxType.cpp | 71 +-
src/cppcache/src/PdxType.hpp | 32 +-
src/cppcache/src/PdxTypeRegistry.cpp | 173 +-
src/cppcache/src/PdxTypeRegistry.hpp | 97 +-
src/cppcache/src/PdxWrapper.cpp | 14 +-
src/cppcache/src/PdxWriterWithTypeCollector.cpp | 9 +-
src/cppcache/src/PdxWriterWithTypeCollector.hpp | 5 +-
src/cppcache/src/Pool.cpp | 26 +-
src/cppcache/src/PoolFactory.cpp | 43 +-
src/cppcache/src/PoolManager.cpp | 116 +-
src/cppcache/src/PoolStatistics.cpp | 229 +--
src/cppcache/src/PoolStatistics.hpp | 120 +-
src/cppcache/src/PoolXmlCreation.cpp | 5 +-
src/cppcache/src/PoolXmlCreation.hpp | 2 +-
src/cppcache/src/PreservedDataExpiryHandler.cpp | 10 +-
src/cppcache/src/PreservedDataExpiryHandler.hpp | 4 +-
src/cppcache/src/ProxyCache.cpp | 35 +-
src/cppcache/src/ProxyCache.hpp | 30 +-
src/cppcache/src/ProxyRegion.hpp | 9 +-
src/cppcache/src/ProxyRemoteQueryService.cpp | 36 +-
src/cppcache/src/Region.cpp | 2 +-
src/cppcache/src/RegionCommit.cpp | 6 +-
src/cppcache/src/RegionCommit.hpp | 5 +-
src/cppcache/src/RegionExpiryHandler.cpp | 9 +-
src/cppcache/src/RegionFactory.cpp | 55 +-
src/cppcache/src/RegionInternal.cpp | 5 +-
src/cppcache/src/RegionInternal.hpp | 40 +-
src/cppcache/src/RegionStats.cpp | 179 +-
src/cppcache/src/RegionStats.hpp | 119 +-
src/cppcache/src/RegionXmlCreation.cpp | 35 +-
src/cppcache/src/RegionXmlCreation.hpp | 6 +-
src/cppcache/src/RemoteQuery.cpp | 27 +-
src/cppcache/src/RemoteQueryService.cpp | 17 +-
src/cppcache/src/RemoteQueryService.hpp | 22 +-
src/cppcache/src/Serializable.cpp | 13 +-
src/cppcache/src/SerializationRegistry.cpp | 577 +++---
src/cppcache/src/SerializationRegistry.hpp | 110 +-
src/cppcache/src/TXCommitMessage.cpp | 6 +-
src/cppcache/src/TXCommitMessage.hpp | 6 +-
src/cppcache/src/TcpConn.cpp | 76 +-
src/cppcache/src/TcpConn.hpp | 15 +-
src/cppcache/src/TcpSslConn.cpp | 36 +-
src/cppcache/src/TcpSslConn.hpp | 30 +-
src/cppcache/src/TcrChunkedContext.hpp | 21 +-
src/cppcache/src/TcrConnection.cpp | 283 ++-
src/cppcache/src/TcrConnection.hpp | 12 +-
src/cppcache/src/TcrConnectionManager.cpp | 34 +-
src/cppcache/src/TcrConnectionManager.hpp | 7 +-
src/cppcache/src/TcrEndpoint.cpp | 157 +-
src/cppcache/src/TcrEndpoint.hpp | 8 +-
src/cppcache/src/TcrMessage.cpp | 688 ++++----
src/cppcache/src/TcrMessage.hpp | 320 +++-
src/cppcache/src/TcrPoolEndPoint.cpp | 16 +-
src/cppcache/src/ThinClientBaseDM.cpp | 18 +-
src/cppcache/src/ThinClientBaseDM.hpp | 5 +-
.../src/ThinClientCacheDistributionManager.hpp | 4 +-
.../src/ThinClientDistributionManager.cpp | 30 +-
src/cppcache/src/ThinClientHARegion.cpp | 25 +-
src/cppcache/src/ThinClientLocatorHelper.cpp | 168 +-
src/cppcache/src/ThinClientPoolDM.cpp | 202 ++-
src/cppcache/src/ThinClientPoolDM.hpp | 71 +-
src/cppcache/src/ThinClientPoolHADM.cpp | 43 +-
src/cppcache/src/ThinClientPoolHADM.hpp | 4 +-
src/cppcache/src/ThinClientPoolRegion.cpp | 5 +-
src/cppcache/src/ThinClientPoolStickyHADM.cpp | 74 -
src/cppcache/src/ThinClientPoolStickyHADM.hpp | 22 +-
.../src/ThinClientRedundancyManager.cpp | 44 +-
src/cppcache/src/ThinClientRegion.cpp | 432 +++--
src/cppcache/src/ThinClientRegion.hpp | 16 +-
src/cppcache/src/ThreadPool.cpp | 10 +-
src/cppcache/src/ThreadPool.hpp | 37 +-
src/cppcache/src/TombstoneExpiryHandler.cpp | 11 +-
src/cppcache/src/TombstoneExpiryHandler.hpp | 8 +-
src/cppcache/src/TombstoneList.cpp | 48 +-
src/cppcache/src/TombstoneList.hpp | 12 +-
src/cppcache/src/TypeRegistry.cpp | 44 +
src/cppcache/src/Utils.cpp | 13 +-
src/cppcache/src/Utils.hpp | 28 +-
src/cppcache/src/VersionStamp.cpp | 2 +-
src/cppcache/src/VersionTag.cpp | 51 +-
src/cppcache/src/VersionTag.hpp | 9 +-
.../src/VersionedCacheableObjectPartList.cpp | 20 +-
.../src/VersionedCacheableObjectPartList.hpp | 35 +-
.../src/statistics/GeodeStatisticsFactory.cpp | 30 -
.../src/statistics/GeodeStatisticsFactory.hpp | 48 +-
src/cppcache/src/statistics/HostStatHelper.cpp | 9 +-
src/cppcache/src/statistics/HostStatHelper.hpp | 17 +-
src/cppcache/src/statistics/HostStatSampler.cpp | 103 +-
src/cppcache/src/statistics/HostStatSampler.hpp | 14 +-
.../src/statistics/LinuxProcessStats.cpp | 8 +-
.../src/statistics/LinuxProcessStats.hpp | 19 +-
.../src/statistics/PoolStatsSampler.cpp | 15 +-
.../src/statistics/PoolStatsSampler.hpp | 15 +-
.../src/statistics/SolarisProcessStats.cpp | 8 +-
.../src/statistics/SolarisProcessStats.hpp | 18 +-
.../src/statistics/StatArchiveWriter.cpp | 34 +-
.../src/statistics/StatArchiveWriter.hpp | 17 +-
.../src/statistics/StatSamplerStats.cpp | 4 +-
.../src/statistics/StatSamplerStats.hpp | 4 +-
.../src/statistics/StatisticDescriptorImpl.hpp | 17 +-
.../src/statistics/StatisticsFactory.cpp | 29 -
.../src/statistics/StatisticsManager.cpp | 41 +-
.../src/statistics/StatisticsManager.hpp | 76 +-
.../src/statistics/WindowsProcessStats.cpp | 11 +-
.../src/statistics/WindowsProcessStats.hpp | 22 +-
src/cppcache/test/CacheXmlParserTest.cpp | 4 +-
.../test/ClientProxyMembershipIDFactoryTest.cpp | 45 +
src/cppcache/test/DataInputTest.cpp | 184 +-
src/cppcache/test/DataOutputTest.cpp | 83 +-
src/cppcache/test/PdxLocalReaderTest.cpp | 40 +-
src/cppcache/test/TcrMessage_unittest.cpp | 212 ++-
src/quickstart/cpp/CqQuery.cpp | 4 +-
src/quickstart/cpp/Delta.cpp | 2 +-
src/quickstart/cpp/DistributedSystem.cpp | 4 +-
src/quickstart/cpp/PdxRemoteQuery.cpp | 4 +-
src/quickstart/cpp/PdxSerializer.cpp | 44 +-
src/quickstart/cpp/PoolCqQuery.cpp | 4 +-
src/quickstart/cpp/PoolRemoteQuery.cpp | 4 +-
src/quickstart/cpp/PoolWithEndpoints.cpp | 2 +-
src/quickstart/cpp/RemoteQuery.cpp | 4 +-
src/quickstart/csharp/CqQuery.cs | 4 +-
src/quickstart/csharp/Delta.cs | 2 +-
src/quickstart/csharp/PoolCqQuery.cs | 4 +-
src/quickstart/csharp/PoolRemoteQuery.cs | 4 +-
src/quickstart/csharp/RemoteQuery.cs | 4 +-
src/sqliteimpl/SqLiteImpl.cpp | 31 +-
src/templates/security/PkcsAuthInit.cpp | 14 +-
src/templates/security/PkcsAuthInit.hpp | 2 +-
src/templates/security/UserPasswordAuthInit.cpp | 4 +-
src/templates/security/UserPasswordAuthInit.hpp | 2 +-
src/tests/cli/FwkUtil/FwkData.cs | 206 +--
src/tests/cli/NewFwkLib/CacheHelper.cs | 20 +-
src/tests/cli/NewFwkLib/CacheServer.cs | 29 +-
src/tests/cli/NewFwkLib/DeltaTest/DeltaTest.cs | 4 +-
src/tests/cli/NewFwkLib/EventTest/EventTests.cs | 32 +-
.../FunctionExecution/FunctionExecution.cs | 4 +-
src/tests/cli/NewFwkLib/FwkTest.cs | 25 +-
src/tests/cli/NewFwkLib/NewFwkLib.csproj.in | 45 +-
src/tests/cli/NewFwkLib/PdxTest/PdxTests.cs | 19 +-
src/tests/cli/NewFwkLib/PerfTest/PerfTests.cs | 10 +-
src/tests/cli/NewFwkLib/QueryTest/QueryTests.cs | 31 +-
.../cli/NewFwkLib/SecurityTest/Security.cs | 2 +-
.../cli/NewFwkLib/SmokePerf/ObjectHelper.cs | 73 -
src/tests/cli/NewFwkLib/SmokePerf/PerfStat.cs | 295 ----
src/tests/cli/NewFwkLib/SmokePerf/SmokePerf.cs | 1580 -----------------
src/tests/cli/NewFwkLib/SmokePerf/SmokeTasks.cs | 829 ---------
src/tests/cli/PkcsWrapper/PkcsAuthInitMN.hpp | 1 +
src/tests/cli/QueryHelper/QueryHelperN.cs | 13 +-
src/tests/cli/QueryHelper/QueryStringsM.cpp | 4 -
src/tests/cpp/fwklib/FrameworkTest.cpp | 10 +-
src/tests/cpp/fwklib/FwkObjects.cpp | 5 +-
src/tests/cpp/fwklib/FwkObjects.hpp | 122 +-
src/tests/cpp/fwklib/PoolHelper.hpp | 14 +-
src/tests/cpp/fwklib/QueryHelper.hpp | 5 +-
src/tests/cpp/security/PkcsAuthInit.cpp | 16 +-
src/tests/cpp/security/PkcsAuthInit.hpp | 2 +-
src/tests/cpp/testobject/ArrayOfByte.hpp | 18 +-
.../cpp/testobject/DeltaFastAssetAccount.cpp | 2 +-
.../cpp/testobject/DeltaFastAssetAccount.hpp | 3 +-
src/tests/cpp/testobject/DeltaPSTObject.cpp | 3 +-
src/tests/cpp/testobject/DeltaPSTObject.hpp | 2 +-
src/tests/cpp/testobject/DeltaTestImpl.cpp | 14 +-
src/tests/cpp/testobject/NonPdxType.hpp | 57 +-
src/tests/cpp/testobject/NoopAuthInit.cpp | 2 +-
src/tests/cpp/testobject/NoopAuthInit.hpp | 2 +-
452 files changed, 9645 insertions(+), 17236 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/CacheHelperN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/CacheHelperN.cs b/src/clicache/integration-test/CacheHelperN.cs
index 8236e78..5824fd7 100644
--- a/src/clicache/integration-test/CacheHelperN.cs
+++ b/src/clicache/integration-test/CacheHelperN.cs
@@ -440,7 +440,7 @@ namespace Apache.Geode.Client.UnitTests
public static void DSConnectAD()
{
- m_dsys = DistributedSystem.Connect("DSName", null);
+ m_dsys = DistributedSystem.Connect("DSName", null, m_cache);
}
private static void SetLogConfig(ref Properties<string, string> config)
@@ -467,7 +467,7 @@ namespace Apache.Geode.Client.UnitTests
private static void DSConnect(string dsName, Properties<string, string> config)
{
SetLogConfig(ref config);
- m_dsys = DistributedSystem.Connect(dsName, config);
+ m_dsys = DistributedSystem.Connect(dsName, config, m_cache);
}
public static void ConnectName(string dsName)
@@ -477,17 +477,7 @@ namespace Apache.Geode.Client.UnitTests
public static void ConnectConfig(string dsName, Properties<string, string> config)
{
- if (DistributedSystem.IsConnected)
- {
- if (m_dsys == null)
- {
- m_dsys = DistributedSystem.GetInstance();
- }
- }
- else
- {
DSConnect(dsName, config);
- }
}
public static void Init()
@@ -625,7 +615,7 @@ namespace Apache.Geode.Client.UnitTests
}
catch (CacheExistsException)
{
- m_cache = CacheFactory.GetAnyInstance();
+ m_cache = CacheFactory.CreateCacheFactory(config).Create();
}
}
@@ -648,7 +638,7 @@ namespace Apache.Geode.Client.UnitTests
public static void Close()
{
- Util.Log("in cache close " + DistributedSystem.IsConnected + " : " + System.Threading.Thread.GetDomainID());
+ Util.Log("in cache close : " + System.Threading.Thread.GetDomainID());
//if (DistributedSystem.IsConnected)
{
CloseCache();
@@ -680,14 +670,7 @@ namespace Apache.Geode.Client.UnitTests
public static void CloseKeepAlive()
{
- if (DistributedSystem.IsConnected)
- {
- CloseCacheKeepAlive();
- if (m_doDisconnect)
- {
- DistributedSystem.Disconnect();
- }
- }
+ CloseCacheKeepAlive();
m_dsys = null;
}
@@ -929,7 +912,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("resolver is null {0}", resolver);
}
- PoolFactory/*<TKey, TVal>*/ poolFactory = PoolManager/*<TKey, TVal>*/.CreateFactory();
+ PoolFactory poolFactory = m_cache.GetPoolFactory();
if (locators != null)
{
@@ -947,7 +930,7 @@ namespace Apache.Geode.Client.UnitTests
}
poolFactory.SetSubscriptionEnabled(clientNotification);
- poolFactory.Create("__TESTPOOL__");
+ poolFactory.Create("__TESTPOOL__", CacheHelper.DCache);
region = regionFactory.SetPoolName("__TESTPOOL__").Create<TradeKey, Object>(name);
Assert.IsNotNull(region, "IRegion<TradeKey, Object> {0} was not created.", name);
@@ -998,11 +981,11 @@ namespace Apache.Geode.Client.UnitTests
{
Init();
- Pool/*<TKey, TValue>*/ existing = PoolManager/*<TKey, TValue>*/.Find(name);
+ Pool/*<TKey, TValue>*/ existing = m_cache.GetPoolManager().Find(name);
if (existing == null)
{
- PoolFactory/*<TKey, TValue>*/ fact = PoolManager/*<TKey, TValue>*/.CreateFactory();
+ PoolFactory/*<TKey, TValue>*/ fact = m_cache.GetPoolFactory();
if (locators != null)
{
string[] list = locators.Split(',');
@@ -1035,7 +1018,7 @@ namespace Apache.Geode.Client.UnitTests
fact.SetMinConnections(numConnections);
fact.SetMaxConnections(numConnections);
}
- Pool/*<TKey, TValue>*/ pool = fact.Create(name);
+ Pool/*<TKey, TValue>*/ pool = fact.Create(name, CacheHelper.DCache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1088,9 +1071,9 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsTrue(region.IsDestroyed, "IRegion<object, object> {0} was not destroyed.", name);
}
- if (PoolManager/*<TKey, TValue>*/.Find(poolName) == null)
+ if (m_cache.GetPoolManager().Find(poolName) == null)
{
- PoolFactory/*<TKey, TValue>*/ fact = PoolManager/*<TKey, TValue>*/.CreateFactory();
+ PoolFactory/*<TKey, TValue>*/ fact = m_cache.GetPoolFactory();
fact.SetSubscriptionEnabled(clientNotification);
if (locators != null)
{
@@ -1105,7 +1088,7 @@ namespace Apache.Geode.Client.UnitTests
{
Util.Log("No locators or servers specified for pool");
}
- Pool/*<TKey, TValue>*/ pool = fact.Create(poolName);
+ Pool/*<TKey, TValue>*/ pool = fact.Create(poolName, CacheHelper.DCache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1165,14 +1148,14 @@ namespace Apache.Geode.Client.UnitTests
region.GetLocalView().DestroyRegion();
Assert.IsTrue(region.IsDestroyed, "IRegion<object, object> {0} was not destroyed.", name);
}
- Pool pl = PoolManager/*<TKey, TValue>*/.Find(poolName);
+ Pool pl = m_cache.GetPoolManager().Find(poolName);
if (pl != null)
{
Util.Log("Pool is not closed " + poolName);
}
if (pl == null)
{
- PoolFactory/*<TKey, TValue>*/ fact = PoolManager/*<TKey, TValue>*/.CreateFactory();
+ PoolFactory/*<TKey, TValue>*/ fact = m_cache.GetPoolFactory();
fact.SetSubscriptionEnabled(clientNotification);
if (locators != null)
{
@@ -1187,7 +1170,7 @@ namespace Apache.Geode.Client.UnitTests
{
Util.Log("No locators or servers specified for pool");
}
- Pool/*<TKey, TValue>*/ pool = fact.Create(poolName);
+ Pool/*<TKey, TValue>*/ pool = fact.Create(poolName, CacheHelper.DCache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1240,9 +1223,9 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsTrue(region.IsDestroyed, "IRegion<object, object> {0} was not destroyed.", name);
}
- if (PoolManager/*<TKey, TValue>*/.Find(poolName) == null)
+ if (m_cache.GetPoolManager().Find(poolName) == null)
{
- PoolFactory/*<TKey, TValue>*/ fact = PoolManager/*<TKey, TValue>*/.CreateFactory();
+ PoolFactory/*<TKey, TValue>*/ fact = m_cache.GetPoolFactory();
fact.SetSubscriptionEnabled(clientNotification);
if (locators != null)
{
@@ -1257,7 +1240,7 @@ namespace Apache.Geode.Client.UnitTests
{
Util.Log("No locators or servers specified for pool");
}
- Pool/*<TKey, TValue>*/ pool = fact.Create(poolName);
+ Pool/*<TKey, TValue>*/ pool = fact.Create(poolName, CacheHelper.DCache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1306,9 +1289,9 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsTrue(region.IsDestroyed, "IRegion<object, object> {0} was not destroyed.", name);
}
- if (PoolManager/*<TKey, TValue>*/.Find(poolName) == null)
+ if (m_cache.GetPoolManager().Find(poolName) == null)
{
- PoolFactory/*<TKey, TValue>*/ fact = PoolManager/*<TKey, TValue>*/.CreateFactory();
+ PoolFactory/*<TKey, TValue>*/ fact = m_cache.GetPoolFactory();
fact.SetSubscriptionEnabled(clientNotification);
if (locators != null)
{
@@ -1323,7 +1306,7 @@ namespace Apache.Geode.Client.UnitTests
{
Util.Log("No locators or servers specified for pool");
}
- Pool/*<TKey, TValue>*/ pool = fact.Create(poolName);
+ Pool/*<TKey, TValue>*/ pool = fact.Create(poolName, CacheHelper.DCache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1374,9 +1357,9 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsTrue(region.IsDestroyed, "IRegion<object, object> {0} was not destroyed.", name);
}
- if (PoolManager/*<TKey, TValue>*/.Find(poolName) == null)
+ if (m_cache.GetPoolManager().Find(poolName) == null)
{
- PoolFactory/*<TKey, TValue>*/ fact = PoolManager/*<TKey, TValue>*/.CreateFactory();
+ PoolFactory/*<TKey, TValue>*/ fact = m_cache.GetPoolFactory();
fact.SetSubscriptionEnabled(clientNotification);
if (serverGroup != null)
{
@@ -1395,7 +1378,7 @@ namespace Apache.Geode.Client.UnitTests
{
Util.Log("No locators or servers specified for pool");
}
- Pool/*<TKey, TValue>*/ pool = fact.Create(poolName);
+ Pool/*<TKey, TValue>*/ pool = fact.Create(poolName, CacheHelper.DCache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1448,9 +1431,9 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsTrue(region.IsDestroyed, "IRegion<object, object> {0} was not destroyed.", name);
}
- if (PoolManager.Find(poolName) == null)
+ if (m_cache.GetPoolManager().Find(poolName) == null)
{
- PoolFactory fact = PoolManager.CreateFactory();
+ PoolFactory fact = m_cache.GetPoolFactory();
fact.SetSubscriptionEnabled(clientNotification);
if (locators != null)
{
@@ -1465,7 +1448,7 @@ namespace Apache.Geode.Client.UnitTests
{
Util.Log("No locators or servers specified for pool");
}
- Pool pool = fact.Create(poolName);
+ Pool pool = fact.Create(poolName, m_cache);
if (pool == null)
{
Util.Log("Pool creation failed");
@@ -1598,19 +1581,6 @@ namespace Apache.Geode.Client.UnitTests
return null;
}
- public static IRegion<TKey, TValue> GetRegionAD<TKey, TValue>(string path)
- {
- if (m_cache != null)
- {
- return m_cache.GetRegion<TKey, TValue>(path);
- }
- else if (DistributedSystem.IsConnected)
- {
- return CacheFactory.GetAnyInstance().GetRegion<TKey, TValue>(path);
- }
- return null;
- }
-
public static Properties<string, object> GetPkcsCredentialsForMU(Properties<string, string> credentials)
{
if (credentials == null)
@@ -1632,7 +1602,7 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsNotNull(region, "IRegion<object, object> [" + path + "] not found.");
Assert.IsNotNull(region.Attributes.PoolName, "IRegion<object, object> is created without pool.");
- Pool/*<TKey, TValue>*/ pool = PoolManager/*<TKey, TValue>*/.Find(region.Attributes.PoolName);
+ Pool/*<TKey, TValue>*/ pool = m_cache.GetPoolManager().Find(region.Attributes.PoolName);
Assert.IsNotNull(pool, "Pool is null in GetVerifyRegion.");
@@ -1651,7 +1621,7 @@ namespace Apache.Geode.Client.UnitTests
{
if (m_cacheForMultiUser == null)
{
- Pool/*<TKey, TValue>*/ pool = PoolManager/*<TKey, TValue>*/.Find("__TESTPOOL1_");
+ Pool/*<TKey, TValue>*/ pool = m_cache.GetPoolManager().Find("__TESTPOOL1_");
Assert.IsNotNull(pool, "Pool is null in getMultiuserCache.");
Assert.IsTrue(!pool.Destroyed);
@@ -1674,15 +1644,6 @@ namespace Apache.Geode.Client.UnitTests
return region;
}
- public static IRegion<TKey, TValue> GetVerifyRegionAD<TKey, TValue>(string path)
- {
- IRegion<TKey, TValue> region = GetRegionAD<TKey, TValue>(path);
-
- Assert.IsNotNull(region, "IRegion<object, object> [" + path + "] not found.");
- Util.Log("Found region '{0}'", path);
- return region;
- }
-
public static IRegion<TKey, TValue> GetVerifyRegion<TKey, TValue>(string path, Properties<string, string> credentials)
{
Util.Log("GetVerifyRegion " + m_cacheForMultiUser);
@@ -1692,7 +1653,7 @@ namespace Apache.Geode.Client.UnitTests
Assert.IsNotNull(region, "IRegion<object, object> [" + path + "] not found.");
Assert.IsNotNull(region.Attributes.PoolName, "IRegion<object, object> is created without pool.");
- Pool/*<TKey, TValue>*/ pool = PoolManager/*<TKey, TValue>*/.Find(region.Attributes.PoolName);
+ Pool/*<TKey, TValue>*/ pool = m_cache.GetPoolManager().Find(region.Attributes.PoolName);
Assert.IsNotNull(pool, "Pool is null in GetVerifyRegion.");
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/DataOutputTests.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/DataOutputTests.cs b/src/clicache/integration-test/DataOutputTests.cs
index a247b10..5c253ee 100755
--- a/src/clicache/integration-test/DataOutputTests.cs
+++ b/src/clicache/integration-test/DataOutputTests.cs
@@ -24,7 +24,7 @@ namespace Apache.Geode.Client.UnitTests
using NUnit.Framework;
using Apache.Geode.DUnitFramework;
using Apache.Geode.Client;
-
+
[TestFixture]
[Category("unicast_only")]
public class DataOutputTests : UnitTests
@@ -39,8 +39,10 @@ namespace Apache.Geode.Client.UnitTests
[Test]
public void StringExcedesBufferCapacity()
{
-
- DataOutput dataOutput = new DataOutput();
+
+ CacheHelper.InitConfig((String) null);
+
+ DataOutput dataOutput = CacheHelper.DCache.CreateDataOutput();
// Chcek that native buffer is unused and get initial capacity.
Assert.AreEqual(0, dataOutput.BufferLength);
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/DistributedSystemTests.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/DistributedSystemTests.cs b/src/clicache/integration-test/DistributedSystemTests.cs
index 441f057..157eee2 100644
--- a/src/clicache/integration-test/DistributedSystemTests.cs
+++ b/src/clicache/integration-test/DistributedSystemTests.cs
@@ -36,7 +36,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- DistributedSystem.Disconnect();
+ DistributedSystem.Disconnect(CacheHelper.getCache());
Assert.Fail("NotConnectedException should have occurred when "
+ "disconnecting without having connected.");
}
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/PutGetTestsN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/PutGetTestsN.cs b/src/clicache/integration-test/PutGetTestsN.cs
index d38e045..2147821 100644
--- a/src/clicache/integration-test/PutGetTestsN.cs
+++ b/src/clicache/integration-test/PutGetTestsN.cs
@@ -153,7 +153,7 @@ namespace Apache.Geode.Client.UnitTests
public void SetRegion(string regionName)
{
- m_region = CacheHelper.GetVerifyRegionAD<object, object>(regionName);
+ m_region = CacheHelper.GetVerifyRegion<object, object>(regionName);
}
public void DoPuts()
@@ -208,443 +208,12 @@ namespace Apache.Geode.Client.UnitTests
public void DoPRSHPartitionResolverPuts(string rname)
{
- IRegion<object, object> region = CacheHelper.GetRegion<object, object>(rname);
- int metadatarefreshCount = 0;
- int metadatarefreshCount1 = 0;
- Assert.IsNotNull(region, "DoPRSHPartitionResolverPuts: null region.");
- if (rname.CompareTo("DistRegionNoAck") == 0)
- {
- Util.Log("Inside DoPRSHPartitionResolverPuts region name is {0} ", region.Name.ToString());
- for (int i = 0; i < 1000; i++)
- {
- try
- {
- int key = i;
- int val = key.GetHashCode();
- region[key] = val;
- Util.Log("Put inside DoPRSHPartitionResolverPuts successfull {0} {1}", key, val);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
- StatisticsFactory factory = StatisticsFactory.GetExistingInstance();
- StatisticsType type = factory.FindType("RegionStatistics");
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount = rStats.GetInt((string)"metaDataRefreshCount");
- }
- }
- //Assert.AreEqual(1, nonSingleHopCount, "nonSingleHopCount should be equal to 1");
- //Assert.AreEqual(1, metadatarefreshCount, "metadatarefreshCount should be equal to 1");
-
- Util.Log("DoPRSHPartitionResolverPuts WarmUp Task completed.");
-
- for (int i = 1000; i < 2000; i++)
- {
- try
- {
- //CacheableInt32 key = new CacheableInt32(i);
- int key = i;
- int val = key.GetHashCode();
- region[key] = val;
- Util.Log("Put inside DoPRSHPartitionResolverPuts successfull {0} {1}", key, val);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
-
- try
- {
- //CacheableInt32 key = new CacheableInt32(i);
- int key = i;
- Object val = region[key];
- Util.Log("Get inside DoPRSHPartitionResolverPuts successfull {0}", key);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
-
- try
- {
- //CacheableInt32 key = new CacheableInt32(i);
- int key = i;
- region.Remove(key); //Destroy() replaced by Remove
- Util.Log("Destroy inside DoPRSHPartitionResolverPuts successfull {0}", key);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Destroy caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Destroy caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Destroy caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount1 = rStats.GetInt((string)"metaDataRefreshCount");
- Assert.AreEqual(metadatarefreshCount1, metadatarefreshCount, "metadatarefreshCount1 should be equal to metadatarefreshCount");
- }
- }
- }
- metadatarefreshCount = 0;
- if (rname.CompareTo("DistRegionAck") == 0)
- {
- Util.Log("Inside DoPRSHPartitionResolverPuts region name is {0} ", region.Name.ToString());
- for (int i = 0; i < 1000; i++)
- {
- try
- {
- int key = i;
- int val = key.GetHashCode();
- region[key] = val;
- Util.Log("Put inside DoPRSHPartitionResolverPuts successfull {0} {1}", key, val);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
- StatisticsFactory factory = StatisticsFactory.GetExistingInstance();
- StatisticsType type = factory.FindType("RegionStatistics");
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount = rStats.GetInt((string)"metaDataRefreshCount");
- }
- }
- //Assert.AreEqual(1, metadatarefreshCount, "metadatarefreshCount should be equal to 1");
-
- Util.Log("DoPRSHPartitionResolverPuts WarmUp Task completed.");
-
- Util.Log("Inside DoPRSHPartitionResolverPuts region name is {0} ", region.Name.ToString());
- for (int i = 1000; i < 2000; i++)
- {
- try
- {
- //CacheableInt32 key = new CacheableInt32(i);
- int key = i;
- int val = key.GetHashCode();
- region[key] = val;
- Util.Log("Put inside DoPRSHPartitionResolverPuts successfull {0} {1}", key, val);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- try
- {
- //CacheableInt32 key = new CacheableInt32(i);
- int key = i;
- Object val = region[key];
- Util.Log("Get inside DoPRSHPartitionResolverPuts successfull {0}", key);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- try
- {
- //CacheableInt32 key = new CacheableInt32(i);
- int key = i;
- region.Remove(key); //Destroy() -> Remove()
- Util.Log("Destroy inside DoPRSHPartitionResolverPuts successfull {0}", key);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
-
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount1 = rStats.GetInt((string)"metaDataRefreshCount");
- Assert.AreEqual(metadatarefreshCount1, metadatarefreshCount, "metadatarefreshCount1 should be equal to metadatarefreshCount");
- }
- }
- }
}
public void DoPRSHTradeResolverTasks(string rname)
{
- Util.Log("DoPRSHTradeResolverTasks rname = {0} ", rname);
- IRegion<TradeKey, Object> region = CacheHelper.GetRegion<TradeKey, Object>(rname);
- int metadatarefreshCount = 0;
- int metadatarefreshCount1 = 0;
- Assert.IsNotNull(region, "DoPRSHTradeResolverTasks: null region.");
- for (int i = 0; i < 1000; i++)
- {
- try
- {
- region[new TradeKey(i)] = "Value" + i;
- Util.Log("Put inside DoPRSHTradeResolverTasks successfull ");
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
- StatisticsFactory factory = StatisticsFactory.GetExistingInstance();
- StatisticsType type = factory.FindType("RegionStatistics");
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount = rStats.GetInt((string)"metaDataRefreshCount");
- }
- }
- Util.Log("metadatarefreshCount = {0} ", metadatarefreshCount);
- Assert.GreaterOrEqual(metadatarefreshCount, 1, "metadatarefreshCount should be equal to 1");
-
- Util.Log("DoPRSHTradeResolverTasks WarmUp Task completed.");
-
- for (int i = 1000; i < 2000; i++)
- {
- try
- {
- region[new TradeKey(i)] = "Value" + i;
- Util.Log("Put inside DoPRSHTradeResolverTasks successfull");
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
-
- try
- {
- Object val = region[new TradeKey(i)];
- Util.Log("Get inside DoPRSHTradeResolverTasks successfull ");
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- try
- {
- region.Remove(new TradeKey(i)); //Destroy() replaced by Remove
- Util.Log("Destroy inside DoPRSHTradeResolverTasks successfull ");
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Destroy caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Destroy caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Destroy caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount1 = rStats.GetInt((string)"metaDataRefreshCount");
- Util.Log("metadatarefreshCount1 = {0} ", metadatarefreshCount1);
- Assert.AreEqual(metadatarefreshCount1, metadatarefreshCount, "metadatarefreshCount1 should be equal to metadatarefreshCount");
- }
- }
-
- Util.Log("Executing onRegion FE with custom key and custom partitionResolver");
- Apache.Geode.Client.Execution<object> exc = Client.FunctionService<object>.OnRegion<TradeKey, object>(region);
- Assert.IsTrue(exc != null, "onRegion Returned NULL");
-
- TradeKey[] filter = new TradeKey[901];
- int j = 0;
- for (int i = 100; i < 1001; i++)
- {
- filter[j] = new TradeKey(i);
- j++;
- }
- Util.Log("filter count= {0}.", filter.Length);
-
- Client.IResultCollector<object> rc = exc.WithFilter<TradeKey>(filter).Execute(FEOnRegionPrSHOP_OptimizeForWrite, 15);
- Util.Log("FEOnRegionPrSHOP_OptimizeForWrite executed");
- ICollection<object> executeFunctionResult = rc.GetResult();
- Util.Log("OnRegionPrSHOP for filter executeFunctionResult.Count = {0} ", executeFunctionResult.Count);
- Assert.AreEqual(3, executeFunctionResult.Count, "executeFunctionResult count check failed");
- foreach (Boolean item in executeFunctionResult)
- {
- Util.Log("on region:FEOnRegionPrSHOP:= {0}.", item);
- Assert.AreEqual(true, item, "FEOnRegionPrSHOP item not true");
- }
- Util.Log("FEOnRegionPrSHOP_OptimizeForWrite done");
-
- rc = exc.WithFilter<TradeKey>(filter).Execute(FEOnRegionPrSHOP, 15);
- Util.Log("FEOnRegionPrSHOP executed");
- executeFunctionResult = rc.GetResult();
- Util.Log("OnRegionPrSHOP for filter executeFunctionResult.Count = {0} ", executeFunctionResult.Count);
- Assert.AreEqual(3, executeFunctionResult.Count, "executeFunctionResult count check failed");
- foreach (Boolean item in executeFunctionResult)
- {
- Util.Log("on region:FEOnRegionPrSHOP:= {0}.", item);
- Assert.AreEqual(true, item, "FEOnRegionPrSHOP item not true");
- }
- Util.Log("FEOnRegionPrSHOP done");
-
- object args = true;
-
- rc = exc.WithFilter<TradeKey>(filter).Execute(getFuncName);
- executeFunctionResult = rc.GetResult();
-
- Util.Log("ExecuteFunctionOnRegion for filter executeFunctionResult.Count = {0} ", executeFunctionResult.Count);
-
- List<object> resultList = new List<object>();
- foreach (List<object> item in executeFunctionResult)
- {
- foreach (object item2 in item)
- {
- resultList.Add(item2);
- }
- }
-
- Util.Log("on region: result count= {0}.", resultList.Count);
- Assert.AreEqual(1802, resultList.Count, "result count check failed");
- for (int i = 0; i < resultList.Count; i++)
- {
- Util.Log("on region:get:= {0}.", resultList[i]);
- }
}
public void DoPRSHFixedPartitionResolverTests(string rname)
@@ -680,77 +249,7 @@ namespace Apache.Geode.Client.UnitTests
Assert.Fail("Got Exception (0} {1} {2} ", ex.Message, ex.StackTrace, ex.Source);
}
}
- StatisticsFactory factory = StatisticsFactory.GetExistingInstance();
- StatisticsType type = factory.FindType("RegionStatistics");
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount = rStats.GetInt((string)"metaDataRefreshCount");
- }
- }
- Util.Log("DoPRSHFixedPartitionResolverTests Put Task completed metadatarefreshCount = {0}.", metadatarefreshCount);
- Assert.Greater(metadatarefreshCount, 1, "metadatarefreshCount should be Greater than 1");
-
- for (int i = 0; i < 1000; i++)
- {
- try
- {
- int key = i;
- Object val = region[key];
- Util.Log("Get inside DoPRSHFixedPartitionResolverTests successfull {0}", key);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Get caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- try
- {
- int key = i;
- region.Remove(key); //Destroy() -> Remove()
- Util.Log("Remove inside DoPRSHFixedPartitionResolverTests successfull {0}", key);
- }
- catch (CacheServerException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheServerException (0}", ex.Message);
- }
- catch (CacheWriterException ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got CacheWriterException (0}", ex.Message);
- }
- catch (Exception ex)
- {
- Util.Log("CPPTEST: Put caused networkhop");
- Assert.Fail("Got Exception (0}", ex.Message);
- }
- }
- if (type != null)
- {
- Statistics rStats = factory.FindFirstStatisticsByType(type);
- if (rStats != null)
- {
- metadatarefreshCount1 = rStats.GetInt((string)"metaDataRefreshCount");
- }
- }
- Util.Log("DoPRSHFixedPartitionResolverTests All Task completed ");
- Util.Log("metadatarefreshCount = {0} .", metadatarefreshCount);
- Util.Log("metadatarefreshCount1 = {0} .", metadatarefreshCount1);
- Assert.AreEqual(metadatarefreshCount, metadatarefreshCount1, "metadatarefreshCount should be equal to {0}", metadatarefreshCount);
}
public void DoPRSHFixedPartitionResolverTasks(ClientBase client1, string regionName)
@@ -820,7 +319,7 @@ namespace Apache.Geode.Client.UnitTests
else
{
QueryService<object, object> qs = null;
- qs = PoolManager/*<object, object>*/.Find(m_region.Attributes.PoolName).GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find(m_region.Attributes.PoolName).GetQueryService<object, object>();
Query<object> qry = qs.NewQuery("SELECT * FROM " + m_region.FullPath);
ISelectResults<object> results = qry.Execute();
// not really interested in results but loop through them neverthless
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/SerializationTestsN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/SerializationTestsN.cs b/src/clicache/integration-test/SerializationTestsN.cs
index 8a3648e..9fb63f6 100644
--- a/src/clicache/integration-test/SerializationTestsN.cs
+++ b/src/clicache/integration-test/SerializationTestsN.cs
@@ -92,19 +92,19 @@ namespace Apache.Geode.Client.UnitTests
{
CacheHelper.CreateTCRegion2<object, object>(RegionNames[0], true, false,
null, locators, false);
- Serializable.RegisterTypeGeneric(OtherType.CreateDeserializable);
- Serializable.RegisterTypeGeneric(OtherType2.CreateDeserializable);
- Serializable.RegisterTypeGeneric(OtherType22.CreateDeserializable);
- Serializable.RegisterTypeGeneric(OtherType4.CreateDeserializable);
- Serializable.RegisterTypeGeneric(OtherType42.CreateDeserializable);
- Serializable.RegisterTypeGeneric(OtherType43.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(OtherType.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(OtherType2.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(OtherType22.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(OtherType4.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(OtherType42.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(OtherType43.CreateDeserializable, CacheHelper.DCache);
}
public void DoNPuts(int n)
{
try
{
- Serializable.RegisterTypeGeneric(OtherType.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(OtherType.CreateDeserializable, CacheHelper.DCache);
Assert.Fail("Expected exception in registering the type again.");
}
catch (IllegalStateException ex)
@@ -126,7 +126,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(OtherType.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(OtherType.CreateDeserializable, CacheHelper.DCache);
Assert.Fail("Expected exception in registering the type again.");
}
catch (IllegalStateException ex)
@@ -429,10 +429,11 @@ namespace Apache.Geode.Client.UnitTests
public static IGeodeSerializable Duplicate(IGeodeSerializable orig)
{
- DataOutput dout = new DataOutput();
+ DataOutput dout = CacheHelper.DCache.CreateDataOutput();
orig.ToData(dout);
- DataInput din = new DataInput(dout.GetBuffer());
+ //DataInput din = new DataInput(dout.GetBuffer());
+ DataInput din = CacheHelper.DCache.CreateDataInput(dout.GetBuffer());
IGeodeSerializable dup = (IGeodeSerializable)din.ReadObject();
return dup;
}
@@ -577,10 +578,10 @@ namespace Apache.Geode.Client.UnitTests
public static IGeodeSerializable Duplicate(IGeodeSerializable orig)
{
- DataOutput dout = new DataOutput();
+ DataOutput dout = CacheHelper.DCache.CreateDataOutput();
orig.ToData(dout);
- DataInput din = new DataInput(dout.GetBuffer());
+ DataInput din = CacheHelper.DCache.CreateDataInput(dout.GetBuffer());
IGeodeSerializable dup = (IGeodeSerializable)din.ReadObject();
return dup;
}
@@ -726,10 +727,10 @@ namespace Apache.Geode.Client.UnitTests
public static IGeodeSerializable Duplicate(IGeodeSerializable orig)
{
- DataOutput dout = new DataOutput();
+ DataOutput dout = CacheHelper.DCache.CreateDataOutput();
orig.ToData(dout);
- DataInput din = new DataInput(dout.GetBuffer());
+ DataInput din = CacheHelper.DCache.CreateDataInput(dout.GetBuffer());
IGeodeSerializable dup = (IGeodeSerializable)din.ReadObject();
return dup;
}
@@ -874,10 +875,10 @@ namespace Apache.Geode.Client.UnitTests
public static IGeodeSerializable Duplicate(IGeodeSerializable orig)
{
- DataOutput dout = new DataOutput();
+ DataOutput dout = CacheHelper.DCache.CreateDataOutput();
orig.ToData(dout);
- DataInput din = new DataInput(dout.GetBuffer());
+ DataInput din = CacheHelper.DCache.CreateDataInput(dout.GetBuffer());
IGeodeSerializable dup = (IGeodeSerializable)din.ReadObject();
return dup;
}
@@ -1023,10 +1024,10 @@ namespace Apache.Geode.Client.UnitTests
public static IGeodeSerializable Duplicate(IGeodeSerializable orig)
{
- DataOutput dout = new DataOutput();
+ DataOutput dout = CacheHelper.DCache.CreateDataOutput();
orig.ToData(dout);
- DataInput din = new DataInput(dout.GetBuffer());
+ DataInput din = CacheHelper.DCache.CreateDataInput(dout.GetBuffer());
IGeodeSerializable dup = (IGeodeSerializable)din.ReadObject();
return dup;
}
@@ -1172,10 +1173,10 @@ namespace Apache.Geode.Client.UnitTests
public static IGeodeSerializable Duplicate(IGeodeSerializable orig)
{
- DataOutput dout = new DataOutput();
+ DataOutput dout = CacheHelper.DCache.CreateDataOutput();
orig.ToData(dout);
- DataInput din = new DataInput(dout.GetBuffer());
+ DataInput din = CacheHelper.DCache.CreateDataInput(dout.GetBuffer());
IGeodeSerializable dup = (IGeodeSerializable)din.ReadObject();
return dup;
}
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/ThinClientAppDomainFunctionExecutionTests.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/ThinClientAppDomainFunctionExecutionTests.cs b/src/clicache/integration-test/ThinClientAppDomainFunctionExecutionTests.cs
index c238118..0d9129c 100644
--- a/src/clicache/integration-test/ThinClientAppDomainFunctionExecutionTests.cs
+++ b/src/clicache/integration-test/ThinClientAppDomainFunctionExecutionTests.cs
@@ -181,7 +181,7 @@ namespace Apache.Geode.Client.UnitTests
Boolean getResult = true;
//test data independant function execution with result onServer
- Pool/*<TKey, TValue>*/ pool = PoolManager/*<TKey, TValue>*/.Find(poolName);
+ Pool/*<TKey, TValue>*/ pool = CacheHelper.DCache.GetPoolManager().Find(poolName);
Apache.Geode.Client.Execution<object> exc = FunctionService<object>.OnServer(pool);
Assert.IsTrue(exc != null, "onServer Returned NULL");
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/ThinClientAppDomainQueryTests.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/ThinClientAppDomainQueryTests.cs b/src/clicache/integration-test/ThinClientAppDomainQueryTests.cs
index 63ba85a..90aabf7 100644
--- a/src/clicache/integration-test/ThinClientAppDomainQueryTests.cs
+++ b/src/clicache/integration-test/ThinClientAppDomainQueryTests.cs
@@ -72,8 +72,8 @@ namespace Apache.Geode.Client.UnitTests
public void InitClient()
{
- Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
- Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
Serializable.RegisterPdxType(Apache.Geode.Client.Tests.PortfolioPdx.CreateDeserializable);
Serializable.RegisterPdxType(Apache.Geode.Client.Tests.PositionPdx.CreateDeserializable);
}
@@ -102,7 +102,7 @@ namespace Apache.Geode.Client.UnitTests
IRegion<object, object> region2 = CacheHelper.GetRegion<object, object>(QueryRegionNames[2]);
IRegion<object, object> region3 = CacheHelper.GetRegion<object, object>(QueryRegionNames[3]);
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
qh.PortfolioNumSets);
@@ -122,9 +122,9 @@ namespace Apache.Geode.Client.UnitTests
{
bool ErrorOccurred = false;
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
int qryIdx = 0;
@@ -202,9 +202,9 @@ namespace Apache.Geode.Client.UnitTests
{
bool ErrorOccurred = false;
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
int qryIdx = 0;
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/ThinClientCallbackArgN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/ThinClientCallbackArgN.cs b/src/clicache/integration-test/ThinClientCallbackArgN.cs
index e62d2a0..8d8ff5b 100644
--- a/src/clicache/integration-test/ThinClientCallbackArgN.cs
+++ b/src/clicache/integration-test/ThinClientCallbackArgN.cs
@@ -342,8 +342,8 @@ namespace Apache.Geode.Client.UnitTests
m_isSet = true;
m_callbackarg = new Portfolio(1, 1);
//TODO:;split
- Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
- Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
}
}
@@ -455,7 +455,7 @@ namespace Apache.Geode.Client.UnitTests
{
if (!isRegistered)
{
- Serializable.RegisterTypeGeneric(DefaultType.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(DefaultType.CreateDeserializable, CacheHelper.DCache);
isRegistered = true;
}
}
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/ThinClientCqIRTestsN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/ThinClientCqIRTestsN.cs b/src/clicache/integration-test/ThinClientCqIRTestsN.cs
index 6df4e7a..ea90850 100644
--- a/src/clicache/integration-test/ThinClientCqIRTestsN.cs
+++ b/src/clicache/integration-test/ThinClientCqIRTestsN.cs
@@ -73,8 +73,8 @@ namespace Apache.Geode.Client.UnitTests
CacheHelper.Init();
try
{
- Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
- Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -105,7 +105,7 @@ namespace Apache.Geode.Client.UnitTests
IRegion<object, object> region2 = CacheHelper.GetRegion<object, object>(QueryRegionNames[2]);
IRegion<object, object> region3 = CacheHelper.GetRegion<object, object>(QueryRegionNames[3]);
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
qh.PortfolioNumSets);
@@ -126,7 +126,7 @@ namespace Apache.Geode.Client.UnitTests
IRegion<object, object> region0 = CacheHelper.GetRegion<object, object>(QueryRegionNames[0]);
IRegion<object, object> subRegion0 = region0.GetSubRegion(QueryRegionNames[1]);
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
qh.PopulatePortfolioData(region0, 100, 20, 100);
qh.PopulatePositionData(subRegion0, 100, 20);
@@ -149,7 +149,7 @@ namespace Apache.Geode.Client.UnitTests
region["4"] = p4;
QueryService<object, object> qs = null;
- qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
cqFac.AddCqListener(cqLstner);
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/ThinClientCqTestsN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/ThinClientCqTestsN.cs b/src/clicache/integration-test/ThinClientCqTestsN.cs
index 6b5cf6e..2dd8118 100644
--- a/src/clicache/integration-test/ThinClientCqTestsN.cs
+++ b/src/clicache/integration-test/ThinClientCqTestsN.cs
@@ -298,8 +298,8 @@ namespace Apache.Geode.Client.UnitTests
CacheHelper.Init();
try
{
- Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable);
- Serializable.RegisterTypeGeneric(Position.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, CacheHelper.DCache);
+ Serializable.RegisterTypeGeneric(Position.CreateDeserializable, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -331,7 +331,7 @@ namespace Apache.Geode.Client.UnitTests
IRegion<object, object> region2 = CacheHelper.GetRegion<object, object>(QueryRegionNames[2]);
IRegion<object, object> region3 = CacheHelper.GetRegion<object, object>(QueryRegionNames[3]);
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
Util.Log("Object type is pdx = " + m_usePdxObjects);
Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
@@ -372,7 +372,7 @@ namespace Apache.Geode.Client.UnitTests
IRegion<object, object> region0 = CacheHelper.GetRegion<object, object>(QueryRegionNames[0]);
IRegion<object, object> subRegion0 = region0.GetSubRegion(QueryRegionNames[1]);
- QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper();
+ QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
qh.PopulatePortfolioData(region0, 100, 20, 100);
qh.PopulatePositionData(subRegion0, 100, 20);
@@ -395,7 +395,7 @@ namespace Apache.Geode.Client.UnitTests
QueryService<object, object> qs = null;
- qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
cqFac.AddCqListener(cqLstner);
@@ -456,7 +456,7 @@ namespace Apache.Geode.Client.UnitTests
QueryService<object, object> qs = null;
- qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
cqFac.AddCqListener(cqLstner);
@@ -618,7 +618,7 @@ namespace Apache.Geode.Client.UnitTests
QueryService<object, object> qs = null;
- qs = PoolManager.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
@@ -733,7 +733,7 @@ namespace Apache.Geode.Client.UnitTests
public void CreateAndExecuteCQ_StatusListener(string poolName, string cqName, string cqQuery, int id)
{
QueryService<object, object> qs = null;
- qs = PoolManager.Find(poolName).GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
cqFac.AddCqListener(new MyCqStatusListener<object, object>(id));
CqAttributes<object, object> cqAttr = cqFac.Create();
@@ -745,7 +745,7 @@ namespace Apache.Geode.Client.UnitTests
public void CreateAndExecuteCQ_Listener(string poolName, string cqName, string cqQuery, int id)
{
QueryService<object, object> qs = null;
- qs = PoolManager.Find(poolName).GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
cqFac.AddCqListener(new MyCqListener<object, object>(/*id*/));
CqAttributes<object, object> cqAttr = cqFac.Create();
@@ -757,7 +757,7 @@ namespace Apache.Geode.Client.UnitTests
public void CheckCQStatusOnConnect(string poolName, string cqName, int onCqStatusConnect)
{
QueryService<object, object> qs = null;
- qs = PoolManager.Find(poolName).GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
CqQuery<object, object> query = qs.GetCq(cqName);
CqAttributes<object, object> cqAttr = query.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
@@ -769,7 +769,7 @@ namespace Apache.Geode.Client.UnitTests
public void CheckCQStatusOnDisConnect(string poolName, string cqName, int onCqStatusDisConnect)
{
QueryService<object, object> qs = null;
- qs = PoolManager.Find(poolName).GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
CqQuery<object, object> query = qs.GetCq(cqName);
CqAttributes<object, object> cqAttr = query.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
@@ -790,7 +790,7 @@ namespace Apache.Geode.Client.UnitTests
public void CheckCQStatusOnPutEvent(string poolName, string cqName, int onCreateCount)
{
QueryService<object, object> qs = null;
- qs = PoolManager.Find(poolName).GetQueryService<object, object>();
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
CqQuery<object, object> query = qs.GetCq(cqName);
CqAttributes<object, object> cqAttr = query.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/clicache/integration-test/ThinClientDeltaTestN.cs
----------------------------------------------------------------------
diff --git a/src/clicache/integration-test/ThinClientDeltaTestN.cs b/src/clicache/integration-test/ThinClientDeltaTestN.cs
index c4530f6..a7ee6b3 100644
--- a/src/clicache/integration-test/ThinClientDeltaTestN.cs
+++ b/src/clicache/integration-test/ThinClientDeltaTestN.cs
@@ -43,7 +43,7 @@ namespace Apache.Geode.Client.UnitTests
{
byte[] deltaValue = aCqEvent.getDeltaValue();
DeltaTestImpl newValue = new DeltaTestImpl();
- DataInput input = new DataInput(deltaValue);
+ DataInput input = CacheHelper.DCache.CreateDataInput(deltaValue);
newValue.FromDelta(input);
if (newValue.GetIntVar() == 5)
{
@@ -281,7 +281,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaEx.create);
+ Serializable.RegisterTypeGeneric(DeltaEx.create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -316,7 +316,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaEx.create);
+ Serializable.RegisterTypeGeneric(DeltaEx.create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -364,7 +364,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaEx.create);
+ Serializable.RegisterTypeGeneric(DeltaEx.create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -408,7 +408,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaEx.create);
+ Serializable.RegisterTypeGeneric(DeltaEx.create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -441,7 +441,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaEx.create);
+ Serializable.RegisterTypeGeneric(DeltaEx.create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -474,7 +474,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaTestAD.Create);
+ Serializable.RegisterTypeGeneric(DeltaTestAD.Create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -598,7 +598,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaEx.create);
+ Serializable.RegisterTypeGeneric(DeltaEx.create, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -615,7 +615,7 @@ namespace Apache.Geode.Client.UnitTests
{
try
{
- Serializable.RegisterTypeGeneric(DeltaTestImpl.CreateDeserializable);
+ Serializable.RegisterTypeGeneric(DeltaTestImpl.CreateDeserializable, CacheHelper.DCache);
}
catch (IllegalStateException)
{
@@ -637,7 +637,7 @@ namespace Apache.Geode.Client.UnitTests
void registerCq()
{
- Pool thePool = PoolManager.Find("__TEST_POOL1__");
+ Pool thePool = CacheHelper.DCache.GetPoolManager().Find("__TEST_POOL1__");
QueryService<object, DeltaTestImpl> cqService = null;
cqService = thePool.GetQueryService<object, DeltaTestImpl>();
CqAttributesFactory<object, DeltaTestImpl> attrFac = new CqAttributesFactory<object, DeltaTestImpl>();