You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2018/09/10 17:09:54 UTC
[geode-native] branch develop updated: GEODE-5691: Fix using
namespace violations (#346)
This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new 1915b9e GEODE-5691: Fix using namespace violations (#346)
1915b9e is described below
commit 1915b9ef13d7c87b34a3c0b528ff6ebb89d845ee
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Mon Sep 10 10:09:52 2018 -0700
GEODE-5691: Fix using namespace violations (#346)
* Updates clang-tidy integration using CMake built in support.
* Updates .clang-tidy.
---
.clang-format | 39 +-
.clang-tidy | 23 +-
BUILDING.md | 87 ++--
CMakeLists.txt | 15 -
clicache/src/CacheableArrayList.hpp | 2 +-
clicache/src/CacheableBuiltins.hpp | 16 +-
clicache/src/CacheableDate.cpp | 2 +-
clicache/src/CacheableFileName.cpp | 8 +-
clicache/src/CacheableHashMap.hpp | 2 +-
clicache/src/CacheableHashSet.hpp | 8 +-
clicache/src/CacheableHashTable.hpp | 2 +-
clicache/src/CacheableIdentityHashMap.hpp | 2 +-
clicache/src/CacheableLinkedList.hpp | 2 +-
clicache/src/CacheableObjectArray.cpp | 4 +-
clicache/src/CacheableObjectArray.hpp | 4 +-
clicache/src/CacheableStack.cpp | 2 +-
clicache/src/CacheableVector.hpp | 2 +-
clicache/src/DataInput.cpp | 60 +--
clicache/src/DataOutput.cpp | 2 +-
clicache/src/DistributedSystem.cpp | 66 +--
clicache/src/GeodeClassIds.hpp | 78 ++--
clicache/src/Properties.hpp | 2 +-
clicache/src/Serializable.cpp | 64 +--
clicache/src/Serializable.hpp | 1 +
clicache/src/TypeRegistry.cpp | 90 ++--
clicache/src/TypeRegistry.hpp | 56 +--
clicache/src/impl/PdxInstanceImpl.hpp | 4 +-
cppcache/CMakeLists.txt | 5 +
cppcache/include/geode/CacheableBuiltins.hpp | 2 +
cppcache/include/geode/CacheableDate.hpp | 5 +-
cppcache/include/geode/CacheableEnum.hpp | 5 +-
cppcache/include/geode/CacheableKey.hpp | 3 +-
cppcache/include/geode/CacheableString.hpp | 4 +-
cppcache/include/geode/Properties.hpp | 5 +-
cppcache/include/geode/Struct.hpp | 2 +-
.../EnableChunkHandlerThreadTest.cpp | 5 +-
cppcache/integration-test-2/ExampleTest.cpp | 7 +-
cppcache/integration-test-2/PdxInstanceTest.cpp | 21 +-
.../integration-test-2/RegionPutGetAllTest.cpp | 20 +-
cppcache/integration-test-2/StructTest.cpp | 7 +-
cppcache/integration-test-2/framework/Cluster.h | 3 +-
.../integration-test-2/framework/GfshExecute.cpp | 17 +-
cppcache/integration-test/BBNamingContext.cpp | 10 +-
cppcache/integration-test/BBNamingContext.hpp | 11 +
.../integration-test/BuiltinCacheableWrappers.hpp | 87 ++--
cppcache/integration-test/CacheHelper.cpp | 17 +-
cppcache/integration-test/CacheHelper.hpp | 8 +-
cppcache/integration-test/CacheImplHelper.hpp | 7 +-
cppcache/integration-test/CacheableWrapper.hpp | 4 +-
cppcache/integration-test/DeltaEx.hpp | 9 +
cppcache/integration-test/LocatorHelper.hpp | 3 +
cppcache/integration-test/QueryHelper.hpp | 23 +-
cppcache/integration-test/TallyListener.hpp | 7 +-
cppcache/integration-test/TallyLoader.hpp | 18 +-
cppcache/integration-test/TallyWriter.hpp | 9 +-
cppcache/integration-test/ThinClientDistOps.hpp | 30 +-
cppcache/integration-test/ThinClientDistOps2.hpp | 12 +-
cppcache/integration-test/ThinClientDurable.hpp | 5 +
.../integration-test/ThinClientDurableFailover.hpp | 5 +
.../integration-test/ThinClientDurableInterest.hpp | 4 +
.../ThinClientDurableReconnect.hpp | 2 +
cppcache/integration-test/ThinClientFailover.hpp | 6 +-
cppcache/integration-test/ThinClientFailover2.hpp | 6 +-
cppcache/integration-test/ThinClientFailover3.hpp | 5 +-
.../ThinClientFailoverInterest.hpp | 5 +-
.../ThinClientFailoverInterest2.hpp | 5 +-
.../ThinClientFailoverInterestAllWithCache.hpp | 5 +-
.../integration-test/ThinClientFailoverRegex.hpp | 15 +-
.../integration-test/ThinClientGatewayTest.hpp | 2 -
cppcache/integration-test/ThinClientHeapLRU.hpp | 2 -
cppcache/integration-test/ThinClientHelper.hpp | 130 +++---
cppcache/integration-test/ThinClientInterest1.hpp | 2 -
cppcache/integration-test/ThinClientInterest2.hpp | 2 -
cppcache/integration-test/ThinClientInterest3.hpp | 2 -
.../ThinClientInterest3Cacheless.hpp | 2 -
.../integration-test/ThinClientInterestList.hpp | 6 +-
.../integration-test/ThinClientInterestList2.hpp | 6 +-
.../integration-test/ThinClientListenerInit.hpp | 2 -
.../ThinClientLocalCacheLoader.hpp | 211 +++++----
.../integration-test/ThinClientMultipleCaches.hpp | 8 +-
.../integration-test/ThinClientNotification.hpp | 5 +-
.../integration-test/ThinClientPdxSerializer.hpp | 9 +-
.../integration-test/ThinClientPdxSerializers.hpp | 15 +
cppcache/integration-test/ThinClientPutAll.hpp | 13 +-
.../integration-test/ThinClientPutAllTimeout.hpp | 15 +-
.../ThinClientPutAllWithCallBack.hpp | 43 +-
cppcache/integration-test/ThinClientPutGetAll.hpp | 29 +-
.../ThinClientRIwithlocalRegionDestroy.hpp | 22 +-
cppcache/integration-test/ThinClientRegex.hpp | 6 +-
cppcache/integration-test/ThinClientRegex2.hpp | 17 +-
cppcache/integration-test/ThinClientRegex3.hpp | 16 +-
cppcache/integration-test/ThinClientRemoveAll.hpp | 6 +-
cppcache/integration-test/ThinClientSSL.hpp | 6 +-
.../integration-test/ThinClientSSLWithPassword.hpp | 6 +-
cppcache/integration-test/ThinClientSecurity.hpp | 18 +-
.../integration-test/ThinClientSecurityHelper.hpp | 22 +-
cppcache/integration-test/ThinClientTXFailover.hpp | 7 +-
cppcache/integration-test/ThinClientTasks_C2S2.hpp | 2 +
.../integration-test/ThinClientTransactions.hpp | 28 +-
.../integration-test/ThinClientTransactionsXA.hpp | 12 +-
cppcache/integration-test/fw_dunit.cpp | 4 +-
cppcache/integration-test/locator_globals.hpp | 12 +-
.../integration-test/testAttributesMutator.cpp | 12 +-
cppcache/integration-test/testCache.cpp | 9 +-
cppcache/integration-test/testCacheless.cpp | 5 +-
.../integration-test/testCreateAndDestroyPool.cpp | 2 -
cppcache/integration-test/testDataOutput.cpp | 3 +-
cppcache/integration-test/testExpiration.cpp | 13 +-
cppcache/integration-test/testLRUList.cpp | 4 +-
cppcache/integration-test/testLinkage.cpp | 41 +-
cppcache/integration-test/testLogger.cpp | 79 ++--
.../integration-test/testOverflowPutGetSqLite.cpp | 21 +-
.../integration-test/testPdxMetadataCheckTest.cpp | 23 +-
cppcache/integration-test/testPoolFactory.cpp | 4 +-
.../testRegionAccessThreadSafe.cpp | 2 +-
.../testRegionAttributesFactory.cpp | 6 +-
cppcache/integration-test/testRegionMap.cpp | 25 +-
.../integration-test/testRegionTemplateArgs.cpp | 13 +-
cppcache/integration-test/testSerialization.cpp | 6 +-
cppcache/integration-test/testSystemProperties.cpp | 5 +-
.../testThinClientAfterRegionLive.cpp | 6 +-
.../integration-test/testThinClientBigValue.cpp | 7 +-
.../testThinClientCacheableStringArray.cpp | 7 +-
.../integration-test/testThinClientCacheables.cpp | 7 +-
.../testThinClientCacheablesLimits.cpp | 6 +-
.../integration-test/testThinClientClearRegion.cpp | 6 +-
.../integration-test/testThinClientConflation.cpp | 2 +
.../testThinClientContainsKeyOnServer.cpp | 5 +-
cppcache/integration-test/testThinClientCq.cpp | 14 +-
.../integration-test/testThinClientCqDelta.cpp | 14 +-
.../integration-test/testThinClientCqDurable.cpp | 14 +-
.../integration-test/testThinClientCqFailover.cpp | 10 +-
.../testThinClientCqHAFailover.cpp | 11 +-
cppcache/integration-test/testThinClientCqIR.cpp | 10 +-
.../testThinClientDeltaWithNotification.cpp | 8 +-
.../testThinClientDisconnectionListioner.cpp | 3 +-
.../testThinClientFixedPartitionResolver.cpp | 7 +-
.../testThinClientGetInterests.cpp | 2 -
.../integration-test/testThinClientHADistOps.cpp | 7 +-
.../testThinClientHAEventIDMap.cpp | 10 +-
.../integration-test/testThinClientHAFailover.cpp | 6 +-
.../testThinClientHAFailoverRegex.cpp | 8 +-
.../testThinClientHAMixedRedundancy.cpp | 6 +-
.../testThinClientHAPeriodicAck.cpp | 11 +-
.../testThinClientHAQueryFailover.cpp | 13 +-
.../integration-test/testThinClientHeapLRU.cpp | 2 -
.../testThinClientIntResPolKeysInv.cpp | 6 +-
.../testThinClientInterest1Cacheless.cpp | 3 +-
.../testThinClientInterest1_Bug1001.cpp | 505 +++++++++++----------
.../testThinClientInterestNotify.cpp | 3 +
.../testThinClientLRUExpiration.cpp | 136 +++---
.../testThinClientListenerCallbackArgTest.cpp | 9 +-
.../testThinClientListenerEvents.cpp | 9 +-
.../testThinClientLocatorFailover.cpp | 2 +
...ThinClientNotificationWithDeltaWithoutcache.cpp | 8 +-
.../testThinClientPRPutAllFailover.cpp | 388 ++++++++--------
.../integration-test/testThinClientPRSingleHop.cpp | 7 +-
.../testThinClientPRSingleHopServerGroup.cpp | 8 +-
.../testThinClientPartitionResolver.cpp | 3 +-
.../testThinClientPdxDeltaWithNotification.cpp | 9 +-
.../integration-test/testThinClientPdxEnum.cpp | 26 +-
.../integration-test/testThinClientPdxInstance.cpp | 30 +-
.../integration-test/testThinClientPdxTests.cpp | 47 +-
.../testThinClientPoolAttrTest.cpp | 3 +
...hinClientPoolExecuteFunctionThrowsException.cpp | 9 +-
.../testThinClientPoolExecuteHAFunction.cpp | 8 +
.../testThinClientPoolExecuteHAFunctionPrSHOP.cpp | 7 +
.../integration-test/testThinClientPoolLocator.cpp | 4 +
.../testThinClientPutAllPRSingleHop.cpp | 8 +-
.../testThinClientPutWithDelta.cpp | 7 +-
...ThinClientRegionQueryDifferentServerConfigs.cpp | 12 +-
.../testThinClientRegionQueryExclusiveness.cpp | 9 +-
.../testThinClientRemoteQueryFailover.cpp | 37 +-
.../testThinClientRemoteQueryFailoverPdx.cpp | 34 +-
.../testThinClientRemoteQueryRS.cpp | 23 +-
.../testThinClientRemoteQuerySS.cpp | 26 +-
.../testThinClientRemoteQueryTimeout.cpp | 21 +-
.../testThinClientRemoteRegionQuery.cpp | 11 +-
.../integration-test/testThinClientRemoveOps.cpp | 17 +-
.../testThinClientSSLAuthCorrupt.cpp | 7 +-
.../integration-test/testThinClientSSLAuthFail.cpp | 7 +-
.../testThinClientSSLAuthUntrusted.cpp | 7 +-
.../testThinClientSSLWithSecurityAuthz.cpp | 25 +-
.../testThinClientSecurityAuthentication.cpp | 4 +-
.../testThinClientSecurityAuthenticationMU.cpp | 5 +-
...ientSecurityAuthenticationSetAuthInitialize.cpp | 6 +-
.../testThinClientSecurityAuthorization.cpp | 23 +-
.../testThinClientSecurityAuthorizationMU.cpp | 31 +-
.../testThinClientSecurityCQAuthorizationMU.cpp | 15 +-
.../integration-test/testThinClientSecurityDH.cpp | 3 +-
.../testThinClientSecurityDH_MU.cpp | 3 +-
...tThinClientSecurityDurableCQAuthorizationMU.cpp | 18 +-
.../testThinClientSecurityMultiUserTest.cpp | 3 +-
.../testThinClientSecurityPostAuthorization.cpp | 39 +-
.../integration-test/testThinClientTicket317.cpp | 2 +
.../testThinClientWriterException.cpp | 96 ++--
cppcache/integration-test/testUtils.hpp | 18 +-
.../testXmlCacheCreationWithOverFlow.cpp | 11 +-
.../testXmlCacheCreationWithPools.cpp | 18 +-
.../testXmlCacheCreationWithRefid.cpp | 6 +-
.../testXmlCacheInitialization.cpp | 9 +-
cppcache/src/Assert.cpp | 1 -
cppcache/src/AuthenticatedView.cpp | 7 +-
cppcache/src/CacheFactory.cpp | 14 +-
cppcache/src/CacheImpl.cpp | 11 +-
cppcache/src/CachePerfStats.hpp | 8 +-
cppcache/src/CacheXml.cpp | 8 +-
cppcache/src/CacheXmlCreation.cpp | 7 +-
cppcache/src/CacheXmlParser.cpp | 6 +-
cppcache/src/CacheableEnum.cpp | 2 +
cppcache/src/CacheableObjectPartList.hpp | 10 +-
cppcache/src/CacheableString.cpp | 2 +-
cppcache/src/CacheableToken.cpp | 8 +-
cppcache/src/ClientConnectionRequest.cpp | 8 +-
cppcache/src/ClientConnectionResponse.cpp | 10 +-
cppcache/src/ClientConnectionResponse.hpp | 2 +
cppcache/src/ClientHealthStats.hpp | 2 +-
cppcache/src/ClientProxyMembershipID.cpp | 8 +-
cppcache/src/ClientProxyMembershipID.hpp | 5 +-
cppcache/src/ClientReplacementRequest.cpp | 8 +-
cppcache/src/ConcurrentEntriesMap.cpp | 8 +-
cppcache/src/CqAttributesMutator.cpp | 8 +-
cppcache/src/CqEventImpl.cpp | 8 +-
cppcache/src/CqQueryImpl.cpp | 8 +-
cppcache/src/CqServiceVsdStats.hpp | 2 +-
cppcache/src/DSMemberForVersionStamp.hpp | 2 +
cppcache/src/DataInput.cpp | 4 +-
cppcache/src/DataOutput.cpp | 4 +-
cppcache/src/DefaultResultCollector.cpp | 11 +-
cppcache/src/DiskStoreId.cpp | 1 -
cppcache/src/DiskStoreId.hpp | 2 +
cppcache/src/DistributedSystem.cpp | 2 -
cppcache/src/EntriesMapFactory.cpp | 12 +-
cppcache/src/EnumInfo.hpp | 3 +
cppcache/src/EventId.hpp | 2 +
cppcache/src/EventIdMap.cpp | 8 +-
cppcache/src/EvictionThread.cpp | 9 +-
cppcache/src/ExpiryTaskManager.cpp | 11 +-
cppcache/src/ExpiryTaskManager.hpp | 2 +-
cppcache/src/FixedPartitionAttributesImpl.hpp | 2 +-
cppcache/src/FunctionService.cpp | 12 +-
cppcache/src/FunctionServiceImpl.cpp | 8 +-
cppcache/src/GetAllServersRequest.cpp | 8 +-
cppcache/src/GetAllServersRequest.hpp | 2 +-
cppcache/src/GetAllServersResponse.cpp | 8 +-
cppcache/src/GetAllServersResponse.hpp | 2 +-
cppcache/src/HashMapOfException.hpp | 4 +-
cppcache/src/InterestResultPolicy.cpp | 8 +-
cppcache/src/LRUAction.cpp | 8 +-
cppcache/src/LRULocalDestroyAction.cpp | 8 +-
cppcache/src/LocatorListRequest.cpp | 10 +-
cppcache/src/LocatorListResponse.cpp | 10 +-
cppcache/src/LocatorListResponse.hpp | 2 +
cppcache/src/Log.cpp | 16 +-
cppcache/src/MapSegment.hpp | 5 +-
cppcache/src/MemberListForVersionStamp.cpp | 8 +-
cppcache/src/PdxType.hpp | 2 +-
cppcache/src/Pool.cpp | 8 +-
cppcache/src/PoolAttributes.cpp | 8 +-
cppcache/src/PoolFactory.cpp | 8 +-
cppcache/src/PoolXmlCreation.cpp | 8 +-
cppcache/src/PreservedDataExpiryHandler.cpp | 8 +-
cppcache/src/QueueConnectionRequest.cpp | 8 +-
cppcache/src/QueueConnectionResponse.cpp | 10 +-
cppcache/src/QueueConnectionResponse.hpp | 3 +
cppcache/src/ReadWriteLock.cpp | 8 +-
cppcache/src/RegionExpiryHandler.cpp | 8 +-
cppcache/src/ResultSetImpl.cpp | 8 +-
cppcache/src/SerializationRegistry.hpp | 2 +
cppcache/src/StackTrace.hpp | 1 -
cppcache/src/SuspendedTxExpiryHandler.cpp | 8 +-
cppcache/src/SystemProperties.cpp | 4 +-
cppcache/src/TcpConn.cpp | 4 +-
cppcache/src/TcpSslConn.cpp | 4 +-
cppcache/src/TcrDistributionManager.cpp | 8 +-
cppcache/src/TcrHADistributionManager.cpp | 8 +-
cppcache/src/TcrMessage.cpp | 13 +-
cppcache/src/TcrMessage.hpp | 1 -
.../src/ThinClientCacheDistributionManager.cpp | 8 +-
cppcache/src/ThinClientDistributionManager.cpp | 8 +-
cppcache/src/ThinClientHARegion.cpp | 7 +-
cppcache/src/ThinClientLocatorHelper.cpp | 8 +-
cppcache/src/ThinClientPoolDM.cpp | 4 +-
cppcache/src/ThinClientPoolDM.hpp | 1 -
cppcache/src/ThinClientPoolHADM.cpp | 8 +-
cppcache/src/ThinClientPoolRegion.cpp | 8 +-
cppcache/src/ThinClientPoolStickyDM.cpp | 8 +-
cppcache/src/ThinClientRedundancyManager.cpp | 8 +-
cppcache/src/ThinClientStickyManager.cpp | 8 +-
cppcache/src/ThreadPool.cpp | 8 +-
cppcache/src/TombstoneExpiryHandler.cpp | 8 +-
cppcache/src/TombstoneList.cpp | 8 +-
cppcache/src/TrackedMapEntry.cpp | 8 +-
cppcache/src/TssConnectionWrapper.cpp | 8 +-
cppcache/src/TypeRegistry.cpp | 10 +-
cppcache/src/UserAttributes.cpp | 8 +-
cppcache/src/Version.cpp | 7 +-
cppcache/src/VersionTag.cpp | 8 +-
cppcache/src/VersionTag.hpp | 2 +
cppcache/src/geodeBanner.cpp | 8 +-
cppcache/src/statistics/AtomicStatisticsImpl.cpp | 2 +
cppcache/src/statistics/AtomicStatisticsImpl.hpp | 4 +-
cppcache/src/statistics/GeodeStatisticsFactory.cpp | 5 +-
cppcache/src/statistics/GeodeStatisticsFactory.hpp | 2 -
cppcache/src/statistics/HostStatSampler.cpp | 28 +-
cppcache/src/statistics/HostStatSampler.hpp | 5 +-
cppcache/src/statistics/OsStatisticsImpl.cpp | 2 +
cppcache/src/statistics/OsStatisticsImpl.hpp | 6 +-
cppcache/src/statistics/PoolStatsSampler.cpp | 18 +-
cppcache/src/statistics/PoolStatsSampler.hpp | 18 +-
cppcache/src/statistics/ProcessStats.cpp | 9 +-
cppcache/src/statistics/ProcessStats.hpp | 2 -
cppcache/src/statistics/StatArchiveWriter.cpp | 4 +
cppcache/src/statistics/StatArchiveWriter.hpp | 7 +-
cppcache/src/statistics/StatSamplerStats.hpp | 6 +-
cppcache/src/statistics/StatisticDescriptor.hpp | 2 -
.../src/statistics/StatisticDescriptorImpl.cpp | 4 +
cppcache/src/statistics/StatisticsManager.cpp | 3 +-
cppcache/src/statistics/StatisticsManager.hpp | 4 +-
cppcache/src/statistics/StatisticsType.hpp | 6 +-
cppcache/src/statistics/StatisticsTypeImpl.cpp | 3 +
cppcache/src/util/JavaModifiedUtf8.hpp | 2 -
cppcache/src/util/Log.hpp | 248 +++++-----
cppcache/src/util/chrono/duration_bounds.hpp | 6 +-
cppcache/test/AutoDeleteTest.cpp | 2 -
cppcache/test/ByteArrayTest.cpp | 2 +-
cppcache/test/CacheXmlParserTest.cpp | 2 +-
cppcache/test/CacheableKeyCreateTests.cpp | 12 +-
cppcache/test/CacheableKeysTest.cpp | 19 +-
cppcache/test/CacheableStringEqualityTest.cpp | 5 +-
cppcache/test/CacheableStringTests.cpp | 7 +-
cppcache/test/ClientConnectionResponseTest.cpp | 5 +-
.../test/ClientProxyMembershipIDFactoryTest.cpp | 2 +-
cppcache/test/DataInputTest.cpp | 7 +-
cppcache/test/DataOutputTest.cpp | 6 +-
cppcache/test/ExceptionTypesTest.cpp | 2 +-
cppcache/test/InterestResultPolicyTest.cpp | 2 +-
cppcache/test/RegionAttributesFactoryTest.cpp | 3 +-
cppcache/test/SerializableCreateTests.cpp | 12 +-
cppcache/test/StructSetTest.cpp | 5 +-
cppcache/test/TcrMessage_unittest.cpp | 97 +++-
cppcache/test/geodeBannerTest.cpp | 2 +-
dependencies/ACE/CMakeLists.txt | 6 +-
dependencies/boost/CMakeLists.txt | 2 +
dependencies/openssl/CMakeLists.txt | 3 +
sqliteimpl/SqLiteHelper.hpp | 2 -
sqliteimpl/SqLiteImpl.cpp | 50 +-
tests/cpp/fwklib/FrameworkTest.cpp | 2 +-
tests/cpp/fwklib/FwkBBClient.cpp | 25 +-
tests/cpp/fwklib/FwkBBServer.cpp | 22 +-
tests/cpp/fwklib/FwkLog.cpp | 23 +-
tests/cpp/fwklib/FwkLog.hpp | 70 +--
tests/cpp/fwklib/FwkObjects.cpp | 13 +-
tests/cpp/fwklib/FwkObjects.hpp | 39 +-
tests/cpp/fwklib/FwkStrCvt.cpp | 13 +-
tests/cpp/fwklib/IpcHandler.cpp | 11 +-
tests/cpp/fwklib/PerfFwk.cpp | 56 +--
tests/cpp/fwklib/QueryHelper.hpp | 33 +-
tests/cpp/fwklib/Service.cpp | 12 +-
tests/cpp/fwklib/TaskClient.cpp | 16 +-
tests/cpp/fwklib/TcpIpc.cpp | 11 +-
tests/cpp/fwklib/TestClient.cpp | 19 +-
tests/cpp/fwklib/TimeBomb.cpp | 39 +-
tests/cpp/fwklib/TimeSync.cpp | 11 +-
tests/cpp/fwklib/UDPIpc.cpp | 12 +-
tests/cpp/security/CredentialGenerator.cpp | 13 +-
tests/cpp/testobject/ArrayOfByte.hpp | 10 +-
tests/cpp/testobject/BatchObject.cpp | 8 +-
tests/cpp/testobject/BatchObject.hpp | 5 +-
tests/cpp/testobject/CMakeLists.txt | 3 +-
tests/cpp/testobject/DeltaFastAssetAccount.cpp | 10 +-
tests/cpp/testobject/DeltaFastAssetAccount.hpp | 8 +-
tests/cpp/testobject/DeltaPSTObject.cpp | 6 +-
tests/cpp/testobject/DeltaPSTObject.hpp | 5 +-
tests/cpp/testobject/DeltaTestImpl.cpp | 4 +-
tests/cpp/testobject/DeltaTestImpl.hpp | 10 +-
tests/cpp/testobject/EqStruct.cpp | 10 +-
tests/cpp/testobject/EqStruct.hpp | 5 +-
tests/cpp/testobject/FastAsset.cpp | 8 +-
tests/cpp/testobject/FastAsset.hpp | 5 +-
tests/cpp/testobject/FastAssetAccount.cpp | 10 +-
tests/cpp/testobject/FastAssetAccount.hpp | 15 +-
tests/cpp/testobject/InvalidPdxUsage.cpp | 158 +++----
tests/cpp/testobject/InvalidPdxUsage.hpp | 18 +-
tests/cpp/testobject/NestedPdxObject.cpp | 11 +-
tests/cpp/testobject/NestedPdxObject.hpp | 10 +-
tests/cpp/testobject/NonPdxType.cpp | 48 +-
tests/cpp/testobject/NonPdxType.hpp | 18 +-
tests/cpp/testobject/PSTObject.cpp | 9 +-
tests/cpp/testobject/PSTObject.hpp | 7 +-
tests/cpp/testobject/PdxClassV1.cpp | 15 +-
tests/cpp/testobject/PdxClassV1.hpp | 26 +-
tests/cpp/testobject/PdxClassV2.cpp | 54 +--
tests/cpp/testobject/PdxClassV2.hpp | 26 +-
tests/cpp/testobject/PdxType.cpp | 45 +-
tests/cpp/testobject/PdxType.hpp | 38 +-
tests/cpp/testobject/PdxVersioned1.cpp | 33 +-
tests/cpp/testobject/PdxVersioned1.hpp | 28 +-
tests/cpp/testobject/PdxVersioned2.cpp | 33 +-
tests/cpp/testobject/PdxVersioned2.hpp | 28 +-
tests/cpp/testobject/Portfolio.cpp | 5 +-
tests/cpp/testobject/Portfolio.hpp | 6 +-
tests/cpp/testobject/PortfolioPdx.cpp | 9 +-
tests/cpp/testobject/PortfolioPdx.hpp | 8 +-
tests/cpp/testobject/Position.cpp | 5 +-
tests/cpp/testobject/Position.hpp | 5 +-
tests/cpp/testobject/PositionPdx.cpp | 5 +-
tests/cpp/testobject/PositionPdx.hpp | 4 +-
tests/cpp/testobject/TestObject1.cpp | 17 +-
tests/cpp/testobject/TestObject1.hpp | 7 +-
tests/cpp/testobject/TimestampedObject.hpp | 3 +-
tests/cpp/testobject/VariousPdxTypes.cpp | 2 +
tests/cpp/testobject/VariousPdxTypes.hpp | 12 +-
413 files changed, 4101 insertions(+), 2485 deletions(-)
diff --git a/.clang-format b/.clang-format
index 54da194..7b7698d 100644
--- a/.clang-format
+++ b/.clang-format
@@ -5,7 +5,7 @@ AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: true
+AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
@@ -29,17 +29,24 @@ BraceWrapping:
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
+ AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
+BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
+BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
+CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
@@ -47,8 +54,15 @@ Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
-ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
-#IncludeCategories:
+FixNamespaceComments: true
+ForEachMacros:
+ - foreach
+ - Q_FOREACH
+ - BOOST_FOREACH
+IncludeBlocks: Preserve
+#IncludeCategories:
+# - Regex: '^<ext/.*\.h>'
+# Priority: 2
# - Regex: '^<.*\.h>'
# Priority: 1
# - Regex: '^<.*'
@@ -57,6 +71,7 @@ ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
+IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
@@ -75,9 +90,11 @@ END_TASK_DEFINITION|\
END_MAIN$"
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
+ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
-ObjCSpaceBeforeProtocolList: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
@@ -85,12 +102,26 @@ PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
+RawStringFormats:
+ - Language: TextProto
+ Delimiters:
+ - pb
+ - PB
+ - proto
+ - PROTO
+ CanonicalDelimiter: ''
+ BasedOnStyle: google
ReflowComments: true
#SortIncludes: true
SortIncludes: false
+SortUsingDeclarations: true
SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
diff --git a/.clang-tidy b/.clang-tidy
index 06b26ff..3f9fb9d 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,11 +1,10 @@
---
-Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,-*,google-*,-google-readability-todo,-google-explicit-constructor'
-WarningsAsErrors: ''
-HeaderFilterRegex: ''
+Checks: '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,-google-readability-todo,-google-runtime-references'
+WarningsAsErrors: 'google-build-using-namespace'
+HeaderFilterRegex: '\.(h|hpp)$'
AnalyzeTemporaryDtors: false
-CheckOptions:
- - key: cert-oop11-cpp.UseCERTSemantics
- value: '1'
+FormatStyle: file
+CheckOptions:
- key: google-build-namespaces.HeaderFileExtensions
value: h,hh,hpp,hxx
- key: google-global-names-in-headers.HeaderFileExtensions
@@ -16,6 +15,10 @@ CheckOptions:
value: '4294967295'
- key: google-readability-function-size.LineThreshold
value: '4294967295'
+ - key: google-readability-function-size.NestingThreshold
+ value: '4294967295'
+ - key: google-readability-function-size.ParameterThreshold
+ value: '4294967295'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
@@ -28,6 +31,8 @@ CheckOptions:
value: ''
- key: google-runtime-int.UnsignedTypePrefix
value: uint
+ - key: google-runtime-references.WhiteListTypes
+ value: ''
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
@@ -42,6 +47,6 @@ CheckOptions:
value: 'NULL'
...
-
-# google-explicit-constructor - disabled due to SharedBase issues.
-# google-readability-todo - disabled because it adds names.
\ No newline at end of file
+# Disable Checks
+# google-runtime-references - We have diverged from this rule due to both legacy and disagreement with the rule.
+# google-readability-todo - Adds current user name when fix applied.
diff --git a/BUILDING.md b/BUILDING.md
index 05e808e..29fd4c3 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -22,14 +22,15 @@ Building requires access to an installation of Geode. There are two ways to achi
## Steps to build
-
- $ cd <clone>
- $ mkdir build
- $ cd build
- // configuration step
- $ cmake .. <platform-specific generator parameters (see below)>
- // build step
- $ cmake --build . -- <platform-specific parallelism parameters (see below)>
+```console
+$ cd <clone>
+$ mkdir build
+$ cd build
+# configuration step
+$ cmake .. <platform-specific generator parameters (see below)>
+# build step
+$ cmake --build . -- <platform-specific parallelism parameters (see below)>
+```console
To explicitly specify the location in which the Native Client will be installed, add `-DCMAKE_INSTALL_PREFIX=/path/to/installation/destination` to this initial `cmake` execution command.
@@ -38,45 +39,68 @@ CMake uses a "generator" to produce configuration files for use by a variety of
#### CLion / Eclipse / Other
The recommended generator for most unix platforms is 'Makefiles' (default):
-
- $ cmake ..
+```console
+$ cmake ..
+```
#### Xcode
The recommended generator for Xcode is `Xcode`:
-
- $ cmake .. -G "Xcode"
+```console
+$ cmake .. -G "Xcode"
+```
#### Windows / Visual Studio
When running cmake commands on Windows, be sure to use [Visual Studio Native Tools Command Prompt](https://msdn.microsoft.com/en-us/library/f35ctcxw.aspx) so environment variables are set properly.
The recommended generator on Windows is `Visual Studio 14 2015 Win64`:
-
- $ cmake .. -G "Visual Studio 14 2015 Win64" -Thost=x64
+```console
+$ cmake .. -G "Visual Studio 14 2015 Win64" -Thost=x64
+```
### Build Parallelism
For faster builds, use optional parallelism parameters in the last build step:
#### Unix
-
- $ cmake --build . -- -j <# of jobs>
+```console
+$ cmake --build . -- -j <# of jobs>
+```
#### Windows
+```console
+$ cmake --build . -- /m
+```
- $ cmake --build . -- /m
+### Optional Configuration
-### Code Coverage
+#### Code Coverage
If building with GCC or Clang you can enable C++ code coverage by adding `-DUSE_CPP_COVERAGE=ON` to the CMake [Generator](#generator) command.
-
- $ cmake ... -DUSE_CPP_COVERAGE=ON ...
-
+```console
+$ cmake … -DUSE_CPP_COVERAGE=ON …
+```
You can then generate a C++ code coverage report by downloading [lcov](http://ltp.sourceforge.net/coverage/lcov.php). After acquiring lcov, finish the [Steps to build](#Steps-to-build) section above. Then, run the tests as described in the [CONTRIBUTING.md](CONTRIBUTING.md). Finally, run the following commands from the `build` directory:
-
- $ lcov --capture --directory . --output-file coverage.info
- $ genhtml coverage.info --output-directory coverage_report
+```console
+$ lcov --capture --directory . --output-file coverage.info
+$ genhtml coverage.info --output-directory coverage_report
+```
You can then open the `index.html` file in the `coverage_report` directory using any browser.
+#### Clang-Tidy
+To enable `clang-tidy`:
+```console
+$ cmake … -DCMAKE_CXX_CLANG_TIDY=clang-tidy …
+```
+To use specific `clang-tidy`:
+```console
+$ cmake … -DCMAKE_CXX_CLANG_TIDY=/path/to/clang-tidy …
+```
+By default `clang-tidy` uses the configuration found in `.clang-tidy`
+To override `clang-tidy` options:
+```console
+$ cmake … -DCMAKE_CXX_CLANG_TIDY=clang-tidy;<options> …
+```
+
## Installing
By default a system-specific location is used by CMake as the destination of the `install` target, e.g., `/usr/local` on UNIX system. To explicitly specify the location in which the Native Client will be installed, add `-DCMAKE_INSTALL_PREFIX=/path/to/installation/destination` to the _initial_ `cmake` execution command.
@@ -85,10 +109,12 @@ Interpretation of the symbol varies depending on the option being specified, and
Due to limitations in CMake, the documentation must be built as a separate step before installation:
- $ cd <clone>
- $ cd build
- $ cmake --build . --target docs
- $ cmake --build . --target install
+```console
+$ cd <clone>
+$ cd build
+$ cmake --build . --target docs
+$ cmake --build . --target install
+```
# Platform-Specific Prerequisites
@@ -99,8 +125,9 @@ Due to limitations in CMake, the documentation must be built as a separate step
### Required Tools
* [Xcode](https://developer.apple.com/xcode/download/)
* Xcode command line developer tools
-
- `$ xcode-select --install`
+```console
+$ xcode-select --install
+```
### Optional Tools
* [CMake GUI](https://cmake.org/)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7c7e54..ecb55c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,21 +126,6 @@ string(REGEX REPLACE " " "" IGNORED_FULL "${IGNORED_FULL}")
list(APPEND CPACK_SOURCE_IGNORE_FILES ${IGNORED_FULL})
-option(ENABLE_CLANG_TIDY "Enable clang-tidy checks." false)
-if(ENABLE_CLANG_TIDY)
- find_program(CLANG_TIDY "clang-tidy")
- if(CLANG_TIDY)
- set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY} -header-filter=${CMAKE_CURRENT_SOURCE_DIR})
- option(ENABLE_CLANG_TIDY_FIX "Enable clang-tidy fix." false)
- if(ENABLE_CLANG_TIDY_FIX)
- set(CMAKE_CXX_CLANG_TIDY ${CMAKE_CXX_CLANG_TIDY} -fix -fix-errors)
- endif()
- message(STATUS "clang-tidy enabled.")
- else()
- message(SEND_ERROR "clang-tidy enabled but not found.")
- endif()
-endif()
-
if(CMAKE_GENERATOR MATCHES Win64*)
set(CMAKE_GENERATOR_TOOLSET "host=x64")
else()
diff --git a/clicache/src/CacheableArrayList.hpp b/clicache/src/CacheableArrayList.hpp
index 7e30208..171a79c 100644
--- a/clicache/src/CacheableArrayList.hpp
+++ b/clicache/src/CacheableArrayList.hpp
@@ -78,7 +78,7 @@ namespace Apache
{
int8_t get() override
{
- return static_cast<int8_t>(native::DSCode::CacheableArrayList);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableArrayList);
}
}
diff --git a/clicache/src/CacheableBuiltins.hpp b/clicache/src/CacheableBuiltins.hpp
index cab94e6..5c884b4 100644
--- a/clicache/src/CacheableBuiltins.hpp
+++ b/clicache/src/CacheableBuiltins.hpp
@@ -570,49 +570,49 @@ namespace Apache
/// An immutable wrapper for byte arrays that can serve
/// as a distributable object for caching.
/// </summary>
- using CacheableBytes = CacheableArray<native::CacheableArray<int8_t, native::DSCode::CacheableBytes>, Byte, static_cast<int8_t>(DSCode::CacheableBytes)>;
+ using CacheableBytes = CacheableArray<native::CacheableArray<int8_t, native::internal::DSCode::CacheableBytes>, Byte, static_cast<int8_t>(DSCode::CacheableBytes)>;
/// <summary>
/// An immutable wrapper for array of doubles that can serve
/// as a distributable object for caching.
/// </summary>
- using CacheableDoubleArray = CacheableArray<native::CacheableArray<double, native::DSCode::CacheableDoubleArray>, Double, static_cast<int8_t>(DSCode::CacheableDoubleArray)>;
+ using CacheableDoubleArray = CacheableArray<native::CacheableArray<double, native::internal::DSCode::CacheableDoubleArray>, Double, static_cast<int8_t>(DSCode::CacheableDoubleArray)>;
/// <summary>
/// An immutable wrapper for array of floats that can serve
/// as a distributable object for caching.
/// </summary>
- using CacheableFloatArray = CacheableArray<native::CacheableArray<float, native::DSCode::CacheableFloatArray>, Single, static_cast<int8_t>(DSCode::CacheableFloatArray)>;
+ using CacheableFloatArray = CacheableArray<native::CacheableArray<float, native::internal::DSCode::CacheableFloatArray>, Single, static_cast<int8_t>(DSCode::CacheableFloatArray)>;
/// <summary>
/// An immutable wrapper for array of 16-bit integers that can serve
/// as a distributable object for caching.
/// </summary>
- using CacheableInt16Array = CacheableArray<native::CacheableArray<int16_t, native::DSCode::CacheableInt16Array>, System::Int16, static_cast<int8_t>(DSCode::CacheableInt16Array)>;
+ using CacheableInt16Array = CacheableArray<native::CacheableArray<int16_t, native::internal::DSCode::CacheableInt16Array>, System::Int16, static_cast<int8_t>(DSCode::CacheableInt16Array)>;
/// <summary>
/// An immutable wrapper for array of 32-bit integers that can serve
/// as a distributable object for caching.
/// </summary>
- using CacheableInt32Array = CacheableArray<native::CacheableArray<int32_t, native::DSCode::CacheableInt32Array>, System::Int32, static_cast<int8_t>(DSCode::CacheableInt32Array)>;
+ using CacheableInt32Array = CacheableArray<native::CacheableArray<int32_t, native::internal::DSCode::CacheableInt32Array>, System::Int32, static_cast<int8_t>(DSCode::CacheableInt32Array)>;
/// <summary>
/// An immutable wrapper for array of 64-bit integers that can serve
/// as a distributable object for caching.
/// </summary>
- using CacheableInt64Array = CacheableArray<native::CacheableArray<int64_t, native::DSCode::CacheableInt64Array>, System::Int64, static_cast<int8_t>(DSCode::CacheableInt64Array)>;
+ using CacheableInt64Array = CacheableArray<native::CacheableArray<int64_t, native::internal::DSCode::CacheableInt64Array>, System::Int64, static_cast<int8_t>(DSCode::CacheableInt64Array)>;
/// <summary>
/// An immutable wrapper for array of booleans that can serve
/// as a distributable object for caching.
/// </summary>
- using BooleanArray = CacheableArray<native::CacheableArray<bool, native::DSCode::BooleanArray>, bool, static_cast<int8_t>(DSCode::BooleanArray)>;
+ using BooleanArray = CacheableArray<native::CacheableArray<bool, native::internal::DSCode::BooleanArray>, bool, static_cast<int8_t>(DSCode::BooleanArray)>;
/// <summary>
/// An immutable wrapper for array of 16-bit characters that can serve
/// as a distributable object for caching.
/// </summary>
- using CharArray = CacheableArray<native::CacheableArray<char16_t, native::DSCode::CharArray>, Char, static_cast<int8_t>(DSCode::CharArray)>;
+ using CharArray = CacheableArray<native::CacheableArray<char16_t, native::internal::DSCode::CharArray>, Char, static_cast<int8_t>(DSCode::CharArray)>;
} // namespace Client
} // namespace Geode
} // namespace Apache
diff --git a/clicache/src/CacheableDate.cpp b/clicache/src/CacheableDate.cpp
index 12caa29..c2f2064 100644
--- a/clicache/src/CacheableDate.cpp
+++ b/clicache/src/CacheableDate.cpp
@@ -70,7 +70,7 @@ namespace Apache
int8_t CacheableDate::DsCode::get()
{
- return static_cast<int8_t>(native::DSCode::CacheableDate);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableDate);
}
String^ CacheableDate::ToString()
diff --git a/clicache/src/CacheableFileName.cpp b/clicache/src/CacheableFileName.cpp
index 5fe7d39..a7b38c9 100644
--- a/clicache/src/CacheableFileName.cpp
+++ b/clicache/src/CacheableFileName.cpp
@@ -32,11 +32,11 @@ namespace Apache
void CacheableFileName::ToData(DataOutput^ output)
{
if (m_str->Length <= 0xFFFF) {
- output->WriteByte(static_cast<int8_t>(apache::geode::client::DSCode::CacheableString));
+ output->WriteByte(static_cast<int8_t>(apache::geode::client::internal::DSCode::CacheableString));
output->WriteUTF(m_str);
}
else {
- output->WriteByte(static_cast<int8_t>(apache::geode::client::DSCode::CacheableStringHuge));
+ output->WriteByte(static_cast<int8_t>(apache::geode::client::internal::DSCode::CacheableStringHuge));
output->WriteUTFHuge(m_str);
}
}
@@ -44,7 +44,7 @@ namespace Apache
void CacheableFileName::FromData(DataInput^ input)
{
unsigned char filetype = input->ReadByte();
- if (filetype == static_cast<int8_t>(apache::geode::client::DSCode::CacheableString)) {
+ if (filetype == static_cast<int8_t>(apache::geode::client::internal::DSCode::CacheableString)) {
m_str = input->ReadUTF();
}
else {
@@ -54,7 +54,7 @@ namespace Apache
int8_t CacheableFileName::DsCode::get()
{
- return static_cast<int8_t>(native::DSCode::CacheableFileName);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableFileName);
}
System::UInt64 CacheableFileName::ObjectSize::get()
diff --git a/clicache/src/CacheableHashMap.hpp b/clicache/src/CacheableHashMap.hpp
index dbb0c4d..f0c9389 100644
--- a/clicache/src/CacheableHashMap.hpp
+++ b/clicache/src/CacheableHashMap.hpp
@@ -120,7 +120,7 @@ namespace Apache
{
virtual int8_t get()
{
- return static_cast<int8_t>(native::DSCode::CacheableHashMap);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableHashMap);
}
}
diff --git a/clicache/src/CacheableHashSet.hpp b/clicache/src/CacheableHashSet.hpp
index d0f46aa..eb6410c 100644
--- a/clicache/src/CacheableHashSet.hpp
+++ b/clicache/src/CacheableHashSet.hpp
@@ -599,7 +599,7 @@ namespace Apache
}
#define _GFCLI_CACHEABLEHASHSET_DEF_GENERIC(m, HSTYPE) \
- public ref class m : public Internal::CacheableHashSetType<static_cast<int8_t>(native::DSCode::m), HSTYPE> \
+ public ref class m : public Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m), HSTYPE> \
{ \
public: \
/** <summary>
@@ -607,7 +607,7 @@ namespace Apache
* </summary>
*/ \
inline m() \
- : Internal::CacheableHashSetType<static_cast<int8_t>(native::DSCode::m), HSTYPE>() {} \
+ : Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m), HSTYPE>() {} \
\
/** <summary>
* Allocates a new instance with the given size.
@@ -615,7 +615,7 @@ namespace Apache
* <param name="size">the initial size of the new instance</param>
*/ \
inline m(System::Int32 size) \
- : Internal::CacheableHashSetType<static_cast<int8_t>(native::DSCode::m), HSTYPE>(size) {} \
+ : Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m), HSTYPE>(size) {} \
\
/** <summary>
* Static function to create a new empty instance.
@@ -652,7 +652,7 @@ namespace Apache
\
private: \
inline m(std::shared_ptr<apache::geode::client::Serializable> nativeptr) \
- : Internal::CacheableHashSetType<static_cast<int8_t>(native::DSCode::m), HSTYPE>(nativeptr) { } \
+ : Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m), HSTYPE>(nativeptr) { } \
};
/// <summary>
diff --git a/clicache/src/CacheableHashTable.hpp b/clicache/src/CacheableHashTable.hpp
index e65f6b5..c542c74 100644
--- a/clicache/src/CacheableHashTable.hpp
+++ b/clicache/src/CacheableHashTable.hpp
@@ -83,7 +83,7 @@ namespace Apache
{
int8_t get() override
{
- return static_cast<int8_t>(native::DSCode::CacheableHashTable);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableHashTable);
}
}
diff --git a/clicache/src/CacheableIdentityHashMap.hpp b/clicache/src/CacheableIdentityHashMap.hpp
index f6e9c53..ca7793c 100644
--- a/clicache/src/CacheableIdentityHashMap.hpp
+++ b/clicache/src/CacheableIdentityHashMap.hpp
@@ -109,7 +109,7 @@ namespace Apache
{
int8_t get() override
{
- return static_cast<int8_t>(native::DSCode::CacheableIdentityHashMap);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableIdentityHashMap);
}
}
diff --git a/clicache/src/CacheableLinkedList.hpp b/clicache/src/CacheableLinkedList.hpp
index 335a482..3fb9717 100644
--- a/clicache/src/CacheableLinkedList.hpp
+++ b/clicache/src/CacheableLinkedList.hpp
@@ -80,7 +80,7 @@ namespace Apache
{
virtual int8_t get()
{
- return static_cast<int8_t>(native::DSCode::CacheableLinkedList);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableLinkedList);
}
}
diff --git a/clicache/src/CacheableObjectArray.cpp b/clicache/src/CacheableObjectArray.cpp
index 5edd61f..fbceadd 100644
--- a/clicache/src/CacheableObjectArray.cpp
+++ b/clicache/src/CacheableObjectArray.cpp
@@ -41,8 +41,8 @@ namespace Apache
void CacheableObjectArray::ToData(DataOutput^ output)
{
output->WriteArrayLen((System::Int32)Count);
- output->WriteByte((int8_t)apache::geode::client::DSCode::Class);
- output->WriteByte((int8_t)apache::geode::client::DSCode::CacheableASCIIString);
+ output->WriteByte((int8_t)apache::geode::client::internal::DSCode::Class);
+ output->WriteByte((int8_t)apache::geode::client::internal::DSCode::CacheableASCIIString);
output->WriteUTF("java.lang.Object");
for each (Object^ obj in this) {
diff --git a/clicache/src/CacheableObjectArray.hpp b/clicache/src/CacheableObjectArray.hpp
index 8f8c230..6cce069 100644
--- a/clicache/src/CacheableObjectArray.hpp
+++ b/clicache/src/CacheableObjectArray.hpp
@@ -30,6 +30,8 @@ namespace Apache
namespace Client
{
+ using namespace apache::geode::client;
+
/// <summary>
/// A mutable <c>ISerializable</c> object array wrapper that can serve
/// as a distributable object for caching. Though this class provides
@@ -108,7 +110,7 @@ namespace Apache
{
virtual int8_t get()
{
- return static_cast<int8_t>(DSCode::CacheableObjectArray);
+ return static_cast<int8_t>(internal::DSCode::CacheableObjectArray);
}
}
diff --git a/clicache/src/CacheableStack.cpp b/clicache/src/CacheableStack.cpp
index eeef84b..194d7a9 100644
--- a/clicache/src/CacheableStack.cpp
+++ b/clicache/src/CacheableStack.cpp
@@ -68,7 +68,7 @@ namespace Apache
int8_t CacheableStack::DsCode::get()
{
- return static_cast<int8_t>(native::DSCode::CacheableStack);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableStack);
}
System::UInt64 CacheableStack::ObjectSize::get()
diff --git a/clicache/src/CacheableVector.hpp b/clicache/src/CacheableVector.hpp
index 33dbda2..bb820aa 100644
--- a/clicache/src/CacheableVector.hpp
+++ b/clicache/src/CacheableVector.hpp
@@ -107,7 +107,7 @@ namespace Apache
{
virtual int8_t get()
{
- return static_cast<int8_t>(native::DSCode::CacheableVector);
+ return static_cast<int8_t>(native::internal::DSCode::CacheableVector);
}
}
diff --git a/clicache/src/DataInput.cpp b/clicache/src/DataInput.cpp
index 68dd211..cc72252 100644
--- a/clicache/src/DataInput.cpp
+++ b/clicache/src/DataInput.cpp
@@ -448,52 +448,52 @@ namespace Apache
Object^ DataInput::ReadDotNetTypes(int8_t typeId)
{
- switch (static_cast<apache::geode::client::DSCode>(typeId))
+ switch (static_cast<apache::geode::client::internal::DSCode>(typeId))
{
- case apache::geode::client::DSCode::CacheableByte:
+ case apache::geode::client::internal::DSCode::CacheableByte:
{
return ReadByte();
}
- case apache::geode::client::DSCode::CacheableBoolean:
+ case apache::geode::client::internal::DSCode::CacheableBoolean:
{
bool obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableCharacter:
+ case apache::geode::client::internal::DSCode::CacheableCharacter:
{
Char obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableDouble:
+ case apache::geode::client::internal::DSCode::CacheableDouble:
{
Double obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableASCIIString:
+ case apache::geode::client::internal::DSCode::CacheableASCIIString:
{
/* CacheableString^ cs = static_cast<CacheableString^>(CacheableString::CreateDeserializable());
cs->FromData(this);
return cs->Value;*/
return ReadUTF();
}
- case apache::geode::client::DSCode::CacheableASCIIStringHuge:
+ case apache::geode::client::internal::DSCode::CacheableASCIIStringHuge:
{
/*CacheableString^ cs = static_cast<CacheableString^>(CacheableString::createDeserializableHuge());
cs->FromData(this);
return cs->Value;*/
return ReadASCIIHuge();
}
- case apache::geode::client::DSCode::CacheableString:
+ case apache::geode::client::internal::DSCode::CacheableString:
{
/*CacheableString^ cs = static_cast<CacheableString^>(CacheableString::createUTFDeserializable());
cs->FromData(this);
return cs->Value;*/
return ReadUTF();
}
- case apache::geode::client::DSCode::CacheableStringHuge:
+ case apache::geode::client::internal::DSCode::CacheableStringHuge:
{
//TODO: need to look all strings types
/*CacheableString^ cs = static_cast<CacheableString^>(CacheableString::createUTFDeserializableHuge());
@@ -501,103 +501,103 @@ namespace Apache
return cs->Value;*/
return ReadUTFHuge();
}
- case apache::geode::client::DSCode::CacheableFloat:
+ case apache::geode::client::internal::DSCode::CacheableFloat:
{
float obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableInt16:
+ case apache::geode::client::internal::DSCode::CacheableInt16:
{
Int16 obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableInt32:
+ case apache::geode::client::internal::DSCode::CacheableInt32:
{
Int32 obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableInt64:
+ case apache::geode::client::internal::DSCode::CacheableInt64:
{
Int64 obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableDate:
+ case apache::geode::client::internal::DSCode::CacheableDate:
{
CacheableDate^ cd = CacheableDate::Create();
cd->FromData(this);
return cd->Value;
}
- case apache::geode::client::DSCode::CacheableBytes:
+ case apache::geode::client::internal::DSCode::CacheableBytes:
{
return ReadBytes();
}
- case apache::geode::client::DSCode::CacheableDoubleArray:
+ case apache::geode::client::internal::DSCode::CacheableDoubleArray:
{
array<Double>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableFloatArray:
+ case apache::geode::client::internal::DSCode::CacheableFloatArray:
{
array<float>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableInt16Array:
+ case apache::geode::client::internal::DSCode::CacheableInt16Array:
{
array<Int16>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableInt32Array:
+ case apache::geode::client::internal::DSCode::CacheableInt32Array:
{
array<Int32>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::BooleanArray:
+ case apache::geode::client::internal::DSCode::BooleanArray:
{
array<bool>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CharArray:
+ case apache::geode::client::internal::DSCode::CharArray:
{
array<Char>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableInt64Array:
+ case apache::geode::client::internal::DSCode::CacheableInt64Array:
{
array<Int64>^ obj;
ReadObject(obj);
return obj;
}
- case apache::geode::client::DSCode::CacheableStringArray:
+ case apache::geode::client::internal::DSCode::CacheableStringArray:
{
return ReadStringArray();
}
- case apache::geode::client::DSCode::CacheableHashTable:
+ case apache::geode::client::internal::DSCode::CacheableHashTable:
{
return ReadHashtable();
}
- case apache::geode::client::DSCode::CacheableHashMap:
+ case apache::geode::client::internal::DSCode::CacheableHashMap:
{
CacheableHashMap^ chm = static_cast<CacheableHashMap^>(CacheableHashMap::CreateDeserializable());
chm->FromData(this);
return chm->Value;
}
- case apache::geode::client::DSCode::CacheableIdentityHashMap:
+ case apache::geode::client::internal::DSCode::CacheableIdentityHashMap:
{
CacheableIdentityHashMap^ chm = static_cast<CacheableIdentityHashMap^>(CacheableIdentityHashMap::CreateDeserializable());
chm->FromData(this);
return chm->Value;
}
- case apache::geode::client::DSCode::CacheableVector:
+ case apache::geode::client::internal::DSCode::CacheableVector:
{
/*CacheableVector^ cv = static_cast<CacheableVector^>(CacheableVector::CreateDeserializable());
cv->FromData(this);
@@ -611,7 +611,7 @@ namespace Apache
}
return retA;
}
- case apache::geode::client::DSCode::CacheableArrayList:
+ case apache::geode::client::internal::DSCode::CacheableArrayList:
{
/*CacheableArrayList^ cv = static_cast<CacheableArrayList^>(CacheableArrayList::CreateDeserializable());
cv->FromData(this);
@@ -625,7 +625,7 @@ namespace Apache
return retA;
}
- case apache::geode::client::DSCode::CacheableLinkedList:
+ case apache::geode::client::internal::DSCode::CacheableLinkedList:
{
/*CacheableArrayList^ cv = static_cast<CacheableArrayList^>(CacheableArrayList::CreateDeserializable());
cv->FromData(this);
@@ -639,7 +639,7 @@ namespace Apache
return retA;
}
- case apache::geode::client::DSCode::CacheableStack:
+ case apache::geode::client::internal::DSCode::CacheableStack:
{
CacheableStack^ cv = static_cast<CacheableStack^>(CacheableStack::CreateDeserializable());
cv->FromData(this);
diff --git a/clicache/src/DataOutput.cpp b/clicache/src/DataOutput.cpp
index 986a042..6b2a5b6 100644
--- a/clicache/src/DataOutput.cpp
+++ b/clicache/src/DataOutput.cpp
@@ -320,7 +320,7 @@ namespace Apache
{
System::Collections::IList^ list = (System::Collections::IList^)objectArray;
this->WriteArrayLen(list->Count);
- WriteByte((int8_t)apache::geode::client::DSCode::Class);
+ WriteByte((int8_t)apache::geode::client::internal::DSCode::Class);
String^ pdxDomainClassname = m_cache->TypeRegistry->GetPdxTypeName(objectArray->GetType()->GetElementType()->FullName);
WriteByte((int8_t)DSCode::CacheableASCIIString);
WriteUTF(pdxDomainClassname);
diff --git a/clicache/src/DistributedSystem.cpp b/clicache/src/DistributedSystem.cpp
index 1eb3595..2c42947 100644
--- a/clicache/src/DistributedSystem.cpp
+++ b/clicache/src/DistributedSystem.cpp
@@ -168,57 +168,57 @@ namespace Apache
auto&& typeRegistry = cache->TypeRegistry;
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableBytes),
+ static_cast<int8_t>(native::internal::DSCode::CacheableBytes),
gcnew TypeFactoryMethod(CacheableBytes::CreateDeserializable),
Type::GetType("System.Byte[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableDoubleArray),
+ static_cast<int8_t>(native::internal::DSCode::CacheableDoubleArray),
gcnew TypeFactoryMethod(CacheableDoubleArray::CreateDeserializable),
Type::GetType("System.Double[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableFloatArray),
+ static_cast<int8_t>(native::internal::DSCode::CacheableFloatArray),
gcnew TypeFactoryMethod(CacheableFloatArray::CreateDeserializable),
Type::GetType("System.Single[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableHashSet),
+ static_cast<int8_t>(native::internal::DSCode::CacheableHashSet),
gcnew TypeFactoryMethod(CacheableHashSet::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableLinkedHashSet),
+ static_cast<int8_t>(native::internal::DSCode::CacheableLinkedHashSet),
gcnew TypeFactoryMethod(CacheableLinkedHashSet::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableInt16Array),
+ static_cast<int8_t>(native::internal::DSCode::CacheableInt16Array),
gcnew TypeFactoryMethod(CacheableInt16Array::CreateDeserializable),
Type::GetType("System.Int16[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableInt32Array),
+ static_cast<int8_t>(native::internal::DSCode::CacheableInt32Array),
gcnew TypeFactoryMethod(CacheableInt32Array::CreateDeserializable),
Type::GetType("System.Int32[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableInt64Array),
+ static_cast<int8_t>(native::internal::DSCode::CacheableInt64Array),
gcnew TypeFactoryMethod(CacheableInt64Array::CreateDeserializable),
Type::GetType("System.Int64[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::BooleanArray),
+ static_cast<int8_t>(native::internal::DSCode::BooleanArray),
gcnew TypeFactoryMethod(BooleanArray::CreateDeserializable),
Type::GetType("System.Boolean[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CharArray),
+ static_cast<int8_t>(native::internal::DSCode::CharArray),
gcnew TypeFactoryMethod(CharArray::CreateDeserializable),
Type::GetType("System.Char[]"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableStringArray),
+ static_cast<int8_t>(native::internal::DSCode::CacheableStringArray),
gcnew TypeFactoryMethod(CacheableStringArray::CreateDeserializable),
Type::GetType("System.String[]"));
@@ -228,27 +228,27 @@ namespace Apache
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableDate),
+ static_cast<int8_t>(native::internal::DSCode::CacheableDate),
gcnew TypeFactoryMethod(CacheableDate::CreateDeserializable),
Type::GetType("System.DateTime"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableFileName),
+ static_cast<int8_t>(native::internal::DSCode::CacheableFileName),
gcnew TypeFactoryMethod(CacheableFileName::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableHashMap),
+ static_cast<int8_t>(native::internal::DSCode::CacheableHashMap),
gcnew TypeFactoryMethod(CacheableHashMap::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableHashTable),
+ static_cast<int8_t>(native::internal::DSCode::CacheableHashTable),
gcnew TypeFactoryMethod(CacheableHashTable::CreateDeserializable),
Type::GetType("System.Collections.Hashtable"));
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableIdentityHashMap),
+ static_cast<int8_t>(native::internal::DSCode::CacheableIdentityHashMap),
gcnew TypeFactoryMethod(CacheableIdentityHashMap::CreateDeserializable),
nullptr);
@@ -258,27 +258,27 @@ namespace Apache
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableVector),
+ static_cast<int8_t>(native::internal::DSCode::CacheableVector),
gcnew TypeFactoryMethod(CacheableVector::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableObjectArray),
+ static_cast<int8_t>(native::internal::DSCode::CacheableObjectArray),
gcnew TypeFactoryMethod(CacheableObjectArray::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableArrayList),
+ static_cast<int8_t>(native::internal::DSCode::CacheableArrayList),
gcnew TypeFactoryMethod(CacheableArrayList::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableLinkedList),
+ static_cast<int8_t>(native::internal::DSCode::CacheableLinkedList),
gcnew TypeFactoryMethod(CacheableLinkedList::CreateDeserializable),
nullptr);
typeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::CacheableStack),
+ static_cast<int8_t>(native::internal::DSCode::CacheableStack),
gcnew TypeFactoryMethod(CacheableStack::CreateDeserializable),
nullptr);
@@ -309,7 +309,7 @@ namespace Apache
// Actually an internal type being registered as a primitive
cache->TypeRegistry->RegisterDataSerializablePrimitiveOverrideNativeDeserialization(
- static_cast<int8_t>(native::DSCode::PdxType),
+ static_cast<int8_t>(native::internal::DSCode::PdxType),
gcnew TypeFactoryMethod(Apache::Geode::Client::Internal::PdxType::CreateDeserializable),
nullptr);
@@ -354,27 +354,27 @@ namespace Apache
TypeRegistry::UnregisterNativesGeneric(cache);
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableDate));
+ static_cast<int8_t>(native::internal::DSCode::CacheableDate));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableFileName));
+ static_cast<int8_t>(native::internal::DSCode::CacheableFileName));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableHashMap));
+ static_cast<int8_t>(native::internal::DSCode::CacheableHashMap));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableHashTable));
+ static_cast<int8_t>(native::internal::DSCode::CacheableHashTable));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableIdentityHashMap));
+ static_cast<int8_t>(native::internal::DSCode::CacheableIdentityHashMap));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableVector));
+ static_cast<int8_t>(native::internal::DSCode::CacheableVector));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableObjectArray));
+ static_cast<int8_t>(native::internal::DSCode::CacheableObjectArray));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableArrayList));
+ static_cast<int8_t>(native::internal::DSCode::CacheableArrayList));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::DSCode::CacheableStack));
+ static_cast<int8_t>(native::internal::DSCode::CacheableStack));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::InternalId::CacheableManagedObject));
+ static_cast<int8_t>(native::internal::InternalId::CacheableManagedObject));
cache->TypeRegistry->UnregisterTypeGeneric(
- static_cast<int8_t>(native::InternalId::CacheableManagedObjectXml));
+ static_cast<int8_t>(native::internal::InternalId::CacheableManagedObjectXml));
_GF_MG_EXCEPTION_CATCH_ALL2
}
diff --git a/clicache/src/GeodeClassIds.hpp b/clicache/src/GeodeClassIds.hpp
index aea451b..8d5acb0 100644
--- a/clicache/src/GeodeClassIds.hpp
+++ b/clicache/src/GeodeClassIds.hpp
@@ -40,25 +40,25 @@ namespace Apache
/// ClassId of <c>Properties</c> class
/// </summary>
literal System::UInt32 Properties =
- static_cast<System::UInt32>(apache::geode::client::DSCode::Properties) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::Properties) + 0x80000000;
/// <summary>
/// ClassId of <c>CharArray</c> class
/// </summary>
literal System::UInt32 CharArray =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CharArray) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CharArray) + 0x80000000;
/// <summary>
/// ClassId of <c>BooleanArray</c> class
/// </summary>
literal System::UInt32 BooleanArray =
- static_cast<System::UInt32>(apache::geode::client::DSCode::BooleanArray) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::BooleanArray) + 0x80000000;
/// <summary>
/// ClassId of <c>RegionAttributes</c> class
/// </summary>
literal System::UInt32 RegionAttributes =
- static_cast<System::UInt32>(apache::geode::client::DSCode::RegionAttributes) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::RegionAttributes) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableUndefined</c> class
@@ -81,199 +81,199 @@ namespace Apache
/// ClassId of <c>CacheableString</c> class
/// </summary>
literal System::UInt32 CacheableString =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableString) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableString) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableString</c> class for huge strings
/// </summary>
literal System::UInt32 CacheableStringHuge =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableStringHuge) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableStringHuge) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableBytes</c> class
/// </summary>
literal System::UInt32 CacheableBytes =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableBytes) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableBytes) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt16Array</c> class
/// </summary>
literal System::UInt32 CacheableInt16Array =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableInt16Array) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableInt16Array) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt32Array</c> class
/// </summary>
literal System::UInt32 CacheableInt32Array =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableInt32Array) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableInt32Array) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt64Array</c> class
/// </summary>
literal System::UInt32 CacheableInt64Array =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableInt64Array) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableInt64Array) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableFloatArray</c> class
/// </summary>
literal System::UInt32 CacheableFloatArray =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableFloatArray) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableFloatArray) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableDoubleArray</c> class
/// </summary>
literal System::UInt32 CacheableDoubleArray =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableDoubleArray) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableDoubleArray) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableVector</c> class for object arrays
/// </summary>
literal System::UInt32 CacheableObjectArray =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableObjectArray) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableObjectArray) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableBoolean</c> class
/// </summary>
literal System::UInt32 CacheableBoolean =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableBoolean) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableBoolean) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt16</c> class for wide-characters
/// </summary>
literal System::UInt32 CacheableCharacter =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableCharacter) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableCharacter) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableByte</c> class
/// </summary>
literal System::UInt32 CacheableByte =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableByte) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableByte) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt16</c> class
/// </summary>
literal System::UInt32 CacheableInt16 =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableInt16) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableInt16) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt32</c> class
/// </summary>
literal System::UInt32 CacheableInt32 =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableInt32) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableInt32) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableInt64</c> class
/// </summary>
literal System::UInt32 CacheableInt64 =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableInt64) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableInt64) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableFloat</c> class
/// </summary>
literal System::UInt32 CacheableFloat =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableFloat) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableFloat) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableDouble</c> class
/// </summary>
literal System::UInt32 CacheableDouble =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableDouble) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableDouble) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableDate</c> class
/// </summary>
literal System::UInt32 CacheableDate =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableDate) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableDate) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableFileName</c> class
/// </summary>
literal System::UInt32 CacheableFileName =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableFileName) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableFileName) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableStringArray</c> class
/// </summary>
literal System::UInt32 CacheableStringArray =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableStringArray) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableStringArray) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableVector</c> class
/// </summary>
literal System::UInt32 CacheableVector =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableVector) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableVector) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableStack</c> class
/// </summary>
literal System::UInt32 CacheableStack =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableStack) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableStack) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableArrayList</c> class
/// </summary>
literal System::UInt32 CacheableArrayList =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableArrayList) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableArrayList) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableArrayList</c> class
/// </summary>
literal System::UInt32 CacheableLinkedList =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableLinkedList) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableLinkedList) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableHashSet</c> class
/// </summary>
literal System::UInt32 CacheableHashSet =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableHashSet) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableHashSet) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableLinkedHashSet</c> class
/// </summary>
literal System::UInt32 CacheableLinkedHashSet =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableLinkedHashSet) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableLinkedHashSet) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableHashMap</c> class
/// </summary>
literal System::UInt32 CacheableHashMap =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableHashMap) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableHashMap) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableHashTable</c> class
/// </summary>
literal System::UInt32 CacheableHashTable =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableHashTable) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableHashTable) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableIdentityHashMap</c> class
/// </summary>
literal System::UInt32 CacheableIdentityHashMap =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableIdentityHashMap) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableIdentityHashMap) + 0x80000000;
/// <summary>
/// Not used.
/// </summary>
literal System::UInt32 CacheableTimeUnit =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableTimeUnit) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableTimeUnit) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableString</c> class for null strings
/// </summary>
literal System::UInt32 CacheableNullString =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableNullString) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableNullString) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableString</c> class for ASCII strings
/// </summary>
literal System::UInt32 CacheableASCIIString =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableASCIIString) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableASCIIString) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableString</c> class for huge ASCII strings
/// </summary>
literal System::UInt32 CacheableASCIIStringHuge =
- static_cast<System::UInt32>(apache::geode::client::DSCode::CacheableASCIIStringHuge) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::DSCode::CacheableASCIIStringHuge) + 0x80000000;
// Built-in managed types.
@@ -282,13 +282,13 @@ namespace Apache
/// ClassId of <c>CacheableObject</c> class
/// </summary>
literal System::UInt32 CacheableManagedObject =
- static_cast<System::UInt32>(apache::geode::client::InternalId::CacheableManagedObject) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::InternalId::CacheableManagedObject) + 0x80000000;
/// <summary>
/// ClassId of <c>CacheableObjectXml</c> class
/// </summary>
literal System::UInt32 CacheableManagedObjectXml =
- static_cast<System::UInt32>(apache::geode::client::InternalId::CacheableManagedObjectXml) + 0x80000000;
+ static_cast<System::UInt32>(apache::geode::client::internal::InternalId::CacheableManagedObjectXml) + 0x80000000;
};
} // namespace Client
diff --git a/clicache/src/Properties.hpp b/clicache/src/Properties.hpp
index 213149d..5c50b36 100644
--- a/clicache/src/Properties.hpp
+++ b/clicache/src/Properties.hpp
@@ -193,7 +193,7 @@ namespace Apache
{
inline virtual int8_t get( )
{
- return static_cast<int8_t>(native::DSCode::Properties);
+ return static_cast<int8_t>(native::internal::DSCode::Properties);
}
}
diff --git a/clicache/src/Serializable.cpp b/clicache/src/Serializable.cpp
index 79068b4..34a222f 100644
--- a/clicache/src/Serializable.cpp
+++ b/clicache/src/Serializable.cpp
@@ -154,117 +154,117 @@ namespace Apache
switch (typeId)
{
- case native::DSCode::CacheableByte: {
+ case native::internal::DSCode::CacheableByte: {
return Serializable::getCacheableByte((Byte)key);
}
- case native::DSCode::CacheableBoolean:
+ case native::internal::DSCode::CacheableBoolean:
return Serializable::getCacheableBoolean((bool)key);
- case native::DSCode::CacheableCharacter:
+ case native::internal::DSCode::CacheableCharacter:
return Serializable::getCacheableWideChar((Char)key);
- case native::DSCode::CacheableDouble:
+ case native::internal::DSCode::CacheableDouble:
return Serializable::getCacheableDouble((double)key);
- case native::DSCode::CacheableASCIIString:
+ case native::internal::DSCode::CacheableASCIIString:
return Serializable::GetCacheableString((String^)key);
- case native::DSCode::CacheableFloat:
+ case native::internal::DSCode::CacheableFloat:
return Serializable::getCacheableFloat((float)key);
- case native::DSCode::CacheableInt16: {
+ case native::internal::DSCode::CacheableInt16: {
return Serializable::getCacheableInt16((System::Int16)key);
}
- case native::DSCode::CacheableInt32: {
+ case native::internal::DSCode::CacheableInt32: {
return Serializable::getCacheableInt32((System::Int32)key);
}
- case native::DSCode::CacheableInt64: {
+ case native::internal::DSCode::CacheableInt64: {
return Serializable::getCacheableInt64((System::Int64)key);
}
- case native::DSCode::CacheableBytes:
+ case native::internal::DSCode::CacheableBytes:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableBytes::Create((array<Byte>^)key));
}
- case native::DSCode::CacheableDoubleArray:
+ case native::internal::DSCode::CacheableDoubleArray:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableDoubleArray::Create((array<Double>^)key));
}
- case native::DSCode::CacheableFloatArray:
+ case native::internal::DSCode::CacheableFloatArray:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableFloatArray::Create((array<float>^)key));
}
- case native::DSCode::CacheableInt16Array:
+ case native::internal::DSCode::CacheableInt16Array:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableInt16Array::Create((array<Int16>^)key));
}
- case native::DSCode::CacheableInt32Array:
+ case native::internal::DSCode::CacheableInt32Array:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableInt32Array::Create((array<Int32>^)key));
}
- case native::DSCode::CacheableInt64Array:
+ case native::internal::DSCode::CacheableInt64Array:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableInt64Array::Create((array<Int64>^)key));
}
- case native::DSCode::CacheableStringArray:
+ case native::internal::DSCode::CacheableStringArray:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableStringArray::Create((array<String^>^)key));
}
- case native::DSCode::CacheableFileName:
+ case native::internal::DSCode::CacheableFileName:
{
return GetNativeCacheableKeyWrapperForManagedISerializable((Apache::Geode::Client::CacheableFileName^)key);
}
- case native::DSCode::CacheableHashTable://collection::hashtable
+ case native::internal::DSCode::CacheableHashTable://collection::hashtable
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableHashTable::Create((System::Collections::Hashtable^)key));
}
- case native::DSCode::CacheableHashMap://generic dictionary
+ case native::internal::DSCode::CacheableHashMap://generic dictionary
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableHashMap::Create((System::Collections::IDictionary^)key));
}
- case native::DSCode::CacheableVector://collection::arraylist
+ case native::internal::DSCode::CacheableVector://collection::arraylist
{
return GetNativeCacheableKeyWrapperForManagedISerializable(CacheableVector::Create((System::Collections::IList^)key));
}
- case native::DSCode::CacheableArrayList://generic ilist
+ case native::internal::DSCode::CacheableArrayList://generic ilist
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableArrayList::Create((System::Collections::IList^)key));
}
- case native::DSCode::CacheableLinkedList://generic linked list
+ case native::internal::DSCode::CacheableLinkedList://generic linked list
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableLinkedList::Create((System::Collections::Generic::LinkedList<Object^>^)key));
}
- case native::DSCode::CacheableStack:
+ case native::internal::DSCode::CacheableStack:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableStack::Create((System::Collections::ICollection^)key));
}
- case native::InternalId::CacheableManagedObject:
+ case native::internal::InternalId::CacheableManagedObject:
{
return GetNativeCacheableKeyWrapperForManagedISerializable((Apache::Geode::Client::CacheableObject^)key);
}
- case native::InternalId::CacheableManagedObjectXml:
+ case native::internal::InternalId::CacheableManagedObjectXml:
{
return GetNativeCacheableKeyWrapperForManagedISerializable((Apache::Geode::Client::CacheableObjectXml^)key);
}
- case native::DSCode::CacheableObjectArray:
+ case native::internal::DSCode::CacheableObjectArray:
{
return GetNativeCacheableKeyWrapperForManagedISerializable((Apache::Geode::Client::CacheableObjectArray^)key);
}
- case native::DSCode::CacheableIdentityHashMap:
+ case native::internal::DSCode::CacheableIdentityHashMap:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableIdentityHashMap::Create((System::Collections::IDictionary^)key));
}
- case native::DSCode::CacheableHashSet://no need of it, default case should work
+ case native::internal::DSCode::CacheableHashSet://no need of it, default case should work
{
return GetNativeCacheableKeyWrapperForManagedISerializable((Apache::Geode::Client::CacheableHashSet^)key);
}
- case native::DSCode::CacheableLinkedHashSet://no need of it, default case should work
+ case native::internal::DSCode::CacheableLinkedHashSet://no need of it, default case should work
{
return GetNativeCacheableKeyWrapperForManagedISerializable((Apache::Geode::Client::CacheableLinkedHashSet^)key);
}
- case native::DSCode::CacheableDate:
+ case native::internal::DSCode::CacheableDate:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CacheableDate::Create((System::DateTime)key));
}
- case native::DSCode::BooleanArray:
+ case native::internal::DSCode::BooleanArray:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::BooleanArray::Create((array<bool>^)key));
}
- case native::DSCode::CharArray:
+ case native::internal::DSCode::CharArray:
{
return GetNativeCacheableKeyWrapperForManagedISerializable(Apache::Geode::Client::CharArray::Create((array<Char>^)key));
}
diff --git a/clicache/src/Serializable.hpp b/clicache/src/Serializable.hpp
index 983a175..41aa71c 100644
--- a/clicache/src/Serializable.hpp
+++ b/clicache/src/Serializable.hpp
@@ -42,6 +42,7 @@ namespace Apache
{
namespace Client
{
+ using namespace apache::geode::client;
namespace native = apache::geode::client;
interface class IPdxSerializable;
diff --git a/clicache/src/TypeRegistry.cpp b/clicache/src/TypeRegistry.cpp
index 944aad1..c47eeb6 100644
--- a/clicache/src/TypeRegistry.cpp
+++ b/clicache/src/TypeRegistry.cpp
@@ -327,92 +327,92 @@ namespace Apache
{
switch (dataSerializablePrimitive->getDsCode())
{
- case native::DSCode::CacheableDate:
+ case native::internal::DSCode::CacheableDate:
{
auto ret = SafeGenericUMSerializableConvert<CacheableDate^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableBytes:
+ case native::internal::DSCode::CacheableBytes:
{
auto ret = SafeGenericUMSerializableConvert<CacheableBytes^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableDoubleArray:
+ case native::internal::DSCode::CacheableDoubleArray:
{
auto ret = SafeGenericUMSerializableConvert<CacheableDoubleArray^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableFloatArray:
+ case native::internal::DSCode::CacheableFloatArray:
{
auto ret = SafeGenericUMSerializableConvert<CacheableFloatArray^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableInt16Array:
+ case native::internal::DSCode::CacheableInt16Array:
{
auto ret = SafeGenericUMSerializableConvert<CacheableInt16Array^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableInt32Array:
+ case native::internal::DSCode::CacheableInt32Array:
{
auto ret = SafeGenericUMSerializableConvert<CacheableInt32Array^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableInt64Array:
+ case native::internal::DSCode::CacheableInt64Array:
{
auto ret = SafeGenericUMSerializableConvert<CacheableInt64Array^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableStringArray:
+ case native::internal::DSCode::CacheableStringArray:
{
auto ret = SafeGenericUMSerializableConvert<CacheableStringArray^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->GetValues());
}
- case native::DSCode::CacheableArrayList://Ilist generic
+ case native::internal::DSCode::CacheableArrayList://Ilist generic
{
auto ret = SafeGenericUMSerializableConvert<CacheableArrayList^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableLinkedList://LinkedList generic
+ case native::internal::DSCode::CacheableLinkedList://LinkedList generic
{
auto ret = SafeGenericUMSerializableConvert<CacheableLinkedList^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableHashTable://collection::hashtable
+ case native::internal::DSCode::CacheableHashTable://collection::hashtable
{
auto ret = SafeGenericUMSerializableConvert<CacheableHashTable^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableHashMap://generic dictionary
+ case native::internal::DSCode::CacheableHashMap://generic dictionary
{
auto ret = SafeGenericUMSerializableConvert<CacheableHashMap^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableIdentityHashMap:
+ case native::internal::DSCode::CacheableIdentityHashMap:
{
auto ret = SafeGenericUMSerializableConvert<CacheableIdentityHashMap^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CacheableHashSet://no need of it, default case should work
+ case native::internal::DSCode::CacheableHashSet://no need of it, default case should work
{
auto ret = SafeGenericUMSerializableConvert<CacheableHashSet^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
- case native::DSCode::CacheableLinkedHashSet://no need of it, default case should work
+ case native::internal::DSCode::CacheableLinkedHashSet://no need of it, default case should work
{
auto ret = SafeGenericUMSerializableConvert<CacheableLinkedHashSet^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
- case native::DSCode::CacheableFileName:
+ case native::internal::DSCode::CacheableFileName:
{
auto ret = SafeGenericUMSerializableConvert<CacheableFileName^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
- case native::DSCode::CacheableObjectArray:
+ case native::internal::DSCode::CacheableObjectArray:
{
auto ret = SafeGenericUMSerializableConvert<CacheableObjectArray^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
- case native::DSCode::CacheableVector://collection::arraylist
+ case native::internal::DSCode::CacheableVector://collection::arraylist
{
auto ret = SafeGenericUMSerializableConvert<CacheableVector^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
@@ -426,34 +426,34 @@ namespace Apache
{
return safe_cast<TValue>(Struct::Create(dataSerializablePrimitive));
}
- case native::DSCode::CacheableStack:
+ case native::internal::DSCode::CacheableStack:
{
auto ret = SafeGenericUMSerializableConvert<CacheableStack^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::InternalId::CacheableManagedObject:
+ case native::internal::InternalId::CacheableManagedObject:
{
auto ret = SafeGenericUMSerializableConvert<CacheableObject^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
- case native::InternalId::CacheableManagedObjectXml:
+ case native::internal::InternalId::CacheableManagedObjectXml:
{
auto ret = SafeGenericUMSerializableConvert<CacheableObjectXml^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
/*
- case native::DSCode::Properties: // TODO: replace with IDictionary<K, V>
+ case native::internal::DSCode::Properties: // TODO: replace with IDictionary<K, V>
{
auto ret = SafeGenericUMSerializableConvert<Properties<Object^, Object^>^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret);
}
*/
- case native::DSCode::BooleanArray:
+ case native::internal::DSCode::BooleanArray:
{
auto ret = SafeGenericUMSerializableConvert<BooleanArray^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
}
- case native::DSCode::CharArray:
+ case native::internal::DSCode::CharArray:
{
auto ret = SafeGenericUMSerializableConvert<CharArray^>(dataSerializablePrimitive);
return safe_cast<TValue>(ret->Value);
@@ -480,42 +480,42 @@ namespace Apache
{
switch (dataSerializablePrimitive->getDsCode())
{
- case native::DSCode::CacheableByte:
+ case native::internal::DSCode::CacheableByte:
{
return safe_cast<TValue>(Serializable::getByte(dataSerializablePrimitive));
}
- case native::DSCode::CacheableBoolean:
+ case native::internal::DSCode::CacheableBoolean:
{
return safe_cast<TValue>(Serializable::getBoolean(dataSerializablePrimitive));
}
- case native::DSCode::CacheableCharacter:
+ case native::internal::DSCode::CacheableCharacter:
{
return safe_cast<TValue>(Serializable::getChar(dataSerializablePrimitive));
}
- case native::DSCode::CacheableDouble:
+ case native::internal::DSCode::CacheableDouble:
{
return safe_cast<TValue>(Serializable::getDouble(dataSerializablePrimitive));
}
- case native::DSCode::CacheableASCIIString:
- case native::DSCode::CacheableASCIIStringHuge:
- case native::DSCode::CacheableString:
- case native::DSCode::CacheableStringHuge:
+ case native::internal::DSCode::CacheableASCIIString:
+ case native::internal::DSCode::CacheableASCIIStringHuge:
+ case native::internal::DSCode::CacheableString:
+ case native::internal::DSCode::CacheableStringHuge:
{
return safe_cast<TValue>(Serializable::getString(dataSerializablePrimitive));
}
- case native::DSCode::CacheableFloat:
+ case native::internal::DSCode::CacheableFloat:
{
return safe_cast<TValue>(Serializable::getFloat(dataSerializablePrimitive));
}
- case native::DSCode::CacheableInt16:
+ case native::internal::DSCode::CacheableInt16:
{
return safe_cast<TValue>(Serializable::getInt16(dataSerializablePrimitive));
}
- case native::DSCode::CacheableInt32:
+ case native::internal::DSCode::CacheableInt32:
{
return safe_cast<TValue>(Serializable::getInt32(dataSerializablePrimitive));
}
- case native::DSCode::CacheableInt64:
+ case native::internal::DSCode::CacheableInt64:
{
return safe_cast<TValue>(Serializable::getInt64(dataSerializablePrimitive));
}
@@ -705,39 +705,39 @@ namespace Apache
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableByte::Create),
- static_cast<int8_t>(native::DSCode::CacheableByte), Byte::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableByte), Byte::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableBoolean::Create),
- static_cast<int8_t>(native::DSCode::CacheableBoolean), Boolean::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableBoolean), Boolean::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableCharacter::Create),
- static_cast<int8_t>(native::DSCode::CacheableCharacter), Char::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableCharacter), Char::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableDouble::Create),
- static_cast<int8_t>(native::DSCode::CacheableDouble), Double::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableDouble), Double::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableString::Create),
- static_cast<int8_t>(native::DSCode::CacheableASCIIString), String::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableASCIIString), String::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableFloat::Create),
- static_cast<int8_t>(native::DSCode::CacheableFloat), float::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableFloat), float::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableInt16::Create),
- static_cast<int8_t>(native::DSCode::CacheableInt16), Int16::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableInt16), Int16::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableInt32::Create),
- static_cast<int8_t>(native::DSCode::CacheableInt32), Int32::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableInt32), Int32::typeid);
RegisterDataSerializablePrimitiveWrapper(
gcnew DataSerializablePrimitiveWrapperDelegate(CacheableInt64::Create),
- static_cast<int8_t>(native::DSCode::CacheableInt64), Int64::typeid);
+ static_cast<int8_t>(native::internal::DSCode::CacheableInt64), Int64::typeid);
}
} // namespace Client
diff --git a/clicache/src/TypeRegistry.hpp b/clicache/src/TypeRegistry.hpp
index 3d22d6e..7729c27 100644
--- a/clicache/src/TypeRegistry.hpp
+++ b/clicache/src/TypeRegistry.hpp
@@ -275,44 +275,44 @@ namespace Apache
static void InitializeManagedTypeToDsCode()
{
Dictionary<Object^, Object^>^ dic = gcnew Dictionary<Object^, Object^>();
- ManagedTypeToDsCode[dic->GetType()] = static_cast<int8_t>(native::DSCode::CacheableHashMap);
- ManagedTypeToDsCode[dic->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::DSCode::CacheableHashMap);
+ ManagedTypeToDsCode[dic->GetType()] = static_cast<int8_t>(native::internal::DSCode::CacheableHashMap);
+ ManagedTypeToDsCode[dic->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::internal::DSCode::CacheableHashMap);
System::Collections::ArrayList^ arr = gcnew System::Collections::ArrayList();
- ManagedTypeToDsCode[arr->GetType()] = static_cast<int8_t>(native::DSCode::CacheableVector);
+ ManagedTypeToDsCode[arr->GetType()] = static_cast<int8_t>(native::internal::DSCode::CacheableVector);
System::Collections::Generic::LinkedList<Object^>^ linketList = gcnew System::Collections::Generic::LinkedList<Object^>();
- ManagedTypeToDsCode[linketList->GetType()] = static_cast<int8_t>(native::DSCode::CacheableLinkedList);
- ManagedTypeToDsCode[linketList->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::DSCode::CacheableLinkedList);
+ ManagedTypeToDsCode[linketList->GetType()] = static_cast<int8_t>(native::internal::DSCode::CacheableLinkedList);
+ ManagedTypeToDsCode[linketList->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::internal::DSCode::CacheableLinkedList);
System::Collections::Generic::IList<Object^>^ iList = gcnew System::Collections::Generic::List<Object^>();
- ManagedTypeToDsCode[iList->GetType()] = static_cast<int8_t>(native::DSCode::CacheableArrayList);
- ManagedTypeToDsCode[iList->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::DSCode::CacheableArrayList);
+ ManagedTypeToDsCode[iList->GetType()] = static_cast<int8_t>(native::internal::DSCode::CacheableArrayList);
+ ManagedTypeToDsCode[iList->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::internal::DSCode::CacheableArrayList);
//TODO: Linked list, non generic stack, some other map types and see if more
System::Collections::Generic::Stack<Object^>^ stack = gcnew System::Collections::Generic::Stack<Object^>();
- ManagedTypeToDsCode[stack->GetType()] = static_cast<int8_t>(native::DSCode::CacheableStack);
- ManagedTypeToDsCode[stack->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::DSCode::CacheableStack);
-
- ManagedTypeToDsCode[Byte::typeid] = static_cast<int8_t>(native::DSCode::CacheableByte);
- ManagedTypeToDsCode[Boolean::typeid] = static_cast<int8_t>(native::DSCode::CacheableBoolean);
- ManagedTypeToDsCode[Char::typeid] = static_cast<int8_t>(native::DSCode::CacheableCharacter);
- ManagedTypeToDsCode[Double::typeid] = static_cast<int8_t>(native::DSCode::CacheableDouble);
- ManagedTypeToDsCode[String::typeid] = static_cast<int8_t>(native::DSCode::CacheableASCIIString);
- ManagedTypeToDsCode[float::typeid] = static_cast<int8_t>(native::DSCode::CacheableFloat);
- ManagedTypeToDsCode[Int16::typeid] = static_cast<int8_t>(native::DSCode::CacheableInt16);
- ManagedTypeToDsCode[Int32::typeid] = static_cast<int8_t>(native::DSCode::CacheableInt32);
- ManagedTypeToDsCode[Int64::typeid] = static_cast<int8_t>(native::DSCode::CacheableInt64);
- ManagedTypeToDsCode[Type::GetType("System.Byte[]")] = static_cast<int8_t>(native::DSCode::CacheableBytes);
- ManagedTypeToDsCode[Type::GetType("System.Double[]")] = static_cast<int8_t>(native::DSCode::CacheableDoubleArray);
- ManagedTypeToDsCode[Type::GetType("System.Single[]")] = static_cast<int8_t>(native::DSCode::CacheableFloatArray);
- ManagedTypeToDsCode[Type::GetType("System.Int16[]")] = static_cast<int8_t>(native::DSCode::CacheableInt16Array);
- ManagedTypeToDsCode[Type::GetType("System.Int32[]")] = static_cast<int8_t>(native::DSCode::CacheableInt32Array);
- ManagedTypeToDsCode[Type::GetType("System.Int64[]")] = static_cast<int8_t>(native::DSCode::CacheableInt64Array);
- ManagedTypeToDsCode[Type::GetType("System.String[]")] = static_cast<int8_t>(native::DSCode::CacheableStringArray);
- ManagedTypeToDsCode[Type::GetType("System.DateTime")] = static_cast<int8_t>(native::DSCode::CacheableDate);
- ManagedTypeToDsCode[Type::GetType("System.Collections.Hashtable")] = static_cast<int8_t>(native::DSCode::CacheableHashTable);
+ ManagedTypeToDsCode[stack->GetType()] = static_cast<int8_t>(native::internal::DSCode::CacheableStack);
+ ManagedTypeToDsCode[stack->GetType()->GetGenericTypeDefinition()] = static_cast<int8_t>(native::internal::DSCode::CacheableStack);
+
+ ManagedTypeToDsCode[Byte::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableByte);
+ ManagedTypeToDsCode[Boolean::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableBoolean);
+ ManagedTypeToDsCode[Char::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableCharacter);
+ ManagedTypeToDsCode[Double::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableDouble);
+ ManagedTypeToDsCode[String::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableASCIIString);
+ ManagedTypeToDsCode[float::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableFloat);
+ ManagedTypeToDsCode[Int16::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableInt16);
+ ManagedTypeToDsCode[Int32::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableInt32);
+ ManagedTypeToDsCode[Int64::typeid] = static_cast<int8_t>(native::internal::DSCode::CacheableInt64);
+ ManagedTypeToDsCode[Type::GetType("System.Byte[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableBytes);
+ ManagedTypeToDsCode[Type::GetType("System.Double[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableDoubleArray);
+ ManagedTypeToDsCode[Type::GetType("System.Single[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableFloatArray);
+ ManagedTypeToDsCode[Type::GetType("System.Int16[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableInt16Array);
+ ManagedTypeToDsCode[Type::GetType("System.Int32[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableInt32Array);
+ ManagedTypeToDsCode[Type::GetType("System.Int64[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableInt64Array);
+ ManagedTypeToDsCode[Type::GetType("System.String[]")] = static_cast<int8_t>(native::internal::DSCode::CacheableStringArray);
+ ManagedTypeToDsCode[Type::GetType("System.DateTime")] = static_cast<int8_t>(native::internal::DSCode::CacheableDate);
+ ManagedTypeToDsCode[Type::GetType("System.Collections.Hashtable")] = static_cast<int8_t>(native::internal::DSCode::CacheableHashTable);
}
static void RegisterDataSerializablePrimitivesWrapNativeDeserialization();
diff --git a/clicache/src/impl/PdxInstanceImpl.hpp b/clicache/src/impl/PdxInstanceImpl.hpp
index a3eb779..5afd840 100755
--- a/clicache/src/impl/PdxInstanceImpl.hpp
+++ b/clicache/src/impl/PdxInstanceImpl.hpp
@@ -67,8 +67,8 @@ namespace Apache
static array<SByte>^ Float_DefaultBytes = gcnew array<SByte>{0, 0, 0, 0};
static array<SByte>^ Double_DefaultBytes = gcnew array<SByte>{0, 0, 0, 0, 0, 0, 0, 0};
static array<SByte>^ Date_DefaultBytes = gcnew array<SByte>{-1, -1, -1, -1, -1, -1, -1, -1};
- static array<SByte>^ String_DefaultBytes = gcnew array<SByte>{static_cast<SByte>(apache::geode::client::DSCode::CacheableNullString)};
- static array<SByte>^ Object_DefaultBytes = gcnew array<SByte>{static_cast<SByte>(apache::geode::client::DSCode::NullObj)};
+ static array<SByte>^ String_DefaultBytes = gcnew array<SByte>{static_cast<SByte>(apache::geode::client::internal::DSCode::CacheableNullString)};
+ static array<SByte>^ Object_DefaultBytes = gcnew array<SByte>{static_cast<SByte>(apache::geode::client::internal::DSCode::NullObj)};
static array<SByte>^ NULL_ARRAY_DefaultBytes = gcnew array<SByte>{-1};
static PdxFieldType^ Default_PdxFieldType = gcnew PdxFieldType("default", "default", -1,
diff --git a/cppcache/CMakeLists.txt b/cppcache/CMakeLists.txt
index 345d5af..d3da5c1 100644
--- a/cppcache/CMakeLists.txt
+++ b/cppcache/CMakeLists.txt
@@ -62,6 +62,11 @@ set(SOURCES_ALL ${SOURCES} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS} ${CONFIGURE_IN_F
add_library(_apache-geode INTERFACE)
+target_compile_definitions(_apache-geode INTERFACE
+ __STDC_FORMAT_MACROS
+ BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
+)
+
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
target_link_libraries(_apache-geode INTERFACE
demangle
diff --git a/cppcache/include/geode/CacheableBuiltins.hpp b/cppcache/include/geode/CacheableBuiltins.hpp
index 5b2edcf..495e2d9 100644
--- a/cppcache/include/geode/CacheableBuiltins.hpp
+++ b/cppcache/include/geode/CacheableBuiltins.hpp
@@ -37,6 +37,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DataSerializablePrimitive;
+
/** Template CacheableKey class for primitive types. */
template <typename TObj, DSCode TYPEID, const char* TYPENAME>
class APACHE_GEODE_EXPORT CacheableKeyType : public DataSerializablePrimitive,
diff --git a/cppcache/include/geode/CacheableDate.hpp b/cppcache/include/geode/CacheableDate.hpp
index 04d3a7b..4c14de7 100644
--- a/cppcache/include/geode/CacheableDate.hpp
+++ b/cppcache/include/geode/CacheableDate.hpp
@@ -40,8 +40,9 @@ namespace client {
* can serve as a distributable key object for caching as well as being a date
* value.
*/
-class APACHE_GEODE_EXPORT CacheableDate : public DataSerializablePrimitive,
- public CacheableKey {
+class APACHE_GEODE_EXPORT CacheableDate
+ : public internal::DataSerializablePrimitive,
+ public CacheableKey {
private:
/**
* Milliseconds since January 1, 1970, 00:00:00 GMT to be consistent with Java
diff --git a/cppcache/include/geode/CacheableEnum.hpp b/cppcache/include/geode/CacheableEnum.hpp
index 825e004..0ad0d3a 100644
--- a/cppcache/include/geode/CacheableEnum.hpp
+++ b/cppcache/include/geode/CacheableEnum.hpp
@@ -50,8 +50,9 @@ class DataInput;
class DataOutput;
class Serializable;
-class APACHE_GEODE_EXPORT CacheableEnum : public DataSerializablePrimitive,
- public CacheableKey {
+class APACHE_GEODE_EXPORT CacheableEnum
+ : public internal::DataSerializablePrimitive,
+ public CacheableKey {
private:
std::string m_enumClassName;
std::string m_enumName;
diff --git a/cppcache/include/geode/CacheableKey.hpp b/cppcache/include/geode/CacheableKey.hpp
index 374f82b..7d90dbe 100644
--- a/cppcache/include/geode/CacheableKey.hpp
+++ b/cppcache/include/geode/CacheableKey.hpp
@@ -103,7 +103,8 @@ class APACHE_GEODE_EXPORT CacheableKey : public virtual Cacheable {
void operator=(const CacheableKey& other);
};
-using namespace apache::geode::client::internal;
+using apache::geode::client::internal::dereference_equal_to;
+using apache::geode::client::internal::dereference_hash;
using HashMapOfCacheable =
std::unordered_map<std::shared_ptr<CacheableKey>,
diff --git a/cppcache/include/geode/CacheableString.hpp b/cppcache/include/geode/CacheableString.hpp
index 652c6c3..5d9395f 100644
--- a/cppcache/include/geode/CacheableString.hpp
+++ b/cppcache/include/geode/CacheableString.hpp
@@ -32,6 +32,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSCode;
+
/**
* Implement a immutable C string wrapper that can serve as a distributable
* key object for caching as well as being a string value.
@@ -41,7 +43,7 @@ class APACHE_GEODE_EXPORT CacheableString
public CacheableKey {
protected:
std::string m_str;
- internal::DSCode m_type;
+ DSCode m_type;
mutable int m_hashcode;
public:
diff --git a/cppcache/include/geode/Properties.hpp b/cppcache/include/geode/Properties.hpp
index e9e9a66..72b68dc 100644
--- a/cppcache/include/geode/Properties.hpp
+++ b/cppcache/include/geode/Properties.hpp
@@ -37,7 +37,7 @@ namespace apache {
namespace geode {
namespace client {
-using namespace apache::geode::internal::chrono::duration;
+using apache::geode::internal::chrono::duration::to_string;
class DataInput;
class DataOutput;
@@ -149,8 +149,7 @@ class APACHE_GEODE_EXPORT Properties
void fromData(DataInput& input) override;
- DSCode getDsCode() const override;
-
+ internal::DSCode getDsCode() const override;
private:
HashMapOfCacheable m_map;
diff --git a/cppcache/include/geode/Struct.hpp b/cppcache/include/geode/Struct.hpp
index 05995f3..5aed9d0 100644
--- a/cppcache/include/geode/Struct.hpp
+++ b/cppcache/include/geode/Struct.hpp
@@ -47,7 +47,7 @@ class StructSet;
* is obtained from a Cache.
*/
class APACHE_GEODE_EXPORT Struct
- : public internal::DataSerializableFixedId_t<DSFid::Struct> {
+ : public internal::DataSerializableFixedId_t<internal::DSFid::Struct> {
public:
typedef std::vector<std::shared_ptr<Serializable>>::iterator iterator;
diff --git a/cppcache/integration-test-2/EnableChunkHandlerThreadTest.cpp b/cppcache/integration-test-2/EnableChunkHandlerThreadTest.cpp
index e8ff4fd..3f16fd0 100644
--- a/cppcache/integration-test-2/EnableChunkHandlerThreadTest.cpp
+++ b/cppcache/integration-test-2/EnableChunkHandlerThreadTest.cpp
@@ -31,7 +31,10 @@
namespace {
-using namespace apache::geode::client;
+using apache::geode::client::PdxReader;
+using apache::geode::client::PdxSerializable;
+using apache::geode::client::PdxWriter;
+using apache::geode::client::RegionShortcut;
class SerializableWithThreadId : public PdxSerializable {
public:
diff --git a/cppcache/integration-test-2/ExampleTest.cpp b/cppcache/integration-test-2/ExampleTest.cpp
index 9a1da24..2b73921 100644
--- a/cppcache/integration-test-2/ExampleTest.cpp
+++ b/cppcache/integration-test-2/ExampleTest.cpp
@@ -33,8 +33,11 @@
namespace {
-using namespace apache::geode::client;
-using namespace std::chrono;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableString;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+using std::chrono::minutes;
std::shared_ptr<Region> setupRegion(Cache& cache) {
auto region = cache.createRegionFactory(RegionShortcut::PROXY)
diff --git a/cppcache/integration-test-2/PdxInstanceTest.cpp b/cppcache/integration-test-2/PdxInstanceTest.cpp
index 79484b7..1a14b02 100644
--- a/cppcache/integration-test-2/PdxInstanceTest.cpp
+++ b/cppcache/integration-test-2/PdxInstanceTest.cpp
@@ -39,10 +39,20 @@
namespace {
-using namespace apache::geode::client;
-using namespace std::chrono;
-using namespace PdxTests;
-using namespace testobject;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::LocalRegion;
+using apache::geode::client::PdxInstanceFactory;
+using apache::geode::client::PdxSerializable;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+
+using PdxTests::Address;
+using PdxTests::PdxType;
+
+using testobject::ChildPdx;
+using testobject::ParentPdx;
std::shared_ptr<Region> setupRegion(Cache& cache) {
auto region = cache.createRegionFactory(RegionShortcut::PROXY)
@@ -52,8 +62,7 @@ std::shared_ptr<Region> setupRegion(Cache& cache) {
return region;
}
-void clonePdxInstance(PdxTests::PdxType& source,
- PdxInstanceFactory& destination) {
+void clonePdxInstance(PdxType& source, PdxInstanceFactory& destination) {
destination.writeBoolean("m_bool", source.getBool());
destination.markIdentityField("m_bool");
destination.writeByte("m_byte", source.getByte());
diff --git a/cppcache/integration-test-2/RegionPutGetAllTest.cpp b/cppcache/integration-test-2/RegionPutGetAllTest.cpp
index b9726ba..455881d 100644
--- a/cppcache/integration-test-2/RegionPutGetAllTest.cpp
+++ b/cppcache/integration-test-2/RegionPutGetAllTest.cpp
@@ -36,9 +36,23 @@
namespace {
-using namespace apache::geode::client;
-using namespace std::chrono;
-using namespace PdxTests;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+using apache::geode::client::TypeFactoryMethodPdx;
+
+using PdxTests::PdxTypes1;
+using PdxTests::PdxTypes10;
+using PdxTests::PdxTypes2;
+using PdxTests::PdxTypes3;
+using PdxTests::PdxTypes4;
+using PdxTests::PdxTypes5;
+using PdxTests::PdxTypes6;
+using PdxTests::PdxTypes7;
+using PdxTests::PdxTypes8;
+using PdxTests::PdxTypes9;
template <int32_t Index, class PdxType>
struct PdxTypesHelper {
diff --git a/cppcache/integration-test-2/StructTest.cpp b/cppcache/integration-test-2/StructTest.cpp
index 35a5f64..301a642 100644
--- a/cppcache/integration-test-2/StructTest.cpp
+++ b/cppcache/integration-test-2/StructTest.cpp
@@ -35,7 +35,12 @@
namespace {
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableString;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+using apache::geode::client::Struct;
std::shared_ptr<Region> setupRegion(Cache& cache) {
auto region = cache.createRegionFactory(RegionShortcut::PROXY)
diff --git a/cppcache/integration-test-2/framework/Cluster.h b/cppcache/integration-test-2/framework/Cluster.h
index e6a26fb..fb5871e 100644
--- a/cppcache/integration-test-2/framework/Cluster.h
+++ b/cppcache/integration-test-2/framework/Cluster.h
@@ -210,7 +210,8 @@ class Cluster {
apache::geode::client::Cache createCache(const std::unordered_map<std::string, std::string>& properties) {
- using namespace apache::geode::client;
+ using apache::geode::client::CacheFactory;
+
CacheFactory cacheFactory;
for (auto&& property : properties) {
diff --git a/cppcache/integration-test-2/framework/GfshExecute.cpp b/cppcache/integration-test-2/framework/GfshExecute.cpp
index fd3ed34..8a569e9 100644
--- a/cppcache/integration-test-2/framework/GfshExecute.cpp
+++ b/cppcache/integration-test-2/framework/GfshExecute.cpp
@@ -25,11 +25,16 @@
std::mutex g_child_mutex;
#endif
+using boost::process::args;
+using boost::process::child;
+using boost::process::environment;
+using boost::process::ipstream;
+using boost::process::std_err;
+using boost::process::std_out;
+
void GfshExecute::execute(const std::string &command) {
BOOST_LOG_TRIVIAL(info) << "Gfsh::execute: " << command;
- using namespace boost::process;
-
std::vector<std::string> commands;
if (!connection_.empty()) {
commands.push_back("-e");
@@ -65,11 +70,9 @@ void GfshExecute::execute(const std::string &command) {
extractConnectionCommand(command);
}
-boost::process::child GfshExecute::executeChild(
- std::vector<std::string> &commands, boost::process::environment &env,
- boost::process::ipstream &outStream, boost::process::ipstream &errStream) {
- using namespace boost::process;
-
+child GfshExecute::executeChild(std::vector<std::string> &commands,
+ environment &env, ipstream &outStream,
+ ipstream &errStream) {
#if defined(_WINDOWS)
// https://github.com/klemens-morgenstern/boost-process/issues/159
std::lock_guard<std::mutex> guard(g_child_mutex);
diff --git a/cppcache/integration-test/BBNamingContext.cpp b/cppcache/integration-test/BBNamingContext.cpp
index 86fb9c7..1c2a2e9 100644
--- a/cppcache/integration-test/BBNamingContext.cpp
+++ b/cppcache/integration-test/BBNamingContext.cpp
@@ -26,7 +26,10 @@
#define ERR_MAX 10
-using namespace apache::geode::client::testframework;
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
static int hashcode(char* str) {
if (str == nullptr) {
@@ -285,4 +288,9 @@ BBNamingContextServer::~BBNamingContextServer() {
}
}
+} // namespace testframework
+} // namespace client
+} // namespace geode
+} // namespace apache
+
#endif
diff --git a/cppcache/integration-test/BBNamingContext.hpp b/cppcache/integration-test/BBNamingContext.hpp
index b94ad90..b1791ea 100644
--- a/cppcache/integration-test/BBNamingContext.hpp
+++ b/cppcache/integration-test/BBNamingContext.hpp
@@ -27,6 +27,12 @@
// grieve, especially with the stl stuff.
#include <cstdlib>
#include <string>
+
+namespace apache {
+namespace geode {
+namespace client {
+namespace testframework {
+
class BBNamingContextClientImpl;
class BBNamingContextClient {
BBNamingContextClientImpl* m_impl;
@@ -48,4 +54,9 @@ class BBNamingContextServer {
~BBNamingContextServer();
};
+} // namespace testframework
+} // namespace client
+} // namespace geode
+} // namespace apache
+
#endif // GEODE_INTEGRATION_TEST_BBNAMINGCONTEXT_H_
diff --git a/cppcache/integration-test/BuiltinCacheableWrappers.hpp b/cppcache/integration-test/BuiltinCacheableWrappers.hpp
index 38bb6d0..0c7851c 100644
--- a/cppcache/integration-test/BuiltinCacheableWrappers.hpp
+++ b/cppcache/integration-test/BuiltinCacheableWrappers.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_BUILTINCACHEABLEWRAPPERS_H_
-#define GEODE_INTEGRATION_TEST_BUILTINCACHEABLEWRAPPERS_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,11 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_BUILTINCACHEABLEWRAPPERS_H_
+#define GEODE_INTEGRATION_TEST_BUILTINCACHEABLEWRAPPERS_H_
+
#include <limits.h>
#include <cstdlib>
#include <wchar.h>
@@ -35,9 +35,42 @@
#include <geode/CacheableUndefined.hpp>
#include <geode/CacheableObjectArray.hpp>
-using namespace apache::geode::client;
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::CacheableByte;
+using apache::geode::client::CacheableBytes;
+using apache::geode::client::CacheableCharacter;
+using apache::geode::client::CacheableDate;
+using apache::geode::client::CacheableDouble;
+using apache::geode::client::CacheableDoubleArray;
+using apache::geode::client::CacheableFileName;
+using apache::geode::client::CacheableFloat;
+using apache::geode::client::CacheableFloatArray;
+using apache::geode::client::CacheableHashMap;
+using apache::geode::client::CacheableHashSet;
+using apache::geode::client::CacheableHashTable;
+using apache::geode::client::CacheableIdentityHashMap;
+using apache::geode::client::CacheableInt16;
+using apache::geode::client::CacheableInt16Array;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt32Array;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableInt64Array;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableLinkedHashSet;
+using apache::geode::client::CacheableLinkedList;
+using apache::geode::client::CacheableObjectArray;
+using apache::geode::client::CacheableStack;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheableStringArray;
+using apache::geode::client::CacheableUndefined;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Serializable;
+using apache::geode::client::internal::DataSerializablePrimitive;
namespace CacheableHelper {
+
const uint32_t m_crc32Table[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
@@ -358,8 +391,9 @@ class CacheableFileNameWrapper : public CacheableWrapper {
virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
auto&& obj = std::dynamic_pointer_cast<CacheableFileName>(object);
- return (obj ? CacheableHelper::crc32(reinterpret_cast<const uint8_t*>(obj->value().c_str()),
- obj->length())
+ return (obj ? CacheableHelper::crc32(
+ reinterpret_cast<const uint8_t*>(obj->value().c_str()),
+ obj->length())
: 0);
}
};
@@ -515,9 +549,11 @@ class CacheableStringWrapper : public CacheableWrapper {
virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
const CacheableString* obj =
dynamic_cast<const CacheableString*>(object.get());
- return (obj != nullptr ? CacheableHelper::crc32(
- reinterpret_cast<const uint8_t*>(obj->value().c_str()), obj->length())
- : 0);
+ return (obj != nullptr
+ ? CacheableHelper::crc32(
+ reinterpret_cast<const uint8_t*>(obj->value().c_str()),
+ obj->length())
+ : 0);
}
};
@@ -559,8 +595,8 @@ class CacheableHugeStringWrapper : public CacheableWrapper {
const CacheableString* obj =
dynamic_cast<const CacheableString*>(object.get());
ASSERT(obj != nullptr, "getCheckSum: null object.");
- return CacheableHelper::crc32(reinterpret_cast<const uint8_t*>(obj->value().c_str()),
- obj->length());
+ return CacheableHelper::crc32(
+ reinterpret_cast<const uint8_t*>(obj->value().c_str()), obj->length());
}
};
@@ -707,8 +743,7 @@ class CacheableHashMapTypeWrapper : public CacheableWrapper {
for (std::vector<DSCode>::iterator valIter = valTypeIds.begin();
valIter != valTypeIds.end(); valIter++) {
-
- if (CacheableHelper::isContainerTypeId(static_cast<DSCode>(*valIter))) {
+ if (CacheableHelper::isContainerTypeId(static_cast<DSCode>(*valIter))) {
continue;
}
if ((*valIter == DSCode::CacheableASCIIStringHuge ||
@@ -736,7 +771,8 @@ class CacheableHashMapTypeWrapper : public CacheableWrapper {
CacheableWrapperFactory::createInstance(*valIter));
ASSERT(valWrapper != nullptr,
"initRandomValue: valWrapper null object.");
- keyWrapper->initKey(((static_cast<int8_t>(*keyIter)) << 8) + item, maxSize);
+ keyWrapper->initKey(((static_cast<int8_t>(*keyIter)) << 8) + item,
+ maxSize);
valWrapper->initRandomValue(maxSize);
chmp->emplace(
std::dynamic_pointer_cast<CacheableKey>(keyWrapper->getCacheable()),
@@ -847,8 +883,7 @@ class CacheableBytesWrapper : public CacheableWrapper {
// CacheableWrapper members
virtual void initRandomValue(int32_t maxSize) {
- auto randArr =
- CacheableHelper::randomArray<uint8_t>(maxSize, UCHAR_MAX);
+ auto randArr = CacheableHelper::randomArray<uint8_t>(maxSize, UCHAR_MAX);
m_cacheableObject = CacheableBytes::create(
std::vector<int8_t>(std::begin(randArr), std::end(randArr)));
}
@@ -1038,8 +1073,8 @@ class CacheableStringArrayWrapper : public CacheableWrapper {
}
}
m_cacheableObject = CacheableStringArray::create(
- std::vector<std::shared_ptr<CacheableString>>(
- randArr, randArr + arraySize));
+ std::vector<std::shared_ptr<CacheableString>>(randArr,
+ randArr + arraySize));
}
virtual uint32_t getCheckSum(const std::shared_ptr<Cacheable> object) const {
@@ -1098,7 +1133,8 @@ class CacheableVectorTypeWrapper : public CacheableWrapper {
maxSize = maxSize / static_cast<int32_t>(sizeOfTheVector) + 1;
for (size_t i = 0; i < sizeOfTheVector; i++) {
DSCode valueTypeId = valueTypeIds[i];
- if (!CacheableHelper::isContainerTypeId(static_cast<DSCode>(valueTypeId))) {
+ if (!CacheableHelper::isContainerTypeId(
+ static_cast<DSCode>(valueTypeId))) {
auto wrapper = CacheableWrapperFactory::createInstance(valueTypeId);
wrapper->initRandomValue(maxSize);
vec->push_back(wrapper->getCacheable());
@@ -1155,7 +1191,8 @@ class CacheableObjectArrayWrapper : public CacheableWrapper {
maxSize = maxSize / static_cast<int32_t>(sizeOfTheVector) + 1;
for (size_t i = 0; i < sizeOfTheVector; i++) {
DSCode valueTypeId = valueTypeIds[i];
- if (!CacheableHelper::isContainerTypeId(static_cast<DSCode>(valueTypeId))) {
+ if (!CacheableHelper::isContainerTypeId(
+ static_cast<DSCode>(valueTypeId))) {
auto wrapper = CacheableWrapperFactory::createInstance(valueTypeId);
wrapper->initRandomValue(maxSize);
arr->push_back(wrapper->getCacheable());
@@ -1192,14 +1229,12 @@ void registerBuiltins(bool isRegisterFileName = false) {
CacheableWrapperFactory::registerType(DSCode::CacheableBoolean,
"CacheableBoolean",
CacheableBooleanWrapper::create, true);
- CacheableWrapperFactory::registerType(DSCode::CacheableByte,
- "CacheableByte",
+ CacheableWrapperFactory::registerType(DSCode::CacheableByte, "CacheableByte",
CacheableByteWrapper::create, true);
CacheableWrapperFactory::registerType(DSCode::CacheableDouble,
"CacheableDouble",
CacheableDoubleWrapper::create, true);
- CacheableWrapperFactory::registerType(DSCode::CacheableDate,
- "CacheableDate",
+ CacheableWrapperFactory::registerType(DSCode::CacheableDate, "CacheableDate",
CacheableDateWrapper::create, true);
if (isRegisterFileName) {
#ifdef _WIN32
diff --git a/cppcache/integration-test/CacheHelper.cpp b/cppcache/integration-test/CacheHelper.cpp
index e3781ef..3bbf75f 100644
--- a/cppcache/integration-test/CacheHelper.cpp
+++ b/cppcache/integration-test/CacheHelper.cpp
@@ -63,11 +63,12 @@
#define PATH_SEP "/"
#endif
-using namespace apache::geode::client;
-using namespace apache::geode::internal::chrono::duration;
-
extern ClientCleanup gClientCleanup;
+namespace apache {
+namespace geode {
+namespace client {
+
#define RANDOM_NUMBER_OFFSET 14000
#define RANDOM_NUMBER_DIVIDER 15000
std::shared_ptr<Cache> CacheHelper::getCache() { return cachePtr; }
@@ -467,8 +468,7 @@ std::shared_ptr<Pool> CacheHelper::createPool2(
if (servers) {
addServerLocatorEPs(servers, poolFac, false);
// do region creation with end
- }
- else if (locators) {
+ } else if (locators) {
addServerLocatorEPs(locators, poolFac);
if (serverGroup) {
poolFac.setServerGroup(serverGroup);
@@ -490,7 +490,8 @@ std::shared_ptr<Pool> CacheHelper::createPool2(
}
void CacheHelper::logPoolAttributes(std::shared_ptr<Pool>& pool) {
- using namespace apache::geode::internal::chrono::duration;
+ using apache::geode::internal::chrono::duration::to_string;
+
LOG("logPoolAttributes() entered");
LOGINFO("CPPTEST: Pool attributes for pool %s are as follows" +
pool->getName());
@@ -1908,3 +1909,7 @@ std::string CacheHelper::generateGeodeProperties(
LOG(geodeFile.c_str());
return geodeFile;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/integration-test/CacheHelper.hpp b/cppcache/integration-test/CacheHelper.hpp
index fc5ed00..0d999ae 100644
--- a/cppcache/integration-test/CacheHelper.hpp
+++ b/cppcache/integration-test/CacheHelper.hpp
@@ -44,7 +44,9 @@
#define ROOT_SCOPE LOCAL
#endif
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
class CacheHelper {
public:
@@ -393,4 +395,8 @@ int CacheHelper::staticLocatorHostPort2 = CacheHelper::getRandomAvailablePort();
int CacheHelper::staticLocatorHostPort3 = CacheHelper::getRandomAvailablePort();
#endif
+} // namespace client
+} // namespace geode
+} // namespace apache
+
#endif // GEODE_INTEGRATION_TEST_CACHEHELPER_H_
diff --git a/cppcache/integration-test/CacheImplHelper.hpp b/cppcache/integration-test/CacheImplHelper.hpp
index d5d5e91..7f449ca 100644
--- a/cppcache/integration-test/CacheImplHelper.hpp
+++ b/cppcache/integration-test/CacheImplHelper.hpp
@@ -33,8 +33,11 @@ ROOT_NAME++ + DEFINE ROOT_NAME before including CacheHelper.hpp
#define ROOT_SCOPE LOCAL
#endif
- using namespace apache::geode::client;
-using namespace unitTests;
+ using apache::geode::client::Properties;
+using apache::geode::client::Properties;
+using apache::geode::client::RegionAttributesFactory;
+
+using unitTests::TestUtils;
class CacheImplHelper : public CacheHelper {
public:
diff --git a/cppcache/integration-test/CacheableWrapper.hpp b/cppcache/integration-test/CacheableWrapper.hpp
index eb51961..249abe1 100644
--- a/cppcache/integration-test/CacheableWrapper.hpp
+++ b/cppcache/integration-test/CacheableWrapper.hpp
@@ -26,7 +26,9 @@
#include <geode/CacheableBuiltins.hpp>
-using namespace apache::geode::client;
+using apache::geode::client::Cacheable;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::internal::DSCode;
class CacheableWrapper {
protected:
diff --git a/cppcache/integration-test/DeltaEx.hpp b/cppcache/integration-test/DeltaEx.hpp
index e66b4dc..7bc586b 100644
--- a/cppcache/integration-test/DeltaEx.hpp
+++ b/cppcache/integration-test/DeltaEx.hpp
@@ -30,6 +30,15 @@
#include "CacheHelper.hpp"
+using apache::geode::client::DataInput;
+using apache::geode::client::DataOutput;
+using apache::geode::client::DataSerializable;
+using apache::geode::client::Delta;
+using apache::geode::client::InvalidDeltaException;
+using apache::geode::client::PdxReader;
+using apache::geode::client::PdxSerializable;
+using apache::geode::client::PdxWriter;
+
class DeltaEx : public DataSerializable, public Delta {
public:
int counter;
diff --git a/cppcache/integration-test/LocatorHelper.hpp b/cppcache/integration-test/LocatorHelper.hpp
index b68d7f4..2223ae9 100644
--- a/cppcache/integration-test/LocatorHelper.hpp
+++ b/cppcache/integration-test/LocatorHelper.hpp
@@ -22,6 +22,9 @@
#ifndef SERVER2
#define SERVER2 s2p2
#endif
+
+using apache::geode::client::CacheHelper;
+
DUNIT_TASK_DEFINITION(SERVER1, CreateLocator1)
{
// starting locator
diff --git a/cppcache/integration-test/QueryHelper.hpp b/cppcache/integration-test/QueryHelper.hpp
index 2f880e4..ce4920b 100644
--- a/cppcache/integration-test/QueryHelper.hpp
+++ b/cppcache/integration-test/QueryHelper.hpp
@@ -38,6 +38,8 @@
#include "testobject/PortfolioPdx.hpp"
#include "testobject/PositionPdx.hpp"
#include <hacks/range.h>
+#include "QueryStrings.hpp"
+#include "fw_dunit.hpp"
//#include <geode/Struct.hpp>
@@ -49,10 +51,23 @@
#define ROOT_SCOPE LOCAL
#endif
-using namespace apache::geode::client;
-using namespace testData;
-using namespace PdxTests;
-using namespace testobject;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableStringArray;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Region;
+using apache::geode::client::ResultSet;
+using apache::geode::client::SelectResults;
+using apache::geode::client::Struct;
+using apache::geode::client::StructSet;
+using testData::constantExpectedRowsPQRS;
+using testData::constantExpectedRowsRS;
+using testData::constantExpectedRowsSS;
+using testData::constantExpectedRowsSSPQ;
+using testobject::Portfolio;
+using testobject::PortfolioPdx;
+using testobject::Position;
+using testobject::PositionPdx;
+
class QueryHelper {
public:
static QueryHelper* singleton;
diff --git a/cppcache/integration-test/TallyListener.hpp b/cppcache/integration-test/TallyListener.hpp
index e69b19a..0207ca9 100644
--- a/cppcache/integration-test/TallyListener.hpp
+++ b/cppcache/integration-test/TallyListener.hpp
@@ -24,7 +24,12 @@
#include <string>
#include <util/Log.hpp>
-using namespace apache::geode::client;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheListener;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::RegionEvent;
class TallyListener : public CacheListener {
private:
diff --git a/cppcache/integration-test/TallyLoader.hpp b/cppcache/integration-test/TallyLoader.hpp
index 589f749..43ddd54 100644
--- a/cppcache/integration-test/TallyLoader.hpp
+++ b/cppcache/integration-test/TallyLoader.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_TALLYLOADER_H_
-#define GEODE_INTEGRATION_TEST_TALLYLOADER_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,10 +15,17 @@
* limitations under the License.
*/
-using namespace apache::geode::client;
-using namespace test;
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_TALLYLOADER_H_
+#define GEODE_INTEGRATION_TEST_TALLYLOADER_H_
-class TallyLoader;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheLoader;
+using apache::geode::client::Region;
+using apache::geode::client::Serializable;
class TallyLoader : virtual public CacheLoader {
private:
diff --git a/cppcache/integration-test/TallyWriter.hpp b/cppcache/integration-test/TallyWriter.hpp
index 679539b..611b0e5 100644
--- a/cppcache/integration-test/TallyWriter.hpp
+++ b/cppcache/integration-test/TallyWriter.hpp
@@ -20,10 +20,15 @@
#ifndef GEODE_INTEGRATION_TEST_TALLYWRITER_H_
#define GEODE_INTEGRATION_TEST_TALLYWRITER_H_
+#include <geode/CacheableKey.hpp>
#include <geode/CacheWriter.hpp>
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheWriter;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::Region;
+using apache::geode::client::RegionEvent;
class TallyWriter : virtual public CacheWriter {
private:
diff --git a/cppcache/integration-test/ThinClientDistOps.hpp b/cppcache/integration-test/ThinClientDistOps.hpp
index 4ee40f3..3990e9f 100644
--- a/cppcache/integration-test/ThinClientDistOps.hpp
+++ b/cppcache/integration-test/ThinClientDistOps.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTDISTOPS_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTDISTOPS_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,12 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
- * ThinClientDistOps.hpp
- *
- * Created on: Oct 22, 2008
- * Author: abhaware
- */
+
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTDISTOPS_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTDISTOPS_H_
#include "fw_dunit.hpp"
#include <ace/OS.h>
@@ -38,15 +32,23 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
#define CREATE_TWICE_KEY "__create_twice_key"
#define CREATE_TWICE_VALUE "__create_twice_value"
+
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheServerException;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::Properties;
+
CacheHelper* cacheHelper = nullptr;
static bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/ThinClientDistOps2.hpp b/cppcache/integration-test/ThinClientDistOps2.hpp
index 5d48566..d8371ad 100644
--- a/cppcache/integration-test/ThinClientDistOps2.hpp
+++ b/cppcache/integration-test/ThinClientDistOps2.hpp
@@ -31,14 +31,22 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheServerException;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::Properties;
+
static bool isLocalServer = false;
static bool isLocator = false;
static int numberOfLocators = 0;
diff --git a/cppcache/integration-test/ThinClientDurable.hpp b/cppcache/integration-test/ThinClientDurable.hpp
index 29a89f8..5edccc2 100644
--- a/cppcache/integration-test/ThinClientDurable.hpp
+++ b/cppcache/integration-test/ThinClientDurable.hpp
@@ -52,6 +52,11 @@ Client 1 is with R =0 and Client 2 with R = 1
#define SERVER1 s2p1
#define FEEDER s2p2
+using apache::geode::client::EntryEvent;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::RegionEvent;
+
class OperMonitor : public CacheListener {
int m_ops;
HashMapOfCacheable m_map;
diff --git a/cppcache/integration-test/ThinClientDurableFailover.hpp b/cppcache/integration-test/ThinClientDurableFailover.hpp
index 90c1eb3..2da31d4 100644
--- a/cppcache/integration-test/ThinClientDurableFailover.hpp
+++ b/cppcache/integration-test/ThinClientDurableFailover.hpp
@@ -51,6 +51,11 @@ Shutdown
#define SERVER1 s2p1
#define FEEDER s2p2
+using apache::geode::client::EntryEvent;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::RegionEvent;
+
class OperMonitor : public CacheListener {
int m_ops;
HashMapOfCacheable m_map;
diff --git a/cppcache/integration-test/ThinClientDurableInterest.hpp b/cppcache/integration-test/ThinClientDurableInterest.hpp
index 99d5d0c..fd5f08a 100644
--- a/cppcache/integration-test/ThinClientDurableInterest.hpp
+++ b/cppcache/integration-test/ThinClientDurableInterest.hpp
@@ -44,6 +44,10 @@ recieved.
#define SERVER1 s2p1
#define FEEDER s2p2
+using apache::geode::client::EntryEvent;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::RegionEvent;
+
class OperMonitor : public CacheListener {
int m_ops;
HashMapOfCacheable m_map;
diff --git a/cppcache/integration-test/ThinClientDurableReconnect.hpp b/cppcache/integration-test/ThinClientDurableReconnect.hpp
index 863a15f..9d39491 100644
--- a/cppcache/integration-test/ThinClientDurableReconnect.hpp
+++ b/cppcache/integration-test/ThinClientDurableReconnect.hpp
@@ -38,6 +38,8 @@
#define SERVER1 s2p1
#define FEEDER s2p2
+using apache::geode::client::EntryEvent;
+
class OperMonitor : public CacheListener {
bool m_first, m_second, m_close;
diff --git a/cppcache/integration-test/ThinClientFailover.hpp b/cppcache/integration-test/ThinClientFailover.hpp
index 8773b2c..7611681 100644
--- a/cppcache/integration-test/ThinClientFailover.hpp
+++ b/cppcache/integration-test/ThinClientFailover.hpp
@@ -30,8 +30,10 @@
#define ROOT_SCOPE DISTRIBUTED_ACK
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientFailover2.hpp b/cppcache/integration-test/ThinClientFailover2.hpp
index 792c0f7..96e0dd0 100644
--- a/cppcache/integration-test/ThinClientFailover2.hpp
+++ b/cppcache/integration-test/ThinClientFailover2.hpp
@@ -31,8 +31,10 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+
/*
* This test for client failover with client notification.
*/
diff --git a/cppcache/integration-test/ThinClientFailover3.hpp b/cppcache/integration-test/ThinClientFailover3.hpp
index f54bece..64f2484 100644
--- a/cppcache/integration-test/ThinClientFailover3.hpp
+++ b/cppcache/integration-test/ThinClientFailover3.hpp
@@ -31,8 +31,9 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
bool isLocalServer = false;
const char *endPoints = CacheHelper::getTcrEndpoints(isLocalServer, 3);
diff --git a/cppcache/integration-test/ThinClientFailoverInterest.hpp b/cppcache/integration-test/ThinClientFailoverInterest.hpp
index 63def94..ae2373f 100644
--- a/cppcache/integration-test/ThinClientFailoverInterest.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterest.hpp
@@ -30,8 +30,9 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientFailoverInterest2.hpp b/cppcache/integration-test/ThinClientFailoverInterest2.hpp
index eefb9f7..57a103c 100644
--- a/cppcache/integration-test/ThinClientFailoverInterest2.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterest2.hpp
@@ -30,8 +30,9 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp b/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
index 3637f3b..0675bb9 100644
--- a/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
+++ b/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
@@ -29,8 +29,9 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientFailoverRegex.hpp b/cppcache/integration-test/ThinClientFailoverRegex.hpp
index c3078db..43eff8d 100644
--- a/cppcache/integration-test/ThinClientFailoverRegex.hpp
+++ b/cppcache/integration-test/ThinClientFailoverRegex.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTFAILOVERREGEX_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTFAILOVERREGEX_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,11 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTFAILOVERREGEX_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTFAILOVERREGEX_H_
+
#include "fw_dunit.hpp"
#include <ace/OS.h>
#include <ace/High_Res_Timer.h>
@@ -30,8 +30,9 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientGatewayTest.hpp b/cppcache/integration-test/ThinClientGatewayTest.hpp
index 507829a..9002507 100644
--- a/cppcache/integration-test/ThinClientGatewayTest.hpp
+++ b/cppcache/integration-test/ThinClientGatewayTest.hpp
@@ -31,8 +31,6 @@
#define CLIENT1 s1p1
#define CLIENT2 s1p2
-using namespace apache::geode::client;
-using namespace test;
#include <string>
diff --git a/cppcache/integration-test/ThinClientHeapLRU.hpp b/cppcache/integration-test/ThinClientHeapLRU.hpp
index be72e61..3e5e828 100644
--- a/cppcache/integration-test/ThinClientHeapLRU.hpp
+++ b/cppcache/integration-test/ThinClientHeapLRU.hpp
@@ -32,8 +32,6 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
diff --git a/cppcache/integration-test/ThinClientHelper.hpp b/cppcache/integration-test/ThinClientHelper.hpp
index 194d9f1..e86d622 100644
--- a/cppcache/integration-test/ThinClientHelper.hpp
+++ b/cppcache/integration-test/ThinClientHelper.hpp
@@ -42,8 +42,16 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace unitTests;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheListener;
+using apache::geode::client::DiskPolicyType;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::Pool;
+using apache::geode::client::Properties;
+using apache::geode::client::RegionAttributesFactory;
+using apache::geode::client::Serializable;
+using unitTests::TestUtils;
CacheHelper* cacheHelper = nullptr;
@@ -396,7 +404,8 @@ std::shared_ptr<Region> createOverflowRegion(const char* name, bool,
"SqLiteRegionData" +
std::to_string(static_cast<long long int>(ACE_OS::getpid()));
sqLiteProps->insert("PersistenceDirectory", sqlite_dir.c_str());
- regionAttributesFactory.setPersistenceManager("SqLiteImpl", "createSqLiteInstance", sqLiteProps);
+ regionAttributesFactory.setPersistenceManager(
+ "SqLiteImpl", "createSqLiteInstance", sqLiteProps);
auto regionAttributes = regionAttributesFactory.create();
auto cache = getHelper()->cachePtr;
@@ -428,47 +437,49 @@ std::shared_ptr<Region> createPooledRegion(
LOG("Region created.");
return regPtr;
}
- std::shared_ptr<Pool> findPool(const char* poolName) {
- LOG("findPool() entered.");
- auto poolPtr = getHelper()->getCache()->getPoolManager().find(poolName);
- ASSERT(poolPtr != nullptr, "Failed to find pool.");
- return poolPtr;
- }
- std::shared_ptr<Pool> createPool(
- const char* poolName, const char* locators, const char* serverGroup,
- int redundancy = 0, bool clientNotification = false,
- std::chrono::milliseconds subscriptionAckInterval =
- std::chrono::milliseconds::zero(),
- int connections = -1, int loadConditioningInterval = -1) {
- LOG("createPool() entered.");
-
- auto poolPtr = getHelper()->createPool(
- poolName, locators, serverGroup, redundancy, clientNotification,
- subscriptionAckInterval, connections, loadConditioningInterval);
- ASSERT(poolPtr != nullptr, "Failed to create pool.");
- LOG("Pool created.");
- return poolPtr;
- }
- std::shared_ptr<Pool> createPoolAndDestroy(
- const char* poolName, const char* locators, const char* serverGroup,
- int redundancy = 0, bool clientNotification = false,
- std::chrono::milliseconds subscriptionAckInterval =
- std::chrono::milliseconds::zero(),
- int connections = -1) {
- LOG("createPoolAndDestroy() entered.");
-
- auto poolPtr = getHelper()->createPool(poolName, locators, serverGroup,
- redundancy, clientNotification,
- subscriptionAckInterval, connections);
- ASSERT(poolPtr != nullptr, "Failed to create pool.");
- poolPtr->destroy();
- LOG("Pool created and destroyed.");
- return poolPtr;
+std::shared_ptr<Pool> findPool(const char* poolName) {
+ LOG("findPool() entered.");
+ auto poolPtr = getHelper()->getCache()->getPoolManager().find(poolName);
+ ASSERT(poolPtr != nullptr, "Failed to find pool.");
+ return poolPtr;
+}
+std::shared_ptr<Pool> createPool(
+ const char* poolName, const char* locators, const char* serverGroup,
+ int redundancy = 0, bool clientNotification = false,
+ std::chrono::milliseconds subscriptionAckInterval =
+ std::chrono::milliseconds::zero(),
+ int connections = -1, int loadConditioningInterval = -1) {
+ LOG("createPool() entered.");
+
+ auto poolPtr = getHelper()->createPool(
+ poolName, locators, serverGroup, redundancy, clientNotification,
+ subscriptionAckInterval, connections, loadConditioningInterval);
+ ASSERT(poolPtr != nullptr, "Failed to create pool.");
+ LOG("Pool created.");
+ return poolPtr;
+}
+std::shared_ptr<Pool> createPoolAndDestroy(
+ const char* poolName, const char* locators, const char* serverGroup,
+ int redundancy = 0, bool clientNotification = false,
+ std::chrono::milliseconds subscriptionAckInterval =
+ std::chrono::milliseconds::zero(),
+ int connections = -1) {
+ LOG("createPoolAndDestroy() entered.");
+
+ auto poolPtr = getHelper()->createPool(poolName, locators, serverGroup,
+ redundancy, clientNotification,
+ subscriptionAckInterval, connections);
+ ASSERT(poolPtr != nullptr, "Failed to create pool.");
+ poolPtr->destroy();
+ LOG("Pool created and destroyed.");
+ return poolPtr;
}
// this will create pool even endpoints and locatorhost has been not defined
std::shared_ptr<Pool> createPool2(const char* poolName, const char* locators,
- const char* serverGroup, const char* servers = nullptr,
- int redundancy = 0, bool clientNotification = false) {
+ const char* serverGroup,
+ const char* servers = nullptr,
+ int redundancy = 0,
+ bool clientNotification = false) {
LOG("createPool2() entered.");
auto poolPtr = getHelper()->createPool2(
@@ -486,7 +497,7 @@ std::shared_ptr<Region> createRegionAndAttachPool(
const std::chrono::seconds& rit = std::chrono::seconds::zero(), int lel = 0,
ExpirationAction action = ExpirationAction::DESTROY) {
LOG("createRegionAndAttachPool() entered.");
- auto regPtr = getHelper()->createRegionAndAttachPool(
+ auto regPtr = getHelper()->createRegionAndAttachPool(
name, ack, poolName, caching, ettl, eit, rttl, rit, lel, action);
ASSERT(regPtr != nullptr, "Failed to create region.");
LOG("Region created.");
@@ -556,18 +567,18 @@ void doNetsearch(const char* name, const char* key, const char* value,
key, value, name);
fflush(stdout);
// Get entry created in Process A, verify entry is correct
- auto keyPtr = CacheableKey::create(key);
-
- auto regPtr = getHelper()->getRegion(name);
- fprintf(stdout, "netsearch region %s\n", regPtr->getName().c_str());
- fflush(stdout);
- ASSERT(regPtr != nullptr, "Region not found.");
-
- // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
- // region." );
- if (checkVal) {
- ASSERT(!regPtr->containsValueForKey(keyPtr),
- "Value should not have been found in region.");
+ auto keyPtr = CacheableKey::create(key);
+
+ auto regPtr = getHelper()->getRegion(name);
+ fprintf(stdout, "netsearch region %s\n", regPtr->getName().c_str());
+ fflush(stdout);
+ ASSERT(regPtr != nullptr, "Region not found.");
+
+ // ASSERT( !regPtr->containsKey( keyPtr ), "Key should not have been found in
+ // region." );
+ if (checkVal) {
+ ASSERT(!regPtr->containsValueForKey(keyPtr),
+ "Value should not have been found in region.");
}
auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
@@ -619,9 +630,9 @@ void invalidateEntry(const char* name, const char* key) {
fprintf(stdout, "Invalidating entry -- key: %s in region %s\n", key, name);
fflush(stdout);
// Invalidate entry, verify entry is invalidated
- auto keyPtr = CacheableKey::create(key);
+ auto keyPtr = CacheableKey::create(key);
- auto regPtr = getHelper()->getRegion(name);
+ auto regPtr = getHelper()->getRegion(name);
ASSERT(regPtr != nullptr, "Region not found.");
ASSERT(regPtr->containsKey(keyPtr), "Key should have been found in region.");
@@ -640,9 +651,9 @@ void destroyEntry(const char* name, const char* key) {
fprintf(stdout, "Destroying entry -- key: %s in region %s\n", key, name);
fflush(stdout);
// Destroy entry, verify entry is destroyed
- auto keyPtr = CacheableKey::create(key);
+ auto keyPtr = CacheableKey::create(key);
- auto regPtr = getHelper()->getRegion(name);
+ auto regPtr = getHelper()->getRegion(name);
ASSERT(regPtr != nullptr, "Region not found.");
ASSERT(regPtr->containsKey(keyPtr), "Key should have been found in region.");
@@ -666,7 +677,8 @@ class RegionOperations {
RegionOperations(const char* name)
: m_regionPtr(getHelper()->getRegion(name)) {}
- void putOp(int keys = 1, const std::shared_ptr<Serializable>& aCallbackArgument = nullptr) {
+ void putOp(int keys = 1,
+ const std::shared_ptr<Serializable>& aCallbackArgument = nullptr) {
char keybuf[100];
char valbuf[100];
for (int i = 1; i <= keys; i++) {
diff --git a/cppcache/integration-test/ThinClientInterest1.hpp b/cppcache/integration-test/ThinClientInterest1.hpp
index c1fd4d5..3c8a190 100644
--- a/cppcache/integration-test/ThinClientInterest1.hpp
+++ b/cppcache/integration-test/ThinClientInterest1.hpp
@@ -27,8 +27,6 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
bool isLocalServer = true;
static bool isLocator = false;
diff --git a/cppcache/integration-test/ThinClientInterest2.hpp b/cppcache/integration-test/ThinClientInterest2.hpp
index caacbdd..85699a2 100644
--- a/cppcache/integration-test/ThinClientInterest2.hpp
+++ b/cppcache/integration-test/ThinClientInterest2.hpp
@@ -27,8 +27,6 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
bool isLocalServer = true;
static bool isLocator = false;
diff --git a/cppcache/integration-test/ThinClientInterest3.hpp b/cppcache/integration-test/ThinClientInterest3.hpp
index 132113a..1538746 100644
--- a/cppcache/integration-test/ThinClientInterest3.hpp
+++ b/cppcache/integration-test/ThinClientInterest3.hpp
@@ -29,8 +29,6 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
bool isLocalServer = true;
const char *endPoint = CacheHelper::getTcrEndpoints(isLocalServer, 1);
diff --git a/cppcache/integration-test/ThinClientInterest3Cacheless.hpp b/cppcache/integration-test/ThinClientInterest3Cacheless.hpp
index 6bc8882..60b8a78 100644
--- a/cppcache/integration-test/ThinClientInterest3Cacheless.hpp
+++ b/cppcache/integration-test/ThinClientInterest3Cacheless.hpp
@@ -29,8 +29,6 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
bool isLocalServer = true;
const char *endPoint = CacheHelper::getTcrEndpoints(isLocalServer, 1);
diff --git a/cppcache/integration-test/ThinClientInterestList.hpp b/cppcache/integration-test/ThinClientInterestList.hpp
index b37da5b..3271e82 100644
--- a/cppcache/integration-test/ThinClientInterestList.hpp
+++ b/cppcache/integration-test/ThinClientInterestList.hpp
@@ -29,13 +29,15 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientInterestList2.hpp b/cppcache/integration-test/ThinClientInterestList2.hpp
index 979b53c..83e6347 100644
--- a/cppcache/integration-test/ThinClientInterestList2.hpp
+++ b/cppcache/integration-test/ThinClientInterestList2.hpp
@@ -29,13 +29,15 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientListenerInit.hpp b/cppcache/integration-test/ThinClientListenerInit.hpp
index 118041f..6874e65 100644
--- a/cppcache/integration-test/ThinClientListenerInit.hpp
+++ b/cppcache/integration-test/ThinClientListenerInit.hpp
@@ -30,8 +30,6 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
static bool isLocator = false;
static bool isLocalServer = true;
diff --git a/cppcache/integration-test/ThinClientLocalCacheLoader.hpp b/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
index 79be570..4310bb3 100644
--- a/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
+++ b/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTLOCALCACHELOADER_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTLOCALCACHELOADER_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,11 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTLOCALCACHELOADER_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTLOCALCACHELOADER_H_
+
#include "fw_dunit.hpp"
#include "ThinClientHelper.hpp"
#include "TallyLoader.hpp"
@@ -28,8 +28,8 @@
#define CLIENT1 s1p1
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheFactory;
+
std::shared_ptr<TallyLoader> reg1Loader1;
int numLoads = 0;
std::shared_ptr<Cache> cachePtr;
@@ -42,20 +42,19 @@ class ThinClientTallyLoader : public TallyLoader {
virtual ~ThinClientTallyLoader() = default;
std::shared_ptr<Cacheable> load(
- Region& rp,
- const std::shared_ptr<CacheableKey>& key,
+ Region& rp, const std::shared_ptr<CacheableKey>& key,
const std::shared_ptr<Serializable>& aCallbackArgument) {
int32_t loadValue = std::dynamic_pointer_cast<CacheableInt32>(
TallyLoader::load(rp, key, aCallbackArgument))
->value();
char lstrvalue[32];
sprintf(lstrvalue, "%i", loadValue);
- auto lreturnValue = CacheableString::create(lstrvalue);
- if (key != nullptr && (!rp.getAttributes().getEndpoints().empty() ||
- !rp.getAttributes().getPoolName().empty())) {
- LOGDEBUG("Putting the value (%s) for local region clients only ",
- lstrvalue);
- rp.put(key, lreturnValue);
+ auto lreturnValue = CacheableString::create(lstrvalue);
+ if (key != nullptr && (!rp.getAttributes().getEndpoints().empty() ||
+ !rp.getAttributes().getPoolName().empty())) {
+ LOGDEBUG("Putting the value (%s) for local region clients only ",
+ lstrvalue);
+ rp.put(key, lreturnValue);
}
return lreturnValue;
}
@@ -108,9 +107,9 @@ DUNIT_TASK_DEFINITION(CLIENT1, SetupClient)
LOGINFO("Obtained the Region from the Cache");
// Plugin the ThinClientTallyLoader to the Region.
- auto attrMutatorPtr = regionPtr->getAttributesMutator();
- reg1Loader1 = std::make_shared<ThinClientTallyLoader>();
- attrMutatorPtr->setCacheLoader(reg1Loader1);
+ auto attrMutatorPtr = regionPtr->getAttributesMutator();
+ reg1Loader1 = std::make_shared<ThinClientTallyLoader>();
+ attrMutatorPtr->setCacheLoader(reg1Loader1);
}
END_TASK_DEFINITION
@@ -124,115 +123,115 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, testLoader)
{
- auto keyPtr = CacheableKey::create("Key0");
+ auto keyPtr = CacheableKey::create("Key0");
- ASSERT(!regionPtr->containsKey(keyPtr),
- "Key should not have been found in region.");
- // now having the Callbacks set, lets call the loader
- ASSERT(regionPtr->get(keyPtr) != nullptr, "Expected non null value");
+ ASSERT(!regionPtr->containsKey(keyPtr),
+ "Key should not have been found in region.");
+ // now having the Callbacks set, lets call the loader
+ ASSERT(regionPtr->get(keyPtr) != nullptr, "Expected non null value");
- auto regEntryPtr = regionPtr->getEntry(keyPtr);
- auto valuePtr = regEntryPtr->getValue();
- int val = atoi(valuePtr->toString().c_str());
- LOGFINE("val for keyPtr is %d", val);
- numLoads++;
- validateEventCount(__LINE__);
+ auto regEntryPtr = regionPtr->getEntry(keyPtr);
+ auto valuePtr = regEntryPtr->getValue();
+ int val = atoi(valuePtr->toString().c_str());
+ LOGFINE("val for keyPtr is %d", val);
+ numLoads++;
+ validateEventCount(__LINE__);
}
END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, testDestroy)
{
- auto keyPtr2 = CacheableKey::create("Key1");
- regionPtr->destroy(keyPtr2);
- // Verify the sequence destroy()->get() :- CacheLoader to be invoked.
- regionPtr->get(keyPtr2);
- auto regEntryPtr2 = regionPtr->getEntry(keyPtr2);
- auto valuePtr2 = regEntryPtr2->getValue();
- int val2 = atoi(valuePtr2->toString().c_str());
- LOGFINE("val2 for keyPtr2 is %d", val2);
- numLoads++;
- validateEventCount(__LINE__);
+ auto keyPtr2 = CacheableKey::create("Key1");
+ regionPtr->destroy(keyPtr2);
+ // Verify the sequence destroy()->get() :- CacheLoader to be invoked.
+ regionPtr->get(keyPtr2);
+ auto regEntryPtr2 = regionPtr->getEntry(keyPtr2);
+ auto valuePtr2 = regEntryPtr2->getValue();
+ int val2 = atoi(valuePtr2->toString().c_str());
+ LOGFINE("val2 for keyPtr2 is %d", val2);
+ numLoads++;
+ validateEventCount(__LINE__);
}
END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, testInvalidateKey)
{
- auto keyPtr2 = CacheableKey::create("Key2");
- regionPtr->put(keyPtr2, "Value2");
- regionPtr->invalidate(keyPtr2);
- // Verify the sequence invalidate()->get() :- CacheLoader to be invoked.
- regionPtr->get(keyPtr2);
- auto regEntryPtr = regionPtr->getEntry(keyPtr2);
- auto valuePtr = regEntryPtr->getValue();
- int val = atoi(valuePtr->toString().c_str());
- LOGFINE("val for keyPtr1 is %d", val);
- numLoads++;
- validateEventCount(__LINE__);
+ auto keyPtr2 = CacheableKey::create("Key2");
+ regionPtr->put(keyPtr2, "Value2");
+ regionPtr->invalidate(keyPtr2);
+ // Verify the sequence invalidate()->get() :- CacheLoader to be invoked.
+ regionPtr->get(keyPtr2);
+ auto regEntryPtr = regionPtr->getEntry(keyPtr2);
+ auto valuePtr = regEntryPtr->getValue();
+ int val = atoi(valuePtr->toString().c_str());
+ LOGFINE("val for keyPtr1 is %d", val);
+ numLoads++;
+ validateEventCount(__LINE__);
- // Verify the sequence put()->invalidate()->get()->invalidate()->get() :-
- // CacheLoader to be invoked twice
- // once after each get.
- auto keyPtr4 = CacheableKey::create("Key4");
- regionPtr->put(keyPtr4, "Value4");
- regionPtr->invalidate(keyPtr4);
- regionPtr->get(keyPtr4);
- auto regEntryPtr1 = regionPtr->getEntry(keyPtr4);
- auto valuePtr1 = regEntryPtr1->getValue();
- int val1 = atoi(valuePtr1->toString().c_str());
- LOGFINE("val1 for keyPtr4 is %d", val1);
- numLoads++;
- validateEventCount(__LINE__);
+ // Verify the sequence put()->invalidate()->get()->invalidate()->get() :-
+ // CacheLoader to be invoked twice
+ // once after each get.
+ auto keyPtr4 = CacheableKey::create("Key4");
+ regionPtr->put(keyPtr4, "Value4");
+ regionPtr->invalidate(keyPtr4);
+ regionPtr->get(keyPtr4);
+ auto regEntryPtr1 = regionPtr->getEntry(keyPtr4);
+ auto valuePtr1 = regEntryPtr1->getValue();
+ int val1 = atoi(valuePtr1->toString().c_str());
+ LOGFINE("val1 for keyPtr4 is %d", val1);
+ numLoads++;
+ validateEventCount(__LINE__);
- regionPtr->invalidate(keyPtr4);
- regionPtr->get(keyPtr4);
- auto regEntryPtr2 = regionPtr->getEntry(keyPtr4);
- auto valuePtr2 = regEntryPtr2->getValue();
- int val2 = atoi(valuePtr2->toString().c_str());
- LOGFINE("val2 for keyPtr4 is %d", val2);
- numLoads++;
- validateEventCount(__LINE__);
+ regionPtr->invalidate(keyPtr4);
+ regionPtr->get(keyPtr4);
+ auto regEntryPtr2 = regionPtr->getEntry(keyPtr4);
+ auto valuePtr2 = regEntryPtr2->getValue();
+ int val2 = atoi(valuePtr2->toString().c_str());
+ LOGFINE("val2 for keyPtr4 is %d", val2);
+ numLoads++;
+ validateEventCount(__LINE__);
}
END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, testInvalidateRegion)
{
- auto keyPtr3 = CacheableKey::create("Key3");
- regionPtr->put(keyPtr3, "Value3");
- // Verify the sequence invalidateRegion()->get() :- CacheLoader to be
- // invoked.
- regionPtr->invalidateRegion();
- regionPtr->get(keyPtr3);
- auto regEntryPtr = regionPtr->getEntry(keyPtr3);
- auto valuePtr = regEntryPtr->getValue();
- int val = atoi(valuePtr->toString().c_str());
- LOGFINE("val for keyPtr3 is %d", val);
- numLoads++;
- validateEventCount(__LINE__);
+ auto keyPtr3 = CacheableKey::create("Key3");
+ regionPtr->put(keyPtr3, "Value3");
+ // Verify the sequence invalidateRegion()->get() :- CacheLoader to be
+ // invoked.
+ regionPtr->invalidateRegion();
+ regionPtr->get(keyPtr3);
+ auto regEntryPtr = regionPtr->getEntry(keyPtr3);
+ auto valuePtr = regEntryPtr->getValue();
+ int val = atoi(valuePtr->toString().c_str());
+ LOGFINE("val for keyPtr3 is %d", val);
+ numLoads++;
+ validateEventCount(__LINE__);
- // Verify the sequence
- // put()->invalidateRegion()->get()->invalidateRegion()->get() :-
- // CacheLoader
- // to be invoked twice.
- // once after each get.
- auto keyPtr4 = CacheableKey::create("Key4");
- regionPtr->put(keyPtr4, "Value4");
- regionPtr->invalidateRegion();
- regionPtr->get(keyPtr4);
- auto regEntryPtr1 = regionPtr->getEntry(keyPtr4);
- auto valuePtr1 = regEntryPtr1->getValue();
- int val1 = atoi(valuePtr1->toString().c_str());
- LOGFINE("val1 for keyPtr4 is %d", val1);
- numLoads++;
- validateEventCount(__LINE__);
+ // Verify the sequence
+ // put()->invalidateRegion()->get()->invalidateRegion()->get() :-
+ // CacheLoader
+ // to be invoked twice.
+ // once after each get.
+ auto keyPtr4 = CacheableKey::create("Key4");
+ regionPtr->put(keyPtr4, "Value4");
+ regionPtr->invalidateRegion();
+ regionPtr->get(keyPtr4);
+ auto regEntryPtr1 = regionPtr->getEntry(keyPtr4);
+ auto valuePtr1 = regEntryPtr1->getValue();
+ int val1 = atoi(valuePtr1->toString().c_str());
+ LOGFINE("val1 for keyPtr4 is %d", val1);
+ numLoads++;
+ validateEventCount(__LINE__);
- regionPtr->invalidateRegion();
- regionPtr->get(keyPtr4);
- auto regEntryPtr2 = regionPtr->getEntry(keyPtr4);
- auto valuePtr2 = regEntryPtr2->getValue();
- int val2 = atoi(valuePtr2->toString().c_str());
- LOGFINE("val2 for keyPtr4 is %d", val2);
- numLoads++;
- validateEventCount(__LINE__);
+ regionPtr->invalidateRegion();
+ regionPtr->get(keyPtr4);
+ auto regEntryPtr2 = regionPtr->getEntry(keyPtr4);
+ auto valuePtr2 = regEntryPtr2->getValue();
+ int val2 = atoi(valuePtr2->toString().c_str());
+ LOGFINE("val2 for keyPtr4 is %d", val2);
+ numLoads++;
+ validateEventCount(__LINE__);
}
END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientMultipleCaches.hpp b/cppcache/integration-test/ThinClientMultipleCaches.hpp
index 98fc92d..5148a67 100644
--- a/cppcache/integration-test/ThinClientMultipleCaches.hpp
+++ b/cppcache/integration-test/ThinClientMultipleCaches.hpp
@@ -29,12 +29,16 @@
#include "CacheHelper.hpp"
#include "fw_dunit.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define SERVER1 s2p1
+using apache::geode::client::Cache;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+
static bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/ThinClientNotification.hpp b/cppcache/integration-test/ThinClientNotification.hpp
index be7709a..0cfe575 100644
--- a/cppcache/integration-test/ThinClientNotification.hpp
+++ b/cppcache/integration-test/ThinClientNotification.hpp
@@ -30,8 +30,9 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
CacheHelper* cacheHelper = nullptr;
diff --git a/cppcache/integration-test/ThinClientPdxSerializer.hpp b/cppcache/integration-test/ThinClientPdxSerializer.hpp
index 9d9fcaf..8d0aa9e 100644
--- a/cppcache/integration-test/ThinClientPdxSerializer.hpp
+++ b/cppcache/integration-test/ThinClientPdxSerializer.hpp
@@ -34,15 +34,18 @@
#include "ThinClientPdxSerializers.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace PdxTests;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define LOCATOR s2p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::UserObjectSizer;
+
+using PdxTests::PdxWrapper;
+using PdxTests::TestPdxSerializerForV1;
+
bool isLocator = false;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientPdxSerializers.hpp b/cppcache/integration-test/ThinClientPdxSerializers.hpp
index 66e2293..5a978b9 100644
--- a/cppcache/integration-test/ThinClientPdxSerializers.hpp
+++ b/cppcache/integration-test/ThinClientPdxSerializers.hpp
@@ -20,6 +20,21 @@
#ifndef GEODE_INTEGRATION_TEST_THINCLIENTPDXSERIALIZERS_H_
#define GEODE_INTEGRATION_TEST_THINCLIENTPDXSERIALIZERS_H_
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableHashMap;
+using apache::geode::client::CacheableHashSet;
+using apache::geode::client::CacheableHashTable;
+using apache::geode::client::CacheableLinkedHashSet;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::PdxReader;
+using apache::geode::client::PdxSerializer;
+using apache::geode::client::PdxWriter;
+using apache::geode::client::UserObjectSizer;
+
+using PdxTests::TestPdxSerializerForV2;
+using PdxTests::V1CLASSNAME2;
+using PdxTests::V2CLASSNAME4;
+
static const char *CLASSNAME1 = "PdxTests.PdxType";
static const char *CLASSNAME2 = "PdxTests.Address";
diff --git a/cppcache/integration-test/ThinClientPutAll.hpp b/cppcache/integration-test/ThinClientPutAll.hpp
index 2d0354f..32c3c9c 100644
--- a/cppcache/integration-test/ThinClientPutAll.hpp
+++ b/cppcache/integration-test/ThinClientPutAll.hpp
@@ -33,8 +33,17 @@
#define ROOT_SCOPE DISTRIBUTED_ACK
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::IllegalArgumentException;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
diff --git a/cppcache/integration-test/ThinClientPutAllTimeout.hpp b/cppcache/integration-test/ThinClientPutAllTimeout.hpp
index d3b9641..660efd5 100644
--- a/cppcache/integration-test/ThinClientPutAllTimeout.hpp
+++ b/cppcache/integration-test/ThinClientPutAllTimeout.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTPUTALLTIMEOUT_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTPUTALLTIMEOUT_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,11 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTPUTALLTIMEOUT_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTPUTALLTIMEOUT_H_
+
#include "fw_dunit.hpp"
#include "ThinClientHelper.hpp"
#include "TallyListener.hpp"
@@ -29,8 +29,9 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::TimeoutException;
bool isLocalServer = true;
static bool isLocator = false;
diff --git a/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp b/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
index 97ac6c1..b9171b5 100644
--- a/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
+++ b/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
@@ -33,14 +33,22 @@
#include "CacheRegionHelper.hpp"
#include "SerializationRegistry.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::IllegalArgumentException;
+
CacheHelper* cacheHelper = nullptr;
static bool isLocalServer = false;
static bool isLocator = false;
@@ -377,17 +385,21 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, RegisterClient1Keys)
{
-
try {
auto serializationRegistry =
CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
->getSerializationRegistry();
- serializationRegistry->addPdxType(PdxTests::PdxType::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::PdxTypes1::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::PdxTypes2::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::Address::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::PdxTypes3::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxType::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxTypes1::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxTypes2::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::Address::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxTypes3::createDeserializable);
} catch (Exception e) {
LOG("Got expected Exception for Serialization, already registered");
}
@@ -423,11 +435,16 @@ DUNIT_TASK_DEFINITION(CLIENT2, RegisterClient2Keys)
auto serializationRegistry =
CacheRegionHelper::getCacheImpl(cacheHelper->getCache().get())
->getSerializationRegistry();
- serializationRegistry->addPdxType(PdxTests::PdxType::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::PdxTypes1::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::PdxTypes2::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::Address::createDeserializable);
- serializationRegistry->addPdxType(PdxTests::PdxTypes3::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxType::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxTypes1::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxTypes2::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::Address::createDeserializable);
+ serializationRegistry->addPdxType(
+ PdxTests::PdxTypes3::createDeserializable);
} catch (Exception e) {
LOG("Got expected Exception for Serialization, already registered");
}
diff --git a/cppcache/integration-test/ThinClientPutGetAll.hpp b/cppcache/integration-test/ThinClientPutGetAll.hpp
index 940f6e5..f4066d4 100644
--- a/cppcache/integration-test/ThinClientPutGetAll.hpp
+++ b/cppcache/integration-test/ThinClientPutGetAll.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTPUTGETALL_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTPUTGETALL_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,11 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTPUTGETALL_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTPUTGETALL_H_
+
#include "fw_dunit.hpp"
#include <ace/OS.h>
#include <ace/High_Res_Timer.h>
@@ -34,14 +34,25 @@
#include "testobject/PdxClassV1.hpp"
#include "testobject/PdxClassV2.hpp"
-using namespace PdxTests;
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using PdxTests::PdxTypes1;
+using PdxTests::PdxTypes10;
+using PdxTests::PdxTypes2;
+using PdxTests::PdxTypes3;
+using PdxTests::PdxTypes4;
+using PdxTests::PdxTypes5;
+using PdxTests::PdxTypes6;
+using PdxTests::PdxTypes7;
+using PdxTests::PdxTypes8;
+using PdxTests::PdxTypes9;
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::IllegalStateException;
+
static bool isLocalServer = false;
static bool isLocator = false;
static int numberOfLocators = 0;
diff --git a/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp b/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp
index fedcc34..1d85f2e 100644
--- a/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp
+++ b/cppcache/integration-test/ThinClientRIwithlocalRegionDestroy.hpp
@@ -30,8 +30,14 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheListener;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::Exception;
+using apache::geode::client::Region;
+using apache::geode::client::RegionEvent;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
@@ -147,8 +153,10 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pool_Locator)
// create subregion
auto regptr = getHelper()->getRegion(regionNames[2]);
- auto subregPtr1 = regptr->createSubregion(regionNames[3], regptr->getAttributes());
- auto subregPtr2 = regptr->createSubregion(regionNames[4], regptr->getAttributes());
+ auto subregPtr1 =
+ regptr->createSubregion(regionNames[3], regptr->getAttributes());
+ auto subregPtr2 =
+ regptr->createSubregion(regionNames[4], regptr->getAttributes());
LOGINFO(
"NIL: CLIENT1 StepOne_Pool_Locator subregions created successfully");
@@ -177,8 +185,10 @@ DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pool_Locator)
// create subregion
auto regptr = getHelper()->getRegion(regionNames[2]);
- auto subregPtr1 = regptr->createSubregion(regionNames[3], regptr->getAttributes());
- auto subregPtr2 = regptr->createSubregion(regionNames[4], regptr->getAttributes());
+ auto subregPtr1 =
+ regptr->createSubregion(regionNames[3], regptr->getAttributes());
+ auto subregPtr2 =
+ regptr->createSubregion(regionNames[4], regptr->getAttributes());
LOGINFO(
"NIL: CLIENT2 StepTwo_Pool_Locator:: subregions created successfully");
diff --git a/cppcache/integration-test/ThinClientRegex.hpp b/cppcache/integration-test/ThinClientRegex.hpp
index a56bdc9..e540239 100644
--- a/cppcache/integration-test/ThinClientRegex.hpp
+++ b/cppcache/integration-test/ThinClientRegex.hpp
@@ -29,13 +29,15 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientRegex2.hpp b/cppcache/integration-test/ThinClientRegex2.hpp
index 507e7a6..3b19b88 100644
--- a/cppcache/integration-test/ThinClientRegex2.hpp
+++ b/cppcache/integration-test/ThinClientRegex2.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTREGEX2_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTREGEX2_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,6 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTREGEX2_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTREGEX2_H_
+
#include "fw_dunit.hpp"
#include <ace/OS.h>
#include <ace/High_Res_Timer.h>
@@ -29,13 +30,15 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientRegex3.hpp b/cppcache/integration-test/ThinClientRegex3.hpp
index ddeccf8..cb928d1 100644
--- a/cppcache/integration-test/ThinClientRegex3.hpp
+++ b/cppcache/integration-test/ThinClientRegex3.hpp
@@ -29,13 +29,23 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::Properties;
+using apache::geode::client::RegionDestroyedException;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientRemoveAll.hpp b/cppcache/integration-test/ThinClientRemoveAll.hpp
index a003add..0af586c 100644
--- a/cppcache/integration-test/ThinClientRemoveAll.hpp
+++ b/cppcache/integration-test/ThinClientRemoveAll.hpp
@@ -36,14 +36,14 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::HashMapOfCacheable;
+
CacheHelper* cacheHelper = nullptr;
static bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/ThinClientSSL.hpp b/cppcache/integration-test/ThinClientSSL.hpp
index 8b52fd0..90c8609 100644
--- a/cppcache/integration-test/ThinClientSSL.hpp
+++ b/cppcache/integration-test/ThinClientSSL.hpp
@@ -30,8 +30,10 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Properties;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientSSLWithPassword.hpp b/cppcache/integration-test/ThinClientSSLWithPassword.hpp
index 5fe31c7..06184a8 100644
--- a/cppcache/integration-test/ThinClientSSLWithPassword.hpp
+++ b/cppcache/integration-test/ThinClientSSLWithPassword.hpp
@@ -30,8 +30,10 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Properties;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientSecurity.hpp b/cppcache/integration-test/ThinClientSecurity.hpp
index ab23c42..2a0864a 100644
--- a/cppcache/integration-test/ThinClientSecurity.hpp
+++ b/cppcache/integration-test/ThinClientSecurity.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_THINCLIENTSECURITY_H_
-#define GEODE_INTEGRATION_TEST_THINCLIENTSECURITY_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -19,12 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
- * ThinClientSecurity.hpp
- *
- * Created on: Nov 13, 2008
- * Author: vrao
- */
+
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_THINCLIENTSECURITY_H_
+#define GEODE_INTEGRATION_TEST_THINCLIENTSECURITY_H_
#include <geode/AuthenticatedView.hpp>
#include "fw_dunit.hpp"
@@ -32,6 +26,8 @@
#include "CacheImplHelper.hpp"
#include "testUtils.hpp"
+using apache::geode::client::AuthenticatedView;
+
static bool isLocalServer = false;
static bool isLocator = false;
static int numberOfLocators = 1;
diff --git a/cppcache/integration-test/ThinClientSecurityHelper.hpp b/cppcache/integration-test/ThinClientSecurityHelper.hpp
index 1286d0b..d3c0a96 100644
--- a/cppcache/integration-test/ThinClientSecurityHelper.hpp
+++ b/cppcache/integration-test/ThinClientSecurityHelper.hpp
@@ -23,8 +23,26 @@
#include "ThinClientHelper.hpp"
#include "ace/Process.h"
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::Exception;
+using apache::geode::client::testframework::security::CredentialGenerator;
+using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
+using apache::geode::client::testframework::security::OP_CREATE;
+using apache::geode::client::testframework::security::OP_DESTROY;
+using apache::geode::client::testframework::security::OP_EXECUTE_FUNCTION;
+using apache::geode::client::testframework::security::OP_GET;
+using apache::geode::client::testframework::security::OP_GETALL;
+using apache::geode::client::testframework::security::OP_INVALIDATE;
+using apache::geode::client::testframework::security::OP_KEY_SET;
+using apache::geode::client::testframework::security::OP_PUTALL;
+using apache::geode::client::testframework::security::OP_QUERY;
+using apache::geode::client::testframework::security::OP_REGION_CLEAR;
+using apache::geode::client::testframework::security::OP_REGISTER_CQ;
+using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UPDATE;
+using apache::geode::client::testframework::security::opCodeList;
+
bool isLocator = false;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientTXFailover.hpp b/cppcache/integration-test/ThinClientTXFailover.hpp
index bb512e8..31a49b3 100644
--- a/cppcache/integration-test/ThinClientTXFailover.hpp
+++ b/cppcache/integration-test/ThinClientTXFailover.hpp
@@ -31,8 +31,11 @@
#define ROOT_SCOPE DISTRIBUTED_ACK
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::TransactionDataNodeHasDepartedException;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/ThinClientTasks_C2S2.hpp b/cppcache/integration-test/ThinClientTasks_C2S2.hpp
index 45d52be..c461c68 100644
--- a/cppcache/integration-test/ThinClientTasks_C2S2.hpp
+++ b/cppcache/integration-test/ThinClientTasks_C2S2.hpp
@@ -32,6 +32,8 @@
#define PROCESS3 s2p1
#define PROCESS4 s2p2
+using apache::geode::client::CacheHelper;
+
DUNIT_TASK_DEFINITION(SERVER1, StartLocator)
{
CacheHelper::initLocator(1);
diff --git a/cppcache/integration-test/ThinClientTransactions.hpp b/cppcache/integration-test/ThinClientTransactions.hpp
index 86d11b5..384f836 100644
--- a/cppcache/integration-test/ThinClientTransactions.hpp
+++ b/cppcache/integration-test/ThinClientTransactions.hpp
@@ -29,14 +29,21 @@
#include <geode/TransactionId.hpp>
#include <geode/CacheTransactionManager.hpp>
-
#define ROOT_NAME "ThinClientTransactions"
#define ROOT_SCOPE DISTRIBUTED_ACK
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheServerException;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::Properties;
+using apache::geode::client::TransactionException;
+using apache::geode::client::TransactionId;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
@@ -415,9 +422,7 @@ class SuspendTransactionThread : public ACE_Task_Base {
}
void start() { activate(); }
void stop() { wait(); }
- TransactionId& getSuspendedTx() {
- return *m_suspendedTransaction;
- }
+ TransactionId& getSuspendedTx() { return *m_suspendedTransaction; }
};
class ResumeTransactionThread : public ACE_Task_Base {
private:
@@ -429,9 +434,8 @@ class ResumeTransactionThread : public ACE_Task_Base {
ACE_Auto_Event* m_txEvent;
public:
- ResumeTransactionThread(TransactionId& suspendedTransaction,
- bool commit, bool tryResumeWithSleep,
- ACE_Auto_Event* txEvent)
+ ResumeTransactionThread(TransactionId& suspendedTransaction, bool commit,
+ bool tryResumeWithSleep, ACE_Auto_Event* txEvent)
: m_suspendedTransaction(suspendedTransaction),
m_commit(commit),
m_tryResumeWithSleep(tryResumeWithSleep),
@@ -649,11 +653,11 @@ DUNIT_TASK_DEFINITION(CLIENT1, SuspendResumeCommit)
bool threwTransactionException = false;
try {
txManager->suspend();
- }
- catch (const TransactionException) {
+ } catch (const TransactionException) {
threwTransactionException = true;
}
- ASSERT(threwTransactionException, "SuspendResumeCommit: Transaction shouldnt have been suspended");
+ ASSERT(threwTransactionException,
+ "SuspendResumeCommit: Transaction shouldnt have been suspended");
}
END_TASK_DEFINITION
diff --git a/cppcache/integration-test/ThinClientTransactionsXA.hpp b/cppcache/integration-test/ThinClientTransactionsXA.hpp
index 4dbcb83..897a168 100644
--- a/cppcache/integration-test/ThinClientTransactionsXA.hpp
+++ b/cppcache/integration-test/ThinClientTransactionsXA.hpp
@@ -34,7 +34,17 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheServerException;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::InternalCacheTransactionManager2PC;
+using apache::geode::client::Properties;
+using apache::geode::client::TransactionException;
+using apache::geode::client::TransactionId;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
diff --git a/cppcache/integration-test/fw_dunit.cpp b/cppcache/integration-test/fw_dunit.cpp
index 0d8ea16..d662fbc 100644
--- a/cppcache/integration-test/fw_dunit.cpp
+++ b/cppcache/integration-test/fw_dunit.cpp
@@ -54,6 +54,8 @@
#ifdef SOLARIS_USE_BB
#include "BBNamingContext.hpp"
+using apache::geode::client::testframework::BBNamingContextClient;
+using apache::geode::client::testframework::BBNamingContextServer;
#else
#include <ace/Naming_Context.h>
#endif
@@ -69,7 +71,6 @@
#define __DUNIT_NO_MAIN__
#include "fw_dunit.hpp"
-typedef unsigned int uint32_t;
ACE_TCHAR* g_programName = nullptr;
uint32_t g_masterPid = 0;
@@ -1174,4 +1175,3 @@ void Semaphore::release(int t) {
} // namespace perf
-namespace test {} // namespace test
diff --git a/cppcache/integration-test/locator_globals.hpp b/cppcache/integration-test/locator_globals.hpp
index 381371d..eb77ab6 100644
--- a/cppcache/integration-test/locator_globals.hpp
+++ b/cppcache/integration-test/locator_globals.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_LOCATOR_GLOBALS_H_
-#define GEODE_INTEGRATION_TEST_LOCATOR_GLOBALS_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,13 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_LOCATOR_GLOBALS_H_
+#define GEODE_INTEGRATION_TEST_LOCATOR_GLOBALS_H_
+
+using apache::geode::client::CacheHelper;
+
static int numberOfLocators = 1;
bool isLocalServer = false;
bool isLocator = false;
diff --git a/cppcache/integration-test/testAttributesMutator.cpp b/cppcache/integration-test/testAttributesMutator.cpp
index 558bfb8..09bc5cc 100644
--- a/cppcache/integration-test/testAttributesMutator.cpp
+++ b/cppcache/integration-test/testAttributesMutator.cpp
@@ -24,9 +24,13 @@
#include "fw_dunit.hpp"
-// this is a test.
-
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::Region;
+using apache::geode::client::RegionAttributesFactory;
class TestData {
public:
@@ -48,7 +52,7 @@ DUNIT_TASK(A, Init)
ExpirationAction::LOCAL_INVALIDATE, std::chrono::seconds(5));
auto regionAttributes = regionAttributesFactory.create();
- CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(Test.m_cache.get());
+ auto&& cacheImpl = CacheRegionHelper::getCacheImpl(Test.m_cache.get());
cacheImpl->createRegion("Local_ETTL_LI", regionAttributes, Test.m_region);
}
ENDTASK
diff --git a/cppcache/integration-test/testCache.cpp b/cppcache/integration-test/testCache.cpp
index 797a078..3cf51ab 100644
--- a/cppcache/integration-test/testCache.cpp
+++ b/cppcache/integration-test/testCache.cpp
@@ -26,7 +26,12 @@
#include "CacheImpl.hpp"
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Exception;
+using apache::geode::client::Region;
+using apache::geode::client::RegionAttributesFactory;
BEGIN_TEST(CacheFunction)
const uint32_t totalSubRegions = 3;
@@ -53,7 +58,7 @@ BEGIN_TEST(CacheFunction)
}
std::cout << "create Region with name=" << regionName << std::endl;
try {
- CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cptr.get());
+ auto cacheImpl = CacheRegionHelper::getCacheImpl(cptr.get());
cacheImpl->createRegion(regionName, regionAttributes, rptr);
} catch (Exception& ex) {
std::cout << ex.what() << std::endl;
diff --git a/cppcache/integration-test/testCacheless.cpp b/cppcache/integration-test/testCacheless.cpp
index da5eb11..1b1f1d8 100644
--- a/cppcache/integration-test/testCacheless.cpp
+++ b/cppcache/integration-test/testCacheless.cpp
@@ -22,7 +22,10 @@
#include "ThinClientHelper.hpp"
#include "TallyListener.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheListener;
+
std::shared_ptr<CacheListener> nullListenerPtr;
class RegionWrapper {
diff --git a/cppcache/integration-test/testCreateAndDestroyPool.cpp b/cppcache/integration-test/testCreateAndDestroyPool.cpp
index 0e2c2a4..09cb4d9 100644
--- a/cppcache/integration-test/testCreateAndDestroyPool.cpp
+++ b/cppcache/integration-test/testCreateAndDestroyPool.cpp
@@ -25,8 +25,6 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define SERVER1 s2p1
diff --git a/cppcache/integration-test/testDataOutput.cpp b/cppcache/integration-test/testDataOutput.cpp
index bb7f3b2..ca91131 100644
--- a/cppcache/integration-test/testDataOutput.cpp
+++ b/cppcache/integration-test/testDataOutput.cpp
@@ -27,7 +27,8 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::DataInputInternal;
+using apache::geode::client::DataOutputInternal;
void dumpnbytes(const uint8_t* buf, size_t length) {
for (size_t i = 0; i < length; i++) {
diff --git a/cppcache/integration-test/testExpiration.cpp b/cppcache/integration-test/testExpiration.cpp
index bdabc21..3bdfa3c 100644
--- a/cppcache/integration-test/testExpiration.cpp
+++ b/cppcache/integration-test/testExpiration.cpp
@@ -22,7 +22,16 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::Properties;
+using apache::geode::client::Region;
+using apache::geode::client::RegionAttributes;
+using apache::geode::client::RegionAttributesFactory;
ExpirationAction action = ExpirationAction::DESTROY;
@@ -100,7 +109,7 @@ BEGIN_TEST(TEST_EXPIRATION)
ASSERT(cache != nullptr, "Expected cache to be NON-nullptr");
- CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cache.get());
+ auto cacheImpl = CacheRegionHelper::getCacheImpl(cache.get());
size_t n;
diff --git a/cppcache/integration-test/testLRUList.cpp b/cppcache/integration-test/testLRUList.cpp
index 4a23753..3aab0f8 100644
--- a/cppcache/integration-test/testLRUList.cpp
+++ b/cppcache/integration-test/testLRUList.cpp
@@ -32,7 +32,9 @@ END_TEST(NotOnWindows)
#include <LRUList.cpp>
#include <geode/CacheableKey.hpp>
-using namespace apache::geode::client;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::LRUEntryProperties;
+using apache::geode::client::LRUList;
class MyNode : public LRUEntryProperties {
public:
diff --git a/cppcache/integration-test/testLinkage.cpp b/cppcache/integration-test/testLinkage.cpp
index 777a522..3ae6ee3 100644
--- a/cppcache/integration-test/testLinkage.cpp
+++ b/cppcache/integration-test/testLinkage.cpp
@@ -21,7 +21,46 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::AlreadyConnectedException;
+using apache::geode::client::AttributesMutator;
+using apache::geode::client::Cache;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheClosedException;
+using apache::geode::client::CacheExistsException;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheListener;
+using apache::geode::client::CacheLoader;
+using apache::geode::client::CacheLoaderException;
+using apache::geode::client::CacheWriter;
+using apache::geode::client::CacheWriterException;
+using apache::geode::client::CacheXmlException;
+using apache::geode::client::ClassCastException;
+using apache::geode::client::ConcurrentModificationException;
+using apache::geode::client::EntryDestroyedException;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::Exception;
+using apache::geode::client::FileNotFoundException;
+using apache::geode::client::GeodeConfigException;
+using apache::geode::client::GeodeIOException;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::InterruptedException;
+using apache::geode::client::LeaseExpiredException;
+using apache::geode::client::NoSystemException;
+using apache::geode::client::NullPointerException;
+using apache::geode::client::Region;
+using apache::geode::client::RegionAttributesFactory;
+using apache::geode::client::RegionDestroyedException;
+using apache::geode::client::RegionEntry;
+using apache::geode::client::RegionExistsException;
+using apache::geode::client::Serializable;
+using apache::geode::client::StatisticsDisabledException;
+using apache::geode::client::TimeoutException;
+using apache::geode::client::UnknownException;
+using apache::geode::client::UnsupportedOperationException;
/**
* @brief Test that we can link to all classes.
diff --git a/cppcache/integration-test/testLogger.cpp b/cppcache/integration-test/testLogger.cpp
index d9cd695..cb9ba2a 100644
--- a/cppcache/integration-test/testLogger.cpp
+++ b/cppcache/integration-test/testLogger.cpp
@@ -24,7 +24,10 @@
#define LENGTH_OF_BANNER 16
-using namespace apache::geode::client;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::Log;
+using apache::geode::client::LogFn;
+using apache::geode::client::LogLevel;
int numOfLinesInFile(const char* fname) {
char line[2048];
@@ -118,10 +121,16 @@ END_TEST(REINIT)
BEGIN_TEST(ALL_LEVEL)
{
for (LogLevel level : {
- LogLevel::Error, LogLevel::Warning, LogLevel::Info,
- LogLevel::Default, LogLevel::Config, LogLevel::Fine,
- LogLevel::Finer, LogLevel::Finest, LogLevel::Debug,
- }) {
+ LogLevel::Error,
+ LogLevel::Warning,
+ LogLevel::Info,
+ LogLevel::Default,
+ LogLevel::Config,
+ LogLevel::Fine,
+ LogLevel::Finer,
+ LogLevel::Finest,
+ LogLevel::Debug,
+ }) {
Log::init(level, "all_logfile");
Log::error("Error Message");
@@ -148,10 +157,16 @@ END_TEST(ALL_LEVEL)
BEGIN_TEST(ALL_LEVEL_MACRO)
{
for (LogLevel level : {
- LogLevel::Error, LogLevel::Warning, LogLevel::Info,
- LogLevel::Default, LogLevel::Config, LogLevel::Fine,
- LogLevel::Finer, LogLevel::Finest, LogLevel::Debug,
- }) {
+ LogLevel::Error,
+ LogLevel::Warning,
+ LogLevel::Info,
+ LogLevel::Default,
+ LogLevel::Config,
+ LogLevel::Fine,
+ LogLevel::Finer,
+ LogLevel::Finest,
+ LogLevel::Debug,
+ }) {
Log::init(level, "all_logfile");
LOGERROR("Error Message");
@@ -181,12 +196,18 @@ BEGIN_TEST(FILE_LIMIT)
#ifdef _WIN32
// Fail to roll file over to timestamp file on windows.
#else
- for (LogLevel level : {
- LogLevel::Error, LogLevel::Warning, LogLevel::Info,
- LogLevel::Default, LogLevel::Config, LogLevel::Fine,
- LogLevel::Finer, LogLevel::Finest, LogLevel::Debug,
- }) {
- if (level == LogLevel::Default) continue;
+ for (LogLevel level : {
+ LogLevel::Error,
+ LogLevel::Warning,
+ LogLevel::Info,
+ LogLevel::Default,
+ LogLevel::Config,
+ LogLevel::Fine,
+ LogLevel::Finer,
+ LogLevel::Finest,
+ LogLevel::Debug,
+ }) {
+ if (level == LogLevel::Default) continue;
Log::init(level, "logfile", 1);
Log::error("Error Message");
@@ -199,15 +220,15 @@ BEGIN_TEST(FILE_LIMIT)
Log::debug("Debug Message");
int lines = numOfLinesInFile("logfile.log");
- int expectedLines = static_cast<int>(level) + LENGTH_OF_BANNER -
- (level >= LogLevel::Default ? 1 : 0);
- printf("lines = %d expectedLines = %d level = %d\n", lines,
- expectedLines, static_cast<int>(level));
+ int expectedLines = static_cast<int>(level) + LENGTH_OF_BANNER -
+ (level >= LogLevel::Default ? 1 : 0);
+ printf("lines = %d expectedLines = %d level = %d\n", lines, expectedLines,
+ static_cast<int>(level));
- ASSERT(lines == expectedLines, "Wrong number of lines");
+ ASSERT(lines == expectedLines, "Wrong number of lines");
- Log::close();
- unlink("logfile.log");
+ Log::close();
+ unlink("logfile.log");
}
#endif
}
@@ -315,10 +336,16 @@ END_TEST(NO_LOG)
BEGIN_TEST(LOGFN)
{
for (LogLevel level : {
- LogLevel::Error, LogLevel::Warning, LogLevel::Info,
- LogLevel::Default, LogLevel::Config, LogLevel::Fine,
- LogLevel::Finer, LogLevel::Finest, LogLevel::Debug,
- }) {
+ LogLevel::Error,
+ LogLevel::Warning,
+ LogLevel::Info,
+ LogLevel::Default,
+ LogLevel::Config,
+ LogLevel::Fine,
+ LogLevel::Finer,
+ LogLevel::Finest,
+ LogLevel::Debug,
+ }) {
Log::init(level, "logfile");
testLogFnError();
diff --git a/cppcache/integration-test/testOverflowPutGetSqLite.cpp b/cppcache/integration-test/testOverflowPutGetSqLite.cpp
index 7e7aed7..ed6a173 100644
--- a/cppcache/integration-test/testOverflowPutGetSqLite.cpp
+++ b/cppcache/integration-test/testOverflowPutGetSqLite.cpp
@@ -29,7 +29,22 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheableToken;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::DiskPolicyType;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::PersistenceManager;
+using apache::geode::client::Properties;
+using apache::geode::client::Region;
+using apache::geode::client::RegionAttributes;
+using apache::geode::client::RegionAttributesFactory;
+using apache::geode::client::RegionShortcut;
uint32_t numOfEnt;
std::string sqlite_dir = "SqLiteRegionData";
@@ -579,7 +594,7 @@ BEGIN_TEST(OverFlowTest_MultiThreaded)
/** Create a region with caching and LRU. */
std::shared_ptr<Region> regionPtr;
- CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cachePtr.get());
+ auto cacheImpl = CacheRegionHelper::getCacheImpl(cachePtr.get());
cacheImpl->createRegion("OverFlowRegion", regionAttributes, regionPtr);
ASSERT(regionPtr != nullptr, "Expected regionPtr to be NON-nullptr");
validateAttribute(regionPtr);
@@ -619,7 +634,7 @@ BEGIN_TEST(OverFlowTest_PutGetAll)
/** Create a region with caching and LRU. */
std::shared_ptr<Region> regionPtr;
- CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cachePtr.get());
+ auto cacheImpl = CacheRegionHelper::getCacheImpl(cachePtr.get());
cacheImpl->createRegion("OverFlowRegion", regionAttributes, regionPtr);
ASSERT(regionPtr != nullptr, "Expected regionPtr to be NON-nullptr");
validateAttribute(regionPtr);
diff --git a/cppcache/integration-test/testPdxMetadataCheckTest.cpp b/cppcache/integration-test/testPdxMetadataCheckTest.cpp
index 09b196a..f69a5ff 100644
--- a/cppcache/integration-test/testPdxMetadataCheckTest.cpp
+++ b/cppcache/integration-test/testPdxMetadataCheckTest.cpp
@@ -42,16 +42,29 @@
#include "CachePerfStats.hpp"
#include <LocalRegion.hpp>
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-using namespace PdxTests;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define LOCATOR s2p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::ClassCastException;
+using apache::geode::client::FunctionService;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::UserFunctionExecutionException;
+
+using PdxTests::PdxTypes1;
+using PdxTests::PdxTypes10;
+using PdxTests::PdxTypes2;
+using PdxTests::PdxTypes3;
+using PdxTests::PdxTypes4;
+using PdxTests::PdxTypes5;
+using PdxTests::PdxTypes6;
+using PdxTests::PdxTypes7;
+using PdxTests::PdxTypes8;
+using PdxTests::PdxTypes9;
+
bool isLocator = false;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testPoolFactory.cpp b/cppcache/integration-test/testPoolFactory.cpp
index b46f4d2..dfbde7c 100644
--- a/cppcache/integration-test/testPoolFactory.cpp
+++ b/cppcache/integration-test/testPoolFactory.cpp
@@ -22,7 +22,9 @@
#include <geode/Cache.hpp>
#include <geode/PoolManager.hpp>
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
+
+using apache::geode::client::CacheFactory;
+using apache::geode::client::PoolFactory;
BEGIN_TEST(POOLFACTORY)
{
diff --git a/cppcache/integration-test/testRegionAccessThreadSafe.cpp b/cppcache/integration-test/testRegionAccessThreadSafe.cpp
index c89a921..da7251e 100644
--- a/cppcache/integration-test/testRegionAccessThreadSafe.cpp
+++ b/cppcache/integration-test/testRegionAccessThreadSafe.cpp
@@ -19,7 +19,7 @@
#include <ace/Task.h>
#include <ace/Recursive_Thread_Mutex.h>
-using namespace apache::geode::client;
+using apache::geode::client::Exception;
class GetRegionThread : public ACE_Task_Base {
public:
diff --git a/cppcache/integration-test/testRegionAttributesFactory.cpp b/cppcache/integration-test/testRegionAttributesFactory.cpp
index b0a8a46..6bda216 100644
--- a/cppcache/integration-test/testRegionAttributesFactory.cpp
+++ b/cppcache/integration-test/testRegionAttributesFactory.cpp
@@ -24,7 +24,11 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::RegionShortcut;
/* testing attributes with invalid value */
/* testing with negative values */ /*see bug no #865 */
diff --git a/cppcache/integration-test/testRegionMap.cpp b/cppcache/integration-test/testRegionMap.cpp
index 7fb6e08..c3655f2 100644
--- a/cppcache/integration-test/testRegionMap.cpp
+++ b/cppcache/integration-test/testRegionMap.cpp
@@ -19,12 +19,15 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
-
#define ROOT_NAME "testRegionMap"
#include "CacheHelper.hpp"
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Region;
+
/**
* @brief Test putting and getting entries without LRU enabled.
*/
@@ -43,7 +46,7 @@ BEGIN_TEST(TestRegionLRULastTen)
sprintf(buf, "value of %d", i);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
ASSERT(vecKeys.size() == (i + 1), "expected more entries");
}
for (i = 10; i < 20; i++) {
@@ -53,11 +56,11 @@ BEGIN_TEST(TestRegionLRULastTen)
sprintf(buf, "value of %d", i);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
cacheHelper.showKeys(vecKeys);
ASSERT(vecKeys.size() == (10), "expected 10 entries");
}
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
ASSERT(vecKeys.size() == 10, "expected 10 entries");
// verify it is the last 10 keys..
int expected = 0;
@@ -87,7 +90,7 @@ BEGIN_TEST(TestRegionNoLRU)
sprintf(buf, "value of %d", i);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
cacheHelper.showKeys(vecKeys);
ASSERT(vecKeys.size() == (i + 1), "unexpected entries count");
}
@@ -113,7 +116,7 @@ BEGIN_TEST(TestRegionLRULocal)
sprintf(buf, "value of %d", i);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
ASSERT(vecKeys.size() == (i < 10 ? i + 1 : 10), "expected more entries");
}
@@ -150,7 +153,7 @@ BEGIN_TEST(TestRecentlyUsedBit)
auto key = CacheableKey::create(buf);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
cacheHelper.showKeys(vecKeys);
ASSERT(vecKeys.size() == 10, "expected more entries");
}
@@ -160,7 +163,7 @@ BEGIN_TEST(TestRecentlyUsedBit)
auto key = CacheableKey::create(buf);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
cacheHelper.showKeys(vecKeys);
ASSERT(vecKeys.size() == 10, "expected more entries");
}
@@ -182,7 +185,7 @@ BEGIN_TEST(TestEmptiedMap)
sprintf(buf, "value of %d", i);
auto valuePtr = cacheHelper.createCacheable(buf);
regionPtr->put(key, valuePtr);
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
ASSERT(vecKeys.size() == (i + 1), "expected more entries");
}
for (i = 0; i < 10; i++) {
@@ -195,7 +198,7 @@ BEGIN_TEST(TestEmptiedMap)
<< std::dynamic_pointer_cast<CacheableString>(key)->value().c_str()
<< std::endl;
}
- std::vector<std::shared_ptr<CacheableKey>> vecKeys = regionPtr->keys();
+ auto&& vecKeys = regionPtr->keys();
ASSERT(vecKeys.size() == 0, "expected more entries");
for (i = 20; i < 40; i++) {
char buf[100];
diff --git a/cppcache/integration-test/testRegionTemplateArgs.cpp b/cppcache/integration-test/testRegionTemplateArgs.cpp
index fcec68a..84f5b4a 100644
--- a/cppcache/integration-test/testRegionTemplateArgs.cpp
+++ b/cppcache/integration-test/testRegionTemplateArgs.cpp
@@ -25,7 +25,16 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableBytes;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Region;
+using apache::geode::client::RegionAttributesFactory;
+using apache::geode::client::RegionEntry;
bool CheckBytesEqual(std::shared_ptr<CacheableBytes> result,
std::shared_ptr<Cacheable> expected) {
@@ -44,7 +53,7 @@ BEGIN_TEST(CheckTemplates)
RegionAttributesFactory regionAttributesFactory;
auto regionAttributes = regionAttributesFactory.create();
std::shared_ptr<Region> regPtr;
- CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cache.get());
+ auto&& cacheImpl = CacheRegionHelper::getCacheImpl(cache.get());
cacheImpl->createRegion("TestRegion", regionAttributes, regPtr);
const char charKey[] = "test key";
diff --git a/cppcache/integration-test/testSerialization.cpp b/cppcache/integration-test/testSerialization.cpp
index 7535845..7fbec79 100644
--- a/cppcache/integration-test/testSerialization.cpp
+++ b/cppcache/integration-test/testSerialization.cpp
@@ -33,10 +33,14 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
#include "locator_globals.hpp"
+using apache::geode::client::Cacheable;
+using apache::geode::client::DataInput;
+using apache::geode::client::DataOutput;
+using apache::geode::client::DataSerializable;
+
int32_t g_classIdToReturn = 0x04;
int32_t g_classIdToReturn2 = 0x1234;
int32_t g_classIdToReturn4 = 0x123456;
diff --git a/cppcache/integration-test/testSystemProperties.cpp b/cppcache/integration-test/testSystemProperties.cpp
index 5881d43..d2582b1 100644
--- a/cppcache/integration-test/testSystemProperties.cpp
+++ b/cppcache/integration-test/testSystemProperties.cpp
@@ -25,7 +25,10 @@
#include <unistd.h>
#endif
-using namespace apache::geode::client;
+using apache::geode::client::Log;
+using apache::geode::client::LogLevel;
+using apache::geode::client::Properties;
+using apache::geode::client::SystemProperties;
bool checkSecurityProperties(std::shared_ptr<Properties> securityProperties,
const char* key, const char* value) {
diff --git a/cppcache/integration-test/testThinClientAfterRegionLive.cpp b/cppcache/integration-test/testThinClientAfterRegionLive.cpp
index 7c52348..5bd743a 100644
--- a/cppcache/integration-test/testThinClientAfterRegionLive.cpp
+++ b/cppcache/integration-test/testThinClientAfterRegionLive.cpp
@@ -23,6 +23,9 @@
#define CLIENT1 s1p1
#define SERVER1 s2p1
#include <geode/CacheListener.hpp>
+
+using apache::geode::client::RegionEvent;
+
// CacheHelper* cacheHelper = nullptr;
static bool isLocator = false;
static bool isLocalServer = true;
@@ -31,8 +34,7 @@ static bool isRegionLive[4] = {false, false, false, false};
static bool isRegionDead[4] = {false, false, false, false};
const char* locatorsG =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
-using namespace apache::geode::client;
-using namespace test;
+
class DisconnectCacheListioner : public CacheListener {
int m_index;
diff --git a/cppcache/integration-test/testThinClientBigValue.cpp b/cppcache/integration-test/testThinClientBigValue.cpp
index 08b2d72..60a0482 100644
--- a/cppcache/integration-test/testThinClientBigValue.cpp
+++ b/cppcache/integration-test/testThinClientBigValue.cpp
@@ -27,14 +27,15 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
-
#define MEGABYTE (1024 * 1024)
#define GROWTH 5 * MEGABYTE
#define MAX_PAYLOAD 20 * MEGABYTE
#define MAX_PUTS 100000
+using apache::geode::client::CacheableBytes;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+
void grow(int* iptr) { *iptr = *iptr + GROWTH; }
void putSize(std::shared_ptr<Region>& rptr, const char* buf, int size) {
diff --git a/cppcache/integration-test/testThinClientCacheableStringArray.cpp b/cppcache/integration-test/testThinClientCacheableStringArray.cpp
index 58047c2..a3bbc93 100644
--- a/cppcache/integration-test/testThinClientCacheableStringArray.cpp
+++ b/cppcache/integration-test/testThinClientCacheableStringArray.cpp
@@ -37,13 +37,12 @@
#include "CacheImpl.hpp"
#include <hacks/range.h>
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
-
#define CLIENT1 s1p1
#define SERVER1 s2p1
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+
static int numberOfLocators = 1;
bool isLocalServer = true;
bool isLocator = true;
diff --git a/cppcache/integration-test/testThinClientCacheables.cpp b/cppcache/integration-test/testThinClientCacheables.cpp
index 4f23188..24fe03d 100644
--- a/cppcache/integration-test/testThinClientCacheables.cpp
+++ b/cppcache/integration-test/testThinClientCacheables.cpp
@@ -29,9 +29,6 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
@@ -48,6 +45,10 @@ bool isLocalServer = false;
#define KEYSIZE 256
#define VALUESIZE 1024
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::Region;
+using apache::geode::client::Utils;
+
void initClient(const bool isthinClient) {
if (cacheHelper == nullptr) {
cacheHelper = new CacheHelper(isthinClient);
diff --git a/cppcache/integration-test/testThinClientCacheablesLimits.cpp b/cppcache/integration-test/testThinClientCacheablesLimits.cpp
index 7a11a71..265563d 100644
--- a/cppcache/integration-test/testThinClientCacheablesLimits.cpp
+++ b/cppcache/integration-test/testThinClientCacheablesLimits.cpp
@@ -30,12 +30,12 @@
#include "CacheHelper.hpp"
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define SERVER1 s2p1
+using apache::geode::client::CacheHelper;
+using apache::geode::client::OutOfMemoryException;
+
static bool isLocator = false;
static bool isLocalServer = true;
static int numberOfLocators = 1;
diff --git a/cppcache/integration-test/testThinClientClearRegion.cpp b/cppcache/integration-test/testThinClientClearRegion.cpp
index 17a3ae3..76fc3bb 100644
--- a/cppcache/integration-test/testThinClientClearRegion.cpp
+++ b/cppcache/integration-test/testThinClientClearRegion.cpp
@@ -22,8 +22,10 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableBytes;
+using apache::geode::client::CacheWriter;
+using apache::geode::client::RegionEvent;
+
class MyCacheWriter : public CacheWriter {
uint32_t m_clear;
diff --git a/cppcache/integration-test/testThinClientConflation.cpp b/cppcache/integration-test/testThinClientConflation.cpp
index 83152d1..a81d071 100644
--- a/cppcache/integration-test/testThinClientConflation.cpp
+++ b/cppcache/integration-test/testThinClientConflation.cpp
@@ -38,6 +38,8 @@ Server side two
#define SERVER1 s2p1
#define FEEDER s2p2
+using apache::geode::client::EntryEvent;
+
class OperMonitor : public CacheListener {
int m_events;
int m_value;
diff --git a/cppcache/integration-test/testThinClientContainsKeyOnServer.cpp b/cppcache/integration-test/testThinClientContainsKeyOnServer.cpp
index 92cd416..c1e0d55 100644
--- a/cppcache/integration-test/testThinClientContainsKeyOnServer.cpp
+++ b/cppcache/integration-test/testThinClientContainsKeyOnServer.cpp
@@ -22,8 +22,7 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableBytes;
#include "locator_globals.hpp"
@@ -90,9 +89,11 @@ DUNIT_TASK(SERVER1, StopServer)
LOG("SERVER stopped");
}
END_TASK(StopServer)
+
DUNIT_TASK(CLIENT1, CloseCache1)
{ cleanProc(); }
END_TASK(CloseCache1)
+
DUNIT_TASK(CLIENT2, CloseCache2)
{ cleanProc(); }
END_TASK(CloseCache2)
diff --git a/cppcache/integration-test/testThinClientCq.cpp b/cppcache/integration-test/testThinClientCq.cpp
index d8e7a77..8068f3b 100644
--- a/cppcache/integration-test/testThinClientCq.cpp
+++ b/cppcache/integration-test/testThinClientCq.cpp
@@ -38,10 +38,6 @@
#include "ThinClientCQ.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define CLIENT2 s1p2
@@ -49,6 +45,16 @@ using namespace testData;
#define MAX_LISTNER 8
+using apache::geode::client::Cacheable;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::CqOperation;
+using apache::geode::client::CqStatusListener;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
// CacheHelper* cacheHelper = nullptr;
static bool m_isPdx = false;
diff --git a/cppcache/integration-test/testThinClientCqDelta.cpp b/cppcache/integration-test/testThinClientCqDelta.cpp
index 303602d..ebb480c 100644
--- a/cppcache/integration-test/testThinClientCqDelta.cpp
+++ b/cppcache/integration-test/testThinClientCqDelta.cpp
@@ -30,9 +30,15 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
CacheHelper* cacheHelper = nullptr;
@@ -43,6 +49,8 @@ CacheHelper* cacheHelper = nullptr;
#define SERVER1 s2p1
#include "LocatorHelper.hpp"
+using testobject::DeltaTestImpl;
+
CacheHelper* getHelper() {
ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
return cacheHelper;
diff --git a/cppcache/integration-test/testThinClientCqDurable.cpp b/cppcache/integration-test/testThinClientCqDurable.cpp
index 6e674fe..b70652a 100644
--- a/cppcache/integration-test/testThinClientCqDurable.cpp
+++ b/cppcache/integration-test/testThinClientCqDurable.cpp
@@ -41,14 +41,22 @@
#include "QueryHelper.hpp"
#include "ThinClientCQ.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define CLIENT2 s1p2
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::CqOperation;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+using apache::geode::client::RegionShortcut;
+
const char* durableIds[] = {"DurableId1", "DurableId2"};
const char* cqName = "MyCq";
diff --git a/cppcache/integration-test/testThinClientCqFailover.cpp b/cppcache/integration-test/testThinClientCqFailover.cpp
index c8b4632..afcb4aa 100644
--- a/cppcache/integration-test/testThinClientCqFailover.cpp
+++ b/cppcache/integration-test/testThinClientCqFailover.cpp
@@ -41,15 +41,19 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
const char* cqName = "MyCq";
class MyCqListener : public CqListener {
diff --git a/cppcache/integration-test/testThinClientCqHAFailover.cpp b/cppcache/integration-test/testThinClientCqHAFailover.cpp
index e0be5f3..888d267 100644
--- a/cppcache/integration-test/testThinClientCqHAFailover.cpp
+++ b/cppcache/integration-test/testThinClientCqHAFailover.cpp
@@ -38,15 +38,18 @@
#include "ThinClientCQ.hpp"
#include <hacks/range.h>
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
const char* cqName = "MyCq";
const char* regionNamesCq[] = {"Portfolios", "Positions"};
diff --git a/cppcache/integration-test/testThinClientCqIR.cpp b/cppcache/integration-test/testThinClientCqIR.cpp
index a7cdc4a..2704700 100644
--- a/cppcache/integration-test/testThinClientCqIR.cpp
+++ b/cppcache/integration-test/testThinClientCqIR.cpp
@@ -38,14 +38,16 @@
#include "ThinClientCQ.hpp"
#include <hacks/range.h>
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define CLIENT2 s1p2
+using apache::geode::client::Cacheable;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
const char* cqName = "MyCq";
void initClientCq(const bool isthinClient) {
diff --git a/cppcache/integration-test/testThinClientDeltaWithNotification.cpp b/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
index 4aab6c7..d25fc3d 100644
--- a/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
+++ b/cppcache/integration-test/testThinClientDeltaWithNotification.cpp
@@ -25,8 +25,12 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::IllegalStateException;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientDisconnectionListioner.cpp b/cppcache/integration-test/testThinClientDisconnectionListioner.cpp
index d3989ec..ef1d673 100644
--- a/cppcache/integration-test/testThinClientDisconnectionListioner.cpp
+++ b/cppcache/integration-test/testThinClientDisconnectionListioner.cpp
@@ -30,8 +30,7 @@ static int numberOfLocators = 1;
static int isDisconnected = false;
const char* locatorsG =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
-using namespace apache::geode::client;
-using namespace test;
+
class DisconnectCacheListioner : public CacheListener {
void afterRegionDisconnected(Region&) override {
LOG("After Region Disconnected event received");
diff --git a/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp b/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
index 583658c..ad662ad 100644
--- a/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
+++ b/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
@@ -31,10 +31,15 @@
#include "ThinClientHelper.hpp"
+using apache::geode::client::CacheServerException;
+using apache::geode::client::CacheWriterException;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::Exception;
+using apache::geode::client::FixedPartitionResolver;
+
const char* partitionRegionNames[] = {"R1", "R2", "R3"};
const char* partitionRegionName;
-using namespace apache::geode::client;
class CustomFixedPartitionResolver1 : public FixedPartitionResolver {
public:
CustomFixedPartitionResolver1() {}
diff --git a/cppcache/integration-test/testThinClientGetInterests.cpp b/cppcache/integration-test/testThinClientGetInterests.cpp
index 616e919..11310de 100644
--- a/cppcache/integration-test/testThinClientGetInterests.cpp
+++ b/cppcache/integration-test/testThinClientGetInterests.cpp
@@ -23,8 +23,6 @@
#include "locator_globals.hpp"
-using namespace apache::geode::client;
-using namespace test;
const char* durableIds[] = {"DurableId1", "DurableId2"};
diff --git a/cppcache/integration-test/testThinClientHADistOps.cpp b/cppcache/integration-test/testThinClientHADistOps.cpp
index ddf98b6..ef5f76d 100644
--- a/cppcache/integration-test/testThinClientHADistOps.cpp
+++ b/cppcache/integration-test/testThinClientHADistOps.cpp
@@ -25,14 +25,17 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Properties;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientHAEventIDMap.cpp b/cppcache/integration-test/testThinClientHAEventIDMap.cpp
index fb1c92b..4716272 100644
--- a/cppcache/integration-test/testThinClientHAEventIDMap.cpp
+++ b/cppcache/integration-test/testThinClientHAEventIDMap.cpp
@@ -31,8 +31,14 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheListener;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::Properties;
class DupChecker : public CacheListener {
int m_ops;
diff --git a/cppcache/integration-test/testThinClientHAFailover.cpp b/cppcache/integration-test/testThinClientHAFailover.cpp
index 62d3c71..2b6cdb2 100644
--- a/cppcache/integration-test/testThinClientHAFailover.cpp
+++ b/cppcache/integration-test/testThinClientHAFailover.cpp
@@ -25,8 +25,10 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Properties;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientHAFailoverRegex.cpp b/cppcache/integration-test/testThinClientHAFailoverRegex.cpp
index da77b2f..10e9ae4 100644
--- a/cppcache/integration-test/testThinClientHAFailoverRegex.cpp
+++ b/cppcache/integration-test/testThinClientHAFailoverRegex.cpp
@@ -25,11 +25,13 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
bool isLocalServer = false;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Properties;
+
CacheHelper* cacheHelper = nullptr;
volatile int g_redundancyLevel = 0;
diff --git a/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp b/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
index a0b2a75..cd073bc 100644
--- a/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
+++ b/cppcache/integration-test/testThinClientHAMixedRedundancy.cpp
@@ -25,8 +25,10 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Properties;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientHAPeriodicAck.cpp b/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
index 5dab3f8..a12a01c 100644
--- a/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
+++ b/cppcache/integration-test/testThinClientHAPeriodicAck.cpp
@@ -31,8 +31,15 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheListener;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::Properties;
+using apache::geode::client::RegionEvent;
class DupChecker : public CacheListener {
int m_ops;
diff --git a/cppcache/integration-test/testThinClientHAQueryFailover.cpp b/cppcache/integration-test/testThinClientHAQueryFailover.cpp
index bf75bda..0201a93 100644
--- a/cppcache/integration-test/testThinClientHAQueryFailover.cpp
+++ b/cppcache/integration-test/testThinClientHAQueryFailover.cpp
@@ -36,14 +36,21 @@
#include "testobject/Portfolio.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+using apache::geode::client::SelectResults;
+
+using testobject::Portfolio;
+using testobject::Position;
+
CacheHelper* cacheHelper = nullptr;
static bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientHeapLRU.cpp b/cppcache/integration-test/testThinClientHeapLRU.cpp
index 1e56a90..d9af437 100644
--- a/cppcache/integration-test/testThinClientHeapLRU.cpp
+++ b/cppcache/integration-test/testThinClientHeapLRU.cpp
@@ -26,8 +26,6 @@
#include <string>
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
diff --git a/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp b/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp
index d6b5828..dbcb3a1 100644
--- a/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp
+++ b/cppcache/integration-test/testThinClientIntResPolKeysInv.cpp
@@ -24,13 +24,15 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+
CacheHelper *cacheHelper = nullptr;
#include "locator_globals.hpp"
diff --git a/cppcache/integration-test/testThinClientInterest1Cacheless.cpp b/cppcache/integration-test/testThinClientInterest1Cacheless.cpp
index 304fe5e..d34712f 100644
--- a/cppcache/integration-test/testThinClientInterest1Cacheless.cpp
+++ b/cppcache/integration-test/testThinClientInterest1Cacheless.cpp
@@ -24,8 +24,7 @@
#include "locator_globals.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::EntryEvent;
class MyListener;
diff --git a/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp b/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
index 70febc1..61e2f4f 100644
--- a/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
+++ b/cppcache/integration-test/testThinClientInterest1_Bug1001.cpp
@@ -22,11 +22,14 @@
#define CLIENT2 s1p2
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
-
#include "locator_globals.hpp"
#include "LocatorHelper.hpp"
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableFloat;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::Exception;
+
std::shared_ptr<CacheableString> getUString(int index) {
std::wstring baseStr(40, L'\x20AC');
wchar_t indexStr[15];
@@ -34,272 +37,272 @@ std::shared_ptr<CacheableString> getUString(int index) {
baseStr.append(indexStr);
return CacheableString::create(baseStr);
}
- std::shared_ptr<CacheableString> getUAString(int index) {
- std::wstring baseStr(40, L'A');
- wchar_t indexStr[15];
- swprintf(indexStr, 14, L"%10d", index);
- baseStr.append(indexStr);
- return CacheableString::create(baseStr);
- }
+std::shared_ptr<CacheableString> getUAString(int index) {
+ std::wstring baseStr(40, L'A');
+ wchar_t indexStr[15];
+ swprintf(indexStr, 14, L"%10d", index);
+ baseStr.append(indexStr);
+ return CacheableString::create(baseStr);
+}
- DUNIT_TASK_DEFINITION(CLIENT1, SetupClient1)
- {
- initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
- true);
- getHelper()->createPooledRegion(regionNames[0], false, locatorsG,
- "__TEST_POOL1__", true, true);
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, SetupClient1)
+ {
+ initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
+ true);
+ getHelper()->createPooledRegion(regionNames[0], false, locatorsG,
+ "__TEST_POOL1__", true, true);
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, populateServer)
- {
- auto regPtr = getHelper()->getRegion(regionNames[0]);
- for (int i = 0; i < 5; i++) {
- auto keyPtr = CacheableKey::create(keys[i]);
- regPtr->create(keyPtr, vals[i]);
- }
- SLEEP(200);
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, populateServer)
+ {
+ auto regPtr = getHelper()->getRegion(regionNames[0]);
+ for (int i = 0; i < 5; i++) {
+ auto keyPtr = CacheableKey::create(keys[i]);
+ regPtr->create(keyPtr, vals[i]);
+ }
+ SLEEP(200);
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, setupClient2)
- {
- initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
- true);
- getHelper()->createPooledRegion(regionNames[0], false, locatorsG,
- "__TEST_POOL1__", true, true);
- auto regPtr = getHelper()->getRegion(regionNames[0]);
- regPtr->registerAllKeys(false, true);
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, setupClient2)
+ {
+ initClientWithPool(true, "__TEST_POOL1__", locatorsG, nullptr, nullptr, 0,
+ true);
+ getHelper()->createPooledRegion(regionNames[0], false, locatorsG,
+ "__TEST_POOL1__", true, true);
+ auto regPtr = getHelper()->getRegion(regionNames[0]);
+ regPtr->registerAllKeys(false, true);
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, verify)
- {
- auto regPtr = getHelper()->getRegion(regionNames[0]);
- for (int i = 0; i < 5; i++) {
- auto keyPtr1 = CacheableKey::create(keys[i]);
- char buf[1024];
- sprintf(buf, "key[%s] should have been found", keys[i]);
- ASSERT(regPtr->containsKey(keyPtr1), buf);
- }
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, verify)
+ {
+ auto regPtr = getHelper()->getRegion(regionNames[0]);
+ for (int i = 0; i < 5; i++) {
+ auto keyPtr1 = CacheableKey::create(keys[i]);
+ char buf[1024];
+ sprintf(buf, "key[%s] should have been found", keys[i]);
+ ASSERT(regPtr->containsKey(keyPtr1), buf);
+ }
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, updateKeys)
- {
- auto regPtr = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto keyPtr = CacheableKey::create(keys[index]);
- regPtr->put(keyPtr, nvals[index]);
- }
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, updateKeys)
+ {
+ auto regPtr = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto keyPtr = CacheableKey::create(keys[index]);
+ regPtr->put(keyPtr, nvals[index]);
+ }
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, verifyUpdates)
- {
- SLEEP(2000);
- auto regPtr = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto keyPtr = CacheableKey::create(keys[index]);
- char buf[1024];
- sprintf(buf, "key[%s] should have been found", keys[index]);
- ASSERT(regPtr->containsKey(keyPtr), buf);
- auto val = std::dynamic_pointer_cast<CacheableString>(
- regPtr->getEntry(keyPtr)->getValue());
- ASSERT(strcmp(val->value().c_str(), nvals[index]) == 0,
- "Incorrect value for key");
- }
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, verifyUpdates)
+ {
+ SLEEP(2000);
+ auto regPtr = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto keyPtr = CacheableKey::create(keys[index]);
+ char buf[1024];
+ sprintf(buf, "key[%s] should have been found", keys[index]);
+ ASSERT(regPtr->containsKey(keyPtr), buf);
+ auto val = std::dynamic_pointer_cast<CacheableString>(
+ regPtr->getEntry(keyPtr)->getValue());
+ ASSERT(strcmp(val->value().c_str(), nvals[index]) == 0,
+ "Incorrect value for key");
+ }
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, PutUnicodeStrings)
- {
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUString(index);
- auto val = Cacheable::create(index + 100);
- reg0->put(key, val);
- }
- LOG("PutUnicodeStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, PutUnicodeStrings)
+ {
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUString(index);
+ auto val = Cacheable::create(index + 100);
+ reg0->put(key, val);
+ }
+ LOG("PutUnicodeStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, GetUnicodeStrings)
- {
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUString(index);
- auto val = std::dynamic_pointer_cast<CacheableInt32>(reg0->get(key));
- ASSERT(val != nullptr, "expected non-null value in get");
- ASSERT(val->value() == (index + 100), "unexpected value in get");
- }
- reg0->unregisterAllKeys();
- std::vector<std::shared_ptr<CacheableKey>> vec;
- for (int index = 0; index < 5; ++index) {
- auto key = getUString(index);
- vec.push_back(key);
- }
- reg0->registerKeys(vec);
- LOG("GetUnicodeStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, GetUnicodeStrings)
+ {
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUString(index);
+ auto val = std::dynamic_pointer_cast<CacheableInt32>(reg0->get(key));
+ ASSERT(val != nullptr, "expected non-null value in get");
+ ASSERT(val->value() == (index + 100), "unexpected value in get");
+ }
+ reg0->unregisterAllKeys();
+ std::vector<std::shared_ptr<CacheableKey>> vec;
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUString(index);
+ vec.push_back(key);
+ }
+ reg0->registerKeys(vec);
+ LOG("GetUnicodeStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, UpdateUnicodeStrings)
- {
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUString(index);
- auto val = CacheableFloat::create(index + 20.0F);
- reg0->put(key, val);
- }
- LOG("UpdateUnicodeStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, UpdateUnicodeStrings)
+ {
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUString(index);
+ auto val = CacheableFloat::create(index + 20.0F);
+ reg0->put(key, val);
+ }
+ LOG("UpdateUnicodeStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, CheckUpdateUnicodeStrings)
- {
- SLEEP(2000);
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUString(index);
- auto val = std::dynamic_pointer_cast<CacheableFloat>(
- reg0->getEntry(key)->getValue());
- ASSERT(val != nullptr, "expected non-null value in get");
- ASSERT(val->value() == (index + 20.0F), "unexpected value in get");
- }
- LOG("CheckUpdateUnicodeStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, CheckUpdateUnicodeStrings)
+ {
+ SLEEP(2000);
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUString(index);
+ auto val = std::dynamic_pointer_cast<CacheableFloat>(
+ reg0->getEntry(key)->getValue());
+ ASSERT(val != nullptr, "expected non-null value in get");
+ ASSERT(val->value() == (index + 20.0F), "unexpected value in get");
+ }
+ LOG("CheckUpdateUnicodeStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, PutASCIIAsWideStrings)
- {
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUAString(index);
- auto val = getUString(index + 20);
- reg0->put(key, val);
- }
- LOG("PutASCIIAsWideStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, PutASCIIAsWideStrings)
+ {
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUAString(index);
+ auto val = getUString(index + 20);
+ reg0->put(key, val);
+ }
+ LOG("PutASCIIAsWideStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, GetASCIIAsWideStrings)
- {
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUAString(index);
- auto val = std::dynamic_pointer_cast<CacheableString>(reg0->get(key));
- auto expectedVal = getUString(index + 20);
- ASSERT(val != nullptr, "expected non-null value in get");
- ASSERT(val->value() == expectedVal->value(), "values aren't equal");
- }
- std::vector<std::shared_ptr<CacheableKey>> vec;
- for (int index = 0; index < 5; ++index) {
- auto key = getUAString(index);
- vec.push_back(key);
- }
- reg0->registerKeys(vec);
- LOG("GetASCIIAsWideStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, GetASCIIAsWideStrings)
+ {
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUAString(index);
+ auto val = std::dynamic_pointer_cast<CacheableString>(reg0->get(key));
+ auto expectedVal = getUString(index + 20);
+ ASSERT(val != nullptr, "expected non-null value in get");
+ ASSERT(val->value() == expectedVal->value(), "values aren't equal");
+ }
+ std::vector<std::shared_ptr<CacheableKey>> vec;
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUAString(index);
+ vec.push_back(key);
+ }
+ reg0->registerKeys(vec);
+ LOG("GetASCIIAsWideStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, UpdateASCIIAsWideStrings)
- {
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUAString(index);
- auto val = getUAString(index + 10);
- reg0->put(key, val);
- }
- LOG("UpdateASCIIAsWideStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, UpdateASCIIAsWideStrings)
+ {
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUAString(index);
+ auto val = getUAString(index + 10);
+ reg0->put(key, val);
+ }
+ LOG("UpdateASCIIAsWideStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, CheckUpdateASCIIAsWideStrings)
- {
- SLEEP(2000);
- auto reg0 = getHelper()->getRegion(regionNames[0]);
- for (int index = 0; index < 5; ++index) {
- auto key = getUAString(index);
- auto val = std::dynamic_pointer_cast<CacheableString>(reg0->get(key));
- auto expectedVal = getUAString(index + 10);
- ASSERT(val != nullptr, "expected non-null value in get");
- ASSERT(*val.get() == *expectedVal.get(), "unexpected value in get");
- }
- LOG("CheckUpdateASCIIAsWideStrings complete.");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, CheckUpdateASCIIAsWideStrings)
+ {
+ SLEEP(2000);
+ auto reg0 = getHelper()->getRegion(regionNames[0]);
+ for (int index = 0; index < 5; ++index) {
+ auto key = getUAString(index);
+ auto val = std::dynamic_pointer_cast<CacheableString>(reg0->get(key));
+ auto expectedVal = getUAString(index + 10);
+ ASSERT(val != nullptr, "expected non-null value in get");
+ ASSERT(*val.get() == *expectedVal.get(), "unexpected value in get");
+ }
+ LOG("CheckUpdateASCIIAsWideStrings complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, CheckUpdateBug1001)
- {
- try {
- const wchar_t* str = L"Pivotal";
- auto lCStringP = CacheableString::create(str);
- lCStringP->value();
- } catch (const Exception& geodeExcp) {
- printf("%s: %s", geodeExcp.getName().c_str(), geodeExcp.what());
- FAIL("Should not have got exception.");
- }
+DUNIT_TASK_DEFINITION(CLIENT1, CheckUpdateBug1001)
+ {
+ try {
+ const wchar_t* str = L"Pivotal";
+ auto lCStringP = CacheableString::create(str);
+ lCStringP->value();
+ } catch (const Exception& geodeExcp) {
+ printf("%s: %s", geodeExcp.getName().c_str(), geodeExcp.what());
+ FAIL("Should not have got exception.");
+ }
- try {
- const wchar_t* str =
- L"Pivotal\\u7b2c"
- "17"
- "\\u53f7";
- auto lCStringP = CacheableString::create(str);
- lCStringP->value();
- } catch (const Exception& geodeExcp) {
- printf("%s: %s", geodeExcp.getName().c_str(), geodeExcp.what());
- FAIL("Should not have got exception.");
- }
+ try {
+ const wchar_t* str =
+ L"Pivotal\\u7b2c"
+ "17"
+ "\\u53f7";
+ auto lCStringP = CacheableString::create(str);
+ lCStringP->value();
+ } catch (const Exception& geodeExcp) {
+ printf("%s: %s", geodeExcp.getName().c_str(), geodeExcp.what());
+ FAIL("Should not have got exception.");
+ }
- LOG("CheckUpdateBug1001 complete.");
- }
- END_TASK_DEFINITION
+ LOG("CheckUpdateBug1001 complete.");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT1, StopClient1)
- {
- cleanProc();
- LOG("CLIENT1 stopped");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT1, StopClient1)
+ {
+ cleanProc();
+ LOG("CLIENT1 stopped");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(CLIENT2, StopClient2)
- {
- cleanProc();
- LOG("CLIENT2 stopped");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(CLIENT2, StopClient2)
+ {
+ cleanProc();
+ LOG("CLIENT2 stopped");
+ }
+END_TASK_DEFINITION
- DUNIT_TASK_DEFINITION(SERVER1, StopServer)
- {
- if (isLocalServer) CacheHelper::closeServer(1);
- LOG("SERVER stopped");
- }
- END_TASK_DEFINITION
+DUNIT_TASK_DEFINITION(SERVER1, StopServer)
+ {
+ if (isLocalServer) CacheHelper::closeServer(1);
+ LOG("SERVER stopped");
+ }
+END_TASK_DEFINITION
- DUNIT_MAIN
- {
- CALL_TASK(CreateLocator1)
- CALL_TASK(CreateServer1_With_Locator);
- CALL_TASK(SetupClient1);
- CALL_TASK(populateServer);
- CALL_TASK(setupClient2);
- CALL_TASK(verify);
- CALL_TASK(updateKeys);
- CALL_TASK(verifyUpdates);
- CALL_TASK(PutUnicodeStrings);
- CALL_TASK(GetUnicodeStrings);
- CALL_TASK(UpdateUnicodeStrings);
- CALL_TASK(CheckUpdateUnicodeStrings);
- CALL_TASK(PutASCIIAsWideStrings);
- CALL_TASK(GetASCIIAsWideStrings);
- CALL_TASK(UpdateASCIIAsWideStrings);
- CALL_TASK(CheckUpdateASCIIAsWideStrings);
- CALL_TASK(CheckUpdateBug1001);
- CALL_TASK(StopClient1);
- CALL_TASK(StopClient2);
- CALL_TASK(StopServer);
- CALL_TASK(CloseLocator1);
- }
- END_MAIN
+DUNIT_MAIN
+ {
+ CALL_TASK(CreateLocator1)
+ CALL_TASK(CreateServer1_With_Locator);
+ CALL_TASK(SetupClient1);
+ CALL_TASK(populateServer);
+ CALL_TASK(setupClient2);
+ CALL_TASK(verify);
+ CALL_TASK(updateKeys);
+ CALL_TASK(verifyUpdates);
+ CALL_TASK(PutUnicodeStrings);
+ CALL_TASK(GetUnicodeStrings);
+ CALL_TASK(UpdateUnicodeStrings);
+ CALL_TASK(CheckUpdateUnicodeStrings);
+ CALL_TASK(PutASCIIAsWideStrings);
+ CALL_TASK(GetASCIIAsWideStrings);
+ CALL_TASK(UpdateASCIIAsWideStrings);
+ CALL_TASK(CheckUpdateASCIIAsWideStrings);
+ CALL_TASK(CheckUpdateBug1001);
+ CALL_TASK(StopClient1);
+ CALL_TASK(StopClient2);
+ CALL_TASK(StopServer);
+ CALL_TASK(CloseLocator1);
+ }
+END_MAIN
diff --git a/cppcache/integration-test/testThinClientInterestNotify.cpp b/cppcache/integration-test/testThinClientInterestNotify.cpp
index fa2678c..b19d20e 100644
--- a/cppcache/integration-test/testThinClientInterestNotify.cpp
+++ b/cppcache/integration-test/testThinClientInterestNotify.cpp
@@ -35,6 +35,9 @@ invalidates).
#define SERVER_AND_FEEDER s2p2
#define SERVER1 s2p2 // duplicate definition required for a helper file
+using apache::geode::client::EntryEvent;
+using apache::geode::client::Exception;
+
class EventListener : public CacheListener {
public:
int m_creates;
diff --git a/cppcache/integration-test/testThinClientLRUExpiration.cpp b/cppcache/integration-test/testThinClientLRUExpiration.cpp
index 3e8ee37..ef6fcbf 100644
--- a/cppcache/integration-test/testThinClientLRUExpiration.cpp
+++ b/cppcache/integration-test/testThinClientLRUExpiration.cpp
@@ -31,14 +31,17 @@
#include "TallyListener.hpp"
#include "TallyWriter.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace apache::geode::internal::chrono::duration;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
+using apache::geode::client::CacheHelper;
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::Exception;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::RegionAttributes;
+using apache::geode::client::RegionDestroyedException;
+
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
@@ -72,6 +75,8 @@ CacheHelper* getHelper() {
return cacheHelper;
}
void printAttribute(RegionAttributes attr) {
+ using apache::geode::internal::chrono::duration::to_string;
+
printf("CachingEnable: %s\n",
attr.getCachingEnabled() ? "enabled" : "disabled");
printf("InitialCapacity: %d\n", attr.getInitialCapacity());
@@ -81,8 +86,7 @@ void printAttribute(RegionAttributes attr) {
to_string(attr.getRegionTimeToLive()).c_str());
printf("RegionIdleTimeout: %s\n",
to_string(attr.getRegionIdleTimeout()).c_str());
- printf("EntryTimeToLive: %s\n",
- to_string(attr.getEntryTimeToLive()).c_str());
+ printf("EntryTimeToLive: %s\n", to_string(attr.getEntryTimeToLive()).c_str());
printf("EntryIdleTimeout: %s\n",
to_string(attr.getEntryIdleTimeout()).c_str());
printf("getLruEntriesLimit: %d\n", attr.getLruEntriesLimit());
@@ -101,32 +105,34 @@ void printAttribute(RegionAttributes attr) {
// printf("getEndPoint: %s\n",attr.getEndpoints());
}
-void setCacheListener(const char* regName, std::shared_ptr<TallyListener> regListener) {
+void setCacheListener(const char* regName,
+ std::shared_ptr<TallyListener> regListener) {
auto reg = getHelper()->getRegion(regName);
auto attrMutator = reg->getAttributesMutator();
attrMutator->setCacheListener(regListener);
}
-void setCacheWriter(const char* regName, std::shared_ptr<TallyWriter> regWriter) {
+void setCacheWriter(const char* regName,
+ std::shared_ptr<TallyWriter> regWriter) {
auto reg = getHelper()->getRegion(regName);
auto attrMutator = reg->getAttributesMutator();
attrMutator->setCacheWriter(regWriter);
}
void getRegionAttr(const char* name) {
- auto rptr = getHelper()->getRegion(name);
- auto m_currRegionAttributesPtr = rptr->getAttributes();
- printAttribute(m_currRegionAttributesPtr);
+ auto rptr = getHelper()->getRegion(name);
+ auto m_currRegionAttributesPtr = rptr->getAttributes();
+ printAttribute(m_currRegionAttributesPtr);
}
void ValidateDestroyRegion(const char* name) {
- auto rptr = getHelper()->getRegion(name);
- if (rptr == nullptr) {
- return;
- }
- try {
- rptr->put(1, 2);
- FAIL("Put should not be happened");
+ auto rptr = getHelper()->getRegion(name);
+ if (rptr == nullptr) {
+ return;
+ }
+ try {
+ rptr->put(1, 2);
+ FAIL("Put should not be happened");
} catch (RegionDestroyedException& ex) {
char buffer[1024];
sprintf(buffer, "Got expected exception %s: msg = %s", ex.getName().c_str(),
@@ -169,42 +175,42 @@ void doRgnOperations(const char* name, int n, int rgnOpt = 0) {
value = CacheableString::create(buf);
ASSERT(value != nullptr, "Failed to create value.");
}
- auto rptr = getHelper()->getRegion(name);
- ASSERT(rptr != nullptr, "Region not found.");
- for (int i = 0; i < n; i++) {
- sprintf(buf, "KeyA - %d", i + 1);
- auto key = CacheableKey::create(buf);
- switch (rgnOpt) {
- case 0:
- rptr->put(key, value);
- break;
- case 1:
- rptr->invalidate(key);
- break;
- case 2:
- rptr->localInvalidate(key);
- break;
- case 3:
- rptr->destroy(key);
- break;
- case 4:
- rptr->localDestroy(key);
- break;
- case 5:
- rptr->get(key);
- break;
- }
+ auto rptr = getHelper()->getRegion(name);
+ ASSERT(rptr != nullptr, "Region not found.");
+ for (int i = 0; i < n; i++) {
+ sprintf(buf, "KeyA - %d", i + 1);
+ auto key = CacheableKey::create(buf);
+ switch (rgnOpt) {
+ case 0:
+ rptr->put(key, value);
+ break;
+ case 1:
+ rptr->invalidate(key);
+ break;
+ case 2:
+ rptr->localInvalidate(key);
+ break;
+ case 3:
+ rptr->destroy(key);
+ break;
+ case 4:
+ rptr->localDestroy(key);
+ break;
+ case 5:
+ rptr->get(key);
+ break;
+ }
}
}
void dumpCounters(const char* regName) {
- auto rptr = getHelper()->getRegion(regName);
- printf("Region size: %d\n", rptr->size());
- if (regListener != nullptr) {
- printf("counts:: creates: %d, updates: %d, invalidates: %d, destroys: %d\n",
- regListener->getCreates(), regListener->getUpdates(),
- regListener->getInvalidates(), regListener->getDestroys());
- }
+ auto rptr = getHelper()->getRegion(regName);
+ printf("Region size: %d\n", rptr->size());
+ if (regListener != nullptr) {
+ printf("counts:: creates: %d, updates: %d, invalidates: %d, destroys: %d\n",
+ regListener->getCreates(), regListener->getUpdates(),
+ regListener->getInvalidates(), regListener->getDestroys());
+ }
}
size_t getNumOfEntries(const char* regName, bool isValue = false) {
@@ -212,15 +218,15 @@ size_t getNumOfEntries(const char* regName, bool isValue = false) {
useRegionSize = !useRegionSize;
dumpCounters(regName);
- auto rptr = getHelper()->getRegion(regName);
- if (isValue) {
- auto v = rptr->values();
- printf("Region value size: %zd\n", v.size());
- return v.size();
- } else if (!useRegionSize) {
- auto v = rptr->keys();
- printf("Region key size: %zd\n", v.size());
- return v.size();
+ auto rptr = getHelper()->getRegion(regName);
+ if (isValue) {
+ auto v = rptr->values();
+ printf("Region value size: %zd\n", v.size());
+ return v.size();
+ } else if (!useRegionSize) {
+ auto v = rptr->keys();
+ printf("Region key size: %zd\n", v.size());
+ return v.size();
} else {
return rptr->size();
}
@@ -228,10 +234,10 @@ size_t getNumOfEntries(const char* regName, bool isValue = false) {
void localDestroyRegion(const char* name) {
LOG("localDestroyRegion() entered.");
- auto regPtr = getHelper()->getRegion(name);
- regPtr->localDestroyRegion();
- ASSERT(regPtr->isDestroyed() == true, "Expected Region to be destroyed");
- LOG("Locally Region destroyed.");
+ auto regPtr = getHelper()->getRegion(name);
+ regPtr->localDestroyRegion();
+ ASSERT(regPtr->isDestroyed() == true, "Expected Region to be destroyed");
+ LOG("Locally Region destroyed.");
}
void createThinClientRegion(
@@ -1206,8 +1212,8 @@ DUNIT_TASK(CLIENT2, StepTwoCase13)
regWriter = std::make_shared<TallyWriter>();
setCacheListener(regionNames[5], regListener);
setCacheWriter(regionNames[5], regWriter);
- auto regPtr0 = getHelper()->getRegion(regionNames[5]);
- regPtr0->registerAllKeys();
+ auto regPtr0 = getHelper()->getRegion(regionNames[5]);
+ regPtr0->registerAllKeys();
}
END_TASK(StepTwoCase13)
diff --git a/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp b/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
index ad7100f..97ce2f7 100644
--- a/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
+++ b/cppcache/integration-test/testThinClientListenerCallbackArgTest.cpp
@@ -33,10 +33,8 @@
#define SERVER1 s2p1
#include "testobject/Portfolio.hpp"
-using namespace testobject;
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::ClassCastException;
bool isLocalServer = true;
static bool isLocator = false;
@@ -44,9 +42,8 @@ const char* locatorsG =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
#include "LocatorHelper.hpp"
-//---------------------------------------------------------------------------------
-using namespace apache::geode::client;
-class CallbackListener;
+using testobject::Portfolio;
+using testobject::Position;
class CallbackListener : public CacheListener {
private:
diff --git a/cppcache/integration-test/testThinClientListenerEvents.cpp b/cppcache/integration-test/testThinClientListenerEvents.cpp
index 440e614..c389dd6 100644
--- a/cppcache/integration-test/testThinClientListenerEvents.cpp
+++ b/cppcache/integration-test/testThinClientListenerEvents.cpp
@@ -21,17 +21,14 @@
#define CLIENT1 s1p1
#define SERVER1 s2p1
-using namespace apache::geode::client;
-using namespace test;
#include "locator_globals.hpp"
#include "LocatorHelper.hpp"
-using namespace apache::geode::client;
-class SimpleCacheListener;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::RegionEvent;
-// Use the "geode" namespace.
-using namespace apache::geode::client;
+class SimpleCacheListener;
// The SimpleCacheListener class.
class SimpleCacheListener : public CacheListener {
diff --git a/cppcache/integration-test/testThinClientLocatorFailover.cpp b/cppcache/integration-test/testThinClientLocatorFailover.cpp
index 8179398..ef46c17 100644
--- a/cppcache/integration-test/testThinClientLocatorFailover.cpp
+++ b/cppcache/integration-test/testThinClientLocatorFailover.cpp
@@ -17,6 +17,8 @@
#include "fw_dunit.hpp"
#include "ThinClientHelper.hpp"
+using apache::geode::client::NoAvailableLocatorsException;
+
bool isLocalServer = false;
bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp b/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
index 2ce0fdf..689af59 100644
--- a/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
+++ b/cppcache/integration-test/testThinClientNotificationWithDeltaWithoutcache.cpp
@@ -30,9 +30,11 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::IllegalStateException;
CacheHelper* cacheHelper = nullptr;
diff --git a/cppcache/integration-test/testThinClientPRPutAllFailover.cpp b/cppcache/integration-test/testThinClientPRPutAllFailover.cpp
index 50d3351..60cebfe 100644
--- a/cppcache/integration-test/testThinClientPRPutAllFailover.cpp
+++ b/cppcache/integration-test/testThinClientPRPutAllFailover.cpp
@@ -34,20 +34,22 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s2p1
#define SERVER1 s1p2
#define SERVER2 s2p2
+
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+
std::shared_ptr<TallyListener> reg1Listener1;
bool isLocalServer = false;
static bool isLocator = false;
const char* locatorsG =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-void setCacheListener(const char* regName, std::shared_ptr<TallyListener> regListener) {
+void setCacheListener(const char* regName,
+ std::shared_ptr<TallyListener> regListener) {
auto reg = getHelper()->getRegion(regName);
auto attrMutator = reg->getAttributesMutator();
attrMutator->setCacheListener(regListener);
@@ -105,35 +107,35 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_RegisterAllKeys)
{
- auto regPtr0 = getHelper()->getRegion(regionNames[0]);
- regPtr0->registerAllKeys();
- auto regPtr1 = getHelper()->getRegion(regionNames[1]);
- regPtr1->registerAllKeys();
- LOG("StepTwo_Pooled_EndPoint_RegisterAllKeys complete.");
+ auto regPtr0 = getHelper()->getRegion(regionNames[0]);
+ regPtr0->registerAllKeys();
+ auto regPtr1 = getHelper()->getRegion(regionNames[1]);
+ regPtr1->registerAllKeys();
+ LOG("StepTwo_Pooled_EndPoint_RegisterAllKeys complete.");
}
END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, PutAllOneTask)
{
LOG("PutAllOneTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 0; item < 1000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- LOGDEBUG(
- "CPPTEST:PutAllOneTask Doing PutAll on key using key: = %s: & value: "
- "= "
- "%s",
- key, value);
- }
- try {
- dataReg->putAll(entryMap);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 0; item < 1000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ LOGDEBUG(
+ "CPPTEST:PutAllOneTask Doing PutAll on key using key: = %s: & value: "
+ "= "
+ "%s",
+ key, value);
+ }
+ try {
+ dataReg->putAll(entryMap);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -149,24 +151,24 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, PutAllTwoTask)
{
LOG("PutAllTwoTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 1000; item < 2000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- LOGDEBUG(
- "CPPTEST:PutAllTwoTask Doing PutAll on key using key: = %s: & value: "
- "= "
- "%s",
- key, value);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- }
- try {
- dataReg->putAll(entryMap);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 1000; item < 2000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ LOGDEBUG(
+ "CPPTEST:PutAllTwoTask Doing PutAll on key using key: = %s: & value: "
+ "= "
+ "%s",
+ key, value);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ }
+ try {
+ dataReg->putAll(entryMap);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -182,24 +184,24 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, PutAllThreeTask)
{
LOG("PutAllThreeTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 2000; item < 3000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- LOGDEBUG(
- "CPPTEST:PutAllThreeTask Doing PutAll on key using key: = %s: & "
- "value: "
- "= %s",
- key, value);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- }
- try {
- dataReg->putAll(entryMap);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 2000; item < 3000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ LOGDEBUG(
+ "CPPTEST:PutAllThreeTask Doing PutAll on key using key: = %s: & "
+ "value: "
+ "= %s",
+ key, value);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ }
+ try {
+ dataReg->putAll(entryMap);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -215,24 +217,24 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, PutAllFourTask)
{
LOG("PutAllFourTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 3000; item < 4000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- LOGDEBUG(
- "CPPTEST:PutAllFourTask Doing PutAll on key using key: = %s: & "
- "value: "
- "= %s",
- key, value);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- }
- try {
- dataReg->putAll(entryMap);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 3000; item < 4000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ LOGDEBUG(
+ "CPPTEST:PutAllFourTask Doing PutAll on key using key: = %s: & "
+ "value: "
+ "= %s",
+ key, value);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ }
+ try {
+ dataReg->putAll(entryMap);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -249,55 +251,55 @@ DUNIT_TASK_DEFINITION(CLIENT2, VerifyAllPutAllTask)
{
LOG("VerifyAllPutAllTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- ASSERT(dataReg != nullptr, "Region not found.");
- LOGINFO("dataregion size is %d: ", dataReg->size());
- LOGINFO("dataregion getCreates is %d: ", reg1Listener1->getCreates());
- ASSERT(reg1Listener1->getCreates() == 4000,
- "Got wrong number of creation events.");
-
- ASSERT(dataReg->size() == 4000, "Expected 4000 entries in region");
- char key[256];
- char value[256];
- for (int32_t item = 0; item < 4000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- LOGDEBUG("CPPTEST:VerifyAllPutAllTask Doing get on key using: = %s: ",
- key);
- auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
- dataReg->get(CacheableKey::create(key)));
- ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
- LOGDEBUG("CPPTEST:VerifyAllPutAllTask value is: = %s: ",
- checkPtr->value().c_str());
- ASSERT(atoi(checkPtr->value().c_str()) == item, "Value did not match.");
- }
- LOG("VerifyAllPutAllTask completed.");
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ ASSERT(dataReg != nullptr, "Region not found.");
+ LOGINFO("dataregion size is %d: ", dataReg->size());
+ LOGINFO("dataregion getCreates is %d: ", reg1Listener1->getCreates());
+ ASSERT(reg1Listener1->getCreates() == 4000,
+ "Got wrong number of creation events.");
+
+ ASSERT(dataReg->size() == 4000, "Expected 4000 entries in region");
+ char key[256];
+ char value[256];
+ for (int32_t item = 0; item < 4000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ LOGDEBUG("CPPTEST:VerifyAllPutAllTask Doing get on key using: = %s: ",
+ key);
+ auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+ dataReg->get(CacheableKey::create(key)));
+ ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
+ LOGDEBUG("CPPTEST:VerifyAllPutAllTask value is: = %s: ",
+ checkPtr->value().c_str());
+ ASSERT(atoi(checkPtr->value().c_str()) == item, "Value did not match.");
+ }
+ LOG("VerifyAllPutAllTask completed.");
}
END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, RemoveAllOneTask)
{
LOG("RemoveAllOneTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- std::vector<std::shared_ptr<CacheableKey>> keys;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 0; item < 1000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- keys.push_back(CacheableKey::create(key));
- LOGDEBUG(
- "CPPTEST:RemoveAllOneTask Doing PutAll on key using key: = %s: & "
- "value: = %s",
- key, value);
- }
- try {
- dataReg->putAll(entryMap);
- dataReg->removeAll(keys);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ std::vector<std::shared_ptr<CacheableKey>> keys;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 0; item < 1000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ keys.push_back(CacheableKey::create(key));
+ LOGDEBUG(
+ "CPPTEST:RemoveAllOneTask Doing PutAll on key using key: = %s: & "
+ "value: = %s",
+ key, value);
+ }
+ try {
+ dataReg->putAll(entryMap);
+ dataReg->removeAll(keys);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -313,26 +315,26 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, RemoveAllTwoTask)
{
LOG("RemoveAllTwoTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- std::vector<std::shared_ptr<CacheableKey>> keys;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 1000; item < 2000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- keys.push_back(CacheableKey::create(key));
- LOGDEBUG(
- "CPPTEST:RemoveAllTwoTask Doing RemoveAll on key using key: = %s: & "
- "value: = %s",
- key, value);
- }
- try {
- dataReg->putAll(entryMap);
- dataReg->removeAll(keys);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ std::vector<std::shared_ptr<CacheableKey>> keys;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 1000; item < 2000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ keys.push_back(CacheableKey::create(key));
+ LOGDEBUG(
+ "CPPTEST:RemoveAllTwoTask Doing RemoveAll on key using key: = %s: & "
+ "value: = %s",
+ key, value);
+ }
+ try {
+ dataReg->putAll(entryMap);
+ dataReg->removeAll(keys);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -348,27 +350,27 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, RemoveAllThreeTask)
{
LOG("RemoveAllThreeTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- std::vector<std::shared_ptr<CacheableKey>> keys;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 2000; item < 3000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- keys.push_back(CacheableKey::create(key));
- LOGDEBUG(
- "CPPTEST:RemoveAllThreeTask Doing RemoveAll on key using key: = %s: "
- "& "
- "value: = %s",
- key, value);
- }
- try {
- dataReg->putAll(entryMap);
- dataReg->removeAll(keys);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ std::vector<std::shared_ptr<CacheableKey>> keys;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 2000; item < 3000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ keys.push_back(CacheableKey::create(key));
+ LOGDEBUG(
+ "CPPTEST:RemoveAllThreeTask Doing RemoveAll on key using key: = %s: "
+ "& "
+ "value: = %s",
+ key, value);
+ }
+ try {
+ dataReg->putAll(entryMap);
+ dataReg->removeAll(keys);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -385,26 +387,26 @@ END_TASK_DEFINITION
DUNIT_TASK_DEFINITION(CLIENT1, RemoveAllFourTask)
{
LOG("RemoveAllFourTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- HashMapOfCacheable entryMap;
- std::vector<std::shared_ptr<CacheableKey>> keys;
- entryMap.clear();
- char key[256];
- char value[256];
- for (int32_t item = 3000; item < 4000; item++) {
- sprintf(key, "key-%d", item);
- sprintf(value, "%d", item);
- entryMap.emplace(CacheableKey::create(key),
- CacheableString::create(value));
- keys.push_back(CacheableKey::create(key));
- LOGDEBUG(
- "CPPTEST:RemoveAllFourTask Doing RemoveAll on key using key: = %s: & "
- "value: = %s",
- key, value);
- }
- try {
- dataReg->putAll(entryMap);
- dataReg->removeAll(keys);
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ HashMapOfCacheable entryMap;
+ std::vector<std::shared_ptr<CacheableKey>> keys;
+ entryMap.clear();
+ char key[256];
+ char value[256];
+ for (int32_t item = 3000; item < 4000; item++) {
+ sprintf(key, "key-%d", item);
+ sprintf(value, "%d", item);
+ entryMap.emplace(CacheableKey::create(key),
+ CacheableString::create(value));
+ keys.push_back(CacheableKey::create(key));
+ LOGDEBUG(
+ "CPPTEST:RemoveAllFourTask Doing RemoveAll on key using key: = %s: & "
+ "value: = %s",
+ key, value);
+ }
+ try {
+ dataReg->putAll(entryMap);
+ dataReg->removeAll(keys);
} catch (Exception& ex) {
LOGERROR("CPPTEST: Unexpected %s: %s", ex.getName().c_str(), ex.what());
FAIL(ex.what());
@@ -422,14 +424,14 @@ DUNIT_TASK_DEFINITION(CLIENT2, VerifyAllRemoveAllTask)
{
LOG("VerifyAllRemoveAllTask started.");
- auto dataReg = getHelper()->getRegion(regionNames[0]);
- ASSERT(dataReg != nullptr, "Region not found.");
- LOGINFO("dataregion size is %d: ", dataReg->size());
- LOGINFO("dataregion getDestroys is %d: ", reg1Listener1->getDestroys());
- ASSERT(reg1Listener1->getDestroys() == 4000,
- "Got wrong number of destroy events.");
- ASSERT(dataReg->size() == 0, "Expected 0 entries in region");
- LOG("VerifyAllRemoveAllTask completed.");
+ auto dataReg = getHelper()->getRegion(regionNames[0]);
+ ASSERT(dataReg != nullptr, "Region not found.");
+ LOGINFO("dataregion size is %d: ", dataReg->size());
+ LOGINFO("dataregion getDestroys is %d: ", reg1Listener1->getDestroys());
+ ASSERT(reg1Listener1->getDestroys() == 4000,
+ "Got wrong number of destroy events.");
+ ASSERT(dataReg->size() == 0, "Expected 0 entries in region");
+ LOG("VerifyAllRemoveAllTask completed.");
}
END_TASK_DEFINITION
diff --git a/cppcache/integration-test/testThinClientPRSingleHop.cpp b/cppcache/integration-test/testThinClientPRSingleHop.cpp
index 2ff2a44..56ac839 100644
--- a/cppcache/integration-test/testThinClientPRSingleHop.cpp
+++ b/cppcache/integration-test/testThinClientPRSingleHop.cpp
@@ -38,14 +38,15 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define SERVER2 s1p2
#define SERVER3 s2p2
+using apache::geode::client::CacheServerException;
+using apache::geode::client::CacheWriterException;
+using apache::geode::client::Exception;
+
bool isLocalServer = false;
const char* endPoints = CacheHelper::getTcrEndpoints(isLocalServer, 3);
diff --git a/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp b/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
index 7aff962..bc82c8e 100644
--- a/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
+++ b/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
@@ -38,14 +38,16 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s2p1
#define CLIENT3 s1p2
#define SERVER1 s2p2
+using apache::geode::client::CacheServerException;
+using apache::geode::client::CacheWriterException;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfException;
+
bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientPartitionResolver.cpp b/cppcache/integration-test/testThinClientPartitionResolver.cpp
index cabda14..cff3fd3 100644
--- a/cppcache/integration-test/testThinClientPartitionResolver.cpp
+++ b/cppcache/integration-test/testThinClientPartitionResolver.cpp
@@ -35,7 +35,8 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::EntryEvent;
+using apache::geode::client::PartitionResolver;
class CustomPartitionResolver : public PartitionResolver {
public:
diff --git a/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp b/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
index a600ef7..12662a2 100644
--- a/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
+++ b/cppcache/integration-test/testThinClientPdxDeltaWithNotification.cpp
@@ -23,8 +23,13 @@
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::IllegalStateException;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientPdxEnum.cpp b/cppcache/integration-test/testThinClientPdxEnum.cpp
index 73d5c8f..3338502 100644
--- a/cppcache/integration-test/testThinClientPdxEnum.cpp
+++ b/cppcache/integration-test/testThinClientPdxEnum.cpp
@@ -15,18 +15,16 @@
* limitations under the License.
*/
+#include "QueryHelper.hpp"
+#include "QueryStrings.hpp"
+#include "ThinClientHelper.hpp"
#include "fw_dunit.hpp"
#include "testobject/NestedPdxObject.hpp"
-#include "ThinClientHelper.hpp"
-#include "QueryStrings.hpp"
-#include "QueryHelper.hpp"
#include <geode/Query.hpp>
#include <geode/QueryService.hpp>
#include <hacks/range.h>
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
+using testobject::PdxEnumTestClass;
bool isLocalServer = false;
@@ -160,11 +158,17 @@ DUNIT_TASK_DEFINITION(SERVER1, CloseLocator1)
END_TASK_DEFINITION
DUNIT_MAIN
-{CALL_TASK(CreateLocator1) CALL_TASK(CreateServer1_With_Locator)
+ {
+ CALL_TASK(CreateLocator1);
+ CALL_TASK(CreateServer1_With_Locator);
- CALL_TASK(SetupClientPoolLoc) CALL_TASK(putPdxWithEnum)
- CALL_TASK(pdxEnumQuery)
+ CALL_TASK(SetupClientPoolLoc);
+ CALL_TASK(putPdxWithEnum);
+ CALL_TASK(pdxEnumQuery);
- CALL_TASK(CloseCache1) CALL_TASK(CloseServer1)
+ CALL_TASK(CloseCache1);
+ CALL_TASK(CloseServer1);
- CALL_TASK(CloseLocator1)} END_MAIN
+ CALL_TASK(CloseLocator1);
+ }
+END_MAIN
diff --git a/cppcache/integration-test/testThinClientPdxInstance.cpp b/cppcache/integration-test/testThinClientPdxInstance.cpp
index c346ffa..1970973 100644
--- a/cppcache/integration-test/testThinClientPdxInstance.cpp
+++ b/cppcache/integration-test/testThinClientPdxInstance.cpp
@@ -39,10 +39,32 @@
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
-using namespace PdxTests;
+using PdxTests::Address;
+
+using testobject::ChildPdx;
+using testobject::ParentPdx;
+using testobject::SerializePdx;
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableDate;
+using apache::geode::client::CacheableEnum;
+using apache::geode::client::CacheableHashMap;
+using apache::geode::client::CacheableHashSet;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableLinkedHashSet;
+using apache::geode::client::CacheableObjectArray;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::LocalRegion;
+using apache::geode::client::PdxFieldTypes;
+using apache::geode::client::PdxInstance;
+using apache::geode::client::PdxSerializable;
+using apache::geode::client::Properties;
+using apache::geode::client::WritablePdxInstance;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientPdxTests.cpp b/cppcache/integration-test/testThinClientPdxTests.cpp
index 1ddc01e..9612c29 100644
--- a/cppcache/integration-test/testThinClientPdxTests.cpp
+++ b/cppcache/integration-test/testThinClientPdxTests.cpp
@@ -55,17 +55,54 @@ END_MAIN*/
#include "CachePerfStats.hpp"
#include <LocalRegion.hpp>
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-using namespace PdxTests;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define CLIENT3 s2p2
#define LOCATOR s2p2
#define SERVER1 s2p1
+using PdxTests::Address;
+using PdxTests::AddressWithInvalidAPIUsage;
+using PdxTests::InvalidPdxUsage;
+using PdxTests::MixedVersionNestedPdx;
+using PdxTests::NestedPdx;
+using PdxTests::PdxInsideIGeodeSerializable;
+using PdxTests::PdxType1V1;
+using PdxTests::PdxType2V1;
+using PdxTests::PdxType3V1;
+using PdxTests::PdxTypes1;
+using PdxTests::PdxTypes10;
+using PdxTests::PdxTypes1V2;
+using PdxTests::PdxTypes2;
+using PdxTests::PdxTypes2V2;
+using PdxTests::PdxTypes3;
+using PdxTests::PdxTypes3V2;
+using PdxTests::PdxTypes4;
+using PdxTests::PdxTypes5;
+using PdxTests::PdxTypes6;
+using PdxTests::PdxTypes7;
+using PdxTests::PdxTypes8;
+using PdxTests::PdxTypes9;
+using PdxTests::PdxTypesIgnoreUnreadFieldsV1;
+using PdxTests::PdxTypesIgnoreUnreadFieldsV2;
+using PdxTests::PdxTypesR1V2;
+using PdxTests::PdxTypesR2V2;
+using PdxTests::PdxTypesV1R1;
+using PdxTests::PdxTypesV1R2;
+
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableLinkedList;
+using apache::geode::client::CacheableObjectArray;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::ClassCastException;
+using apache::geode::client::FunctionService;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::LocalRegion;
+using apache::geode::client::PdxInstance;
+using apache::geode::client::UserFunctionExecutionException;
+
bool isLocator = false;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientPoolAttrTest.cpp b/cppcache/integration-test/testThinClientPoolAttrTest.cpp
index 455f9d6..f9ae621 100644
--- a/cppcache/integration-test/testThinClientPoolAttrTest.cpp
+++ b/cppcache/integration-test/testThinClientPoolAttrTest.cpp
@@ -29,6 +29,9 @@
#define LOCATOR1 s2p1
#define SERVER s2p2
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+
bool isLocalServer = false;
bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp b/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp
index dabb399..3158328 100644
--- a/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp
+++ b/cppcache/integration-test/testThinClientPoolExecuteFunctionThrowsException.cpp
@@ -27,7 +27,6 @@
#include <geode/FunctionService.hpp>
#include <geode/DefaultResultCollector.hpp>
-using namespace PdxTests;
/* This is to test
1- funtion execution on pool
*/
@@ -36,6 +35,14 @@ using namespace PdxTests;
#define LOCATOR1 s2p1
#define SERVER s2p2
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::DefaultResultCollector;
+using apache::geode::client::FunctionService;
+using apache::geode::client::UserFunctionExecutionException;
+
bool isLocalServer = false;
bool isLocator = false;
bool isPoolWithEndpoint = false;
diff --git a/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp b/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp
index e6401ad..d49bb35 100644
--- a/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp
+++ b/cppcache/integration-test/testThinClientPoolExecuteHAFunction.cpp
@@ -24,6 +24,14 @@
#define LOCATOR1 s2p1
#define SERVER s2p2
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::DefaultResultCollector;
+using apache::geode::client::Exception;
+using apache::geode::client::FunctionService;
+
bool isLocalServer = false;
bool isLocator = false;
bool isPoolWithEndpoint = false;
diff --git a/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp b/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp
index 4c66981..2deccca 100644
--- a/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp
+++ b/cppcache/integration-test/testThinClientPoolExecuteHAFunctionPrSHOP.cpp
@@ -24,6 +24,13 @@
#define LOCATOR1 s2p1
#define SERVER s2p2
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::DefaultResultCollector;
+using apache::geode::client::Exception;
+using apache::geode::client::FunctionService;
+
bool isLocalServer = false;
bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientPoolLocator.cpp b/cppcache/integration-test/testThinClientPoolLocator.cpp
index f0901bf..6069a6a 100644
--- a/cppcache/integration-test/testThinClientPoolLocator.cpp
+++ b/cppcache/integration-test/testThinClientPoolLocator.cpp
@@ -17,6 +17,10 @@
#include "fw_dunit.hpp"
#include "ThinClientHelper.hpp"
+using apache::geode::client::Exception;
+using apache::geode::client::NoAvailableLocatorsException;
+using apache::geode::client::NotConnectedException;
+
bool isLocalServer = false;
bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp b/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
index 3edb9d1..280e240 100644
--- a/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
+++ b/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
@@ -38,14 +38,16 @@
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define SERVER2 s1p2
#define SERVER3 s2p2
+using apache::geode::client::CacheServerException;
+using apache::geode::client::CacheWriterException;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+
bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientPutWithDelta.cpp b/cppcache/integration-test/testThinClientPutWithDelta.cpp
index 305d24f..9b0866b 100644
--- a/cppcache/integration-test/testThinClientPutWithDelta.cpp
+++ b/cppcache/integration-test/testThinClientPutWithDelta.cpp
@@ -23,8 +23,11 @@
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
+
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::IllegalStateException;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp b/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp
index 419992b..e8df38e 100644
--- a/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp
+++ b/cppcache/integration-test/testThinClientRegionQueryDifferentServerConfigs.cpp
@@ -31,15 +31,16 @@
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
-
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::Query;
+using apache::geode::client::QueryException;
+using apache::geode::client::QueryService;
+
bool isLocalServer = false;
bool isLocator = false;
const char* poolNames[] = {"Pool1", "Pool2", "Pool3"};
@@ -58,8 +59,7 @@ void initClient() {
->getSerializationRegistry();
serializationRegistry->addType(Position::createDeserializable);
serializationRegistry->addType(Portfolio::createDeserializable);
- }
- catch (const IllegalStateException&) {
+ } catch (const IllegalStateException&) {
// ignore exception
}
}
diff --git a/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp b/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
index 333cfd9..bf839e9 100644
--- a/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
+++ b/cppcache/integration-test/testThinClientRegionQueryExclusiveness.cpp
@@ -37,14 +37,17 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
#define CLIENT1 s1p1
#define SERVER s2p1
#define LOCATOR s2p2
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
+using testobject::Portfolio;
+using testobject::Position;
+
bool isLocator = false;
bool isLocalServer = false;
const char* poolNames[] = {"Pool1", "Pool2", "Pool3"};
diff --git a/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp b/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp
index 7b91be9..28911ba 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryFailover.cpp
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include "fw_dunit.hpp"
#include <ace/OS.h>
#include <ace/High_Res_Timer.h>
@@ -37,15 +38,21 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
-
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+using apache::geode::client::SelectResults;
+
+using testobject::Portfolio;
+using testobject::PortfolioPdx;
+using testobject::Position;
+using testobject::PositionPdx;
+
class KillServerThread : public ACE_Task_Base {
public:
bool m_running;
@@ -231,15 +238,17 @@ DUNIT_TASK_DEFINITION(LOCATOR, CloseLocator)
}
END_TASK_DEFINITION
-void runRemoteQueryFailoverTest(){
- CALL_TASK(StartLocator) CALL_TASK(CreateServer1WithLocator)
- CALL_TASK(RegisterTypesAndCreatePoolAndRegion)
- CALL_TASK(CreateServer2WithLocator)
- CALL_TASK(ValidateQueryExecutionAcrossServerFailure)
- CALL_TASK(CloseCache1) CALL_TASK(CloseServer2)
- CALL_TASK(CloseLocator)}
-
-DUNIT_MAIN {
- runRemoteQueryFailoverTest();
+void runRemoteQueryFailoverTest() {
+ CALL_TASK(StartLocator);
+ CALL_TASK(CreateServer1WithLocator);
+ CALL_TASK(RegisterTypesAndCreatePoolAndRegion);
+ CALL_TASK(CreateServer2WithLocator);
+ CALL_TASK(ValidateQueryExecutionAcrossServerFailure);
+ CALL_TASK(CloseCache1);
+ CALL_TASK(CloseServer2);
+ CALL_TASK(CloseLocator);
}
+
+DUNIT_MAIN
+ { runRemoteQueryFailoverTest(); }
END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp b/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
index 5bf1c84..0076b58 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryFailoverPdx.cpp
@@ -34,15 +34,22 @@
#include "testobject/PortfolioPdx.hpp"
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testobject;
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+using testobject::Portfolio;
+using testobject::PortfolioPdx;
+using testobject::Position;
+using testobject::PositionPdx;
+
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+using apache::geode::client::SelectResults;
+
class KillServerThread : public ACE_Task_Base {
public:
bool m_running;
@@ -227,15 +234,16 @@ DUNIT_TASK_DEFINITION(LOCATOR, CloseLocator)
}
END_TASK_DEFINITION
-void runRemoteQueryFailoverTest(){
- CALL_TASK(StartLocator) CALL_TASK(CreateServer1WithLocator)
- CALL_TASK(RegisterTypesAndCreatePoolAndRegion)
- CALL_TASK(CreateServer2WithLocator)
- CALL_TASK(ValidateQueryExecutionAcrossServerFailure)
- CALL_TASK(CloseCache1) CALL_TASK(CloseServer2)
- CALL_TASK(CloseLocator)}
-
-DUNIT_MAIN {
- runRemoteQueryFailoverTest();
+void runRemoteQueryFailoverTest() {
+ CALL_TASK(StartLocator);
+ CALL_TASK(CreateServer1WithLocator);
+ CALL_TASK(RegisterTypesAndCreatePoolAndRegion);
+ CALL_TASK(CreateServer2WithLocator);
+ CALL_TASK(ValidateQueryExecutionAcrossServerFailure);
+ CALL_TASK(CloseCache1) CALL_TASK(CloseServer2);
+ CALL_TASK(CloseLocator);
}
+
+DUNIT_MAIN
+ { runRemoteQueryFailoverTest(); }
END_MAIN
diff --git a/cppcache/integration-test/testThinClientRemoteQueryRS.cpp b/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
index 801bf93..3b39a16 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryRS.cpp
@@ -34,14 +34,26 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
+using testData::noofQueryParam;
+using testData::queryparamSet;
+using testData::QueryStrings;
+using testData::resultsetparamQueries;
+using testData::resultsetQueries;
+using testData::resultsetQueriesOPL;
+using testData::resultsetRowCounts;
+using testData::resultsetRowCountsOPL;
+using testData::resultsetRowCountsPQ;
+using testData::unsupported;
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
bool isLocator = false;
bool isLocalServer = false;
@@ -74,7 +86,8 @@ void stepOne() {
createRegionAndAttachPool(qRegionNames[3], USE_ACK, poolNames[0]);
auto regptr = getHelper()->getRegion(qRegionNames[0]);
- auto subregPtr = regptr->createSubregion(qRegionNames[1], regptr->getAttributes());
+ auto subregPtr =
+ regptr->createSubregion(qRegionNames[1], regptr->getAttributes());
LOG("StepOne complete.");
}
diff --git a/cppcache/integration-test/testThinClientRemoteQuerySS.cpp b/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
index 6170f38..9954c83 100644
--- a/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQuerySS.cpp
@@ -34,14 +34,32 @@
#include "CacheRegionHelper.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::CacheableHashMap;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+
+using testData::numSSQueryParam;
+using testData::queryparamSetSS;
+using testData::QueryStrings;
+using testData::structsetFieldCounts;
+using testData::structsetFieldCountsOPL;
+using testData::structsetFieldCountsPQ;
+using testData::structsetParamQueries;
+using testData::structsetQueries;
+using testData::structsetQueriesOPL;
+using testData::structsetRowCounts;
+using testData::structsetRowCountsOPL;
+using testData::structsetRowCountsPQ;
+using testData::unsupported;
+
bool isLocator = false;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp b/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
index 9bf23db..b5b6a27 100644
--- a/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
+++ b/cppcache/integration-test/testThinClientRemoteQueryTimeout.cpp
@@ -35,14 +35,24 @@
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
-
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
+using testData::numSSQueryParam;
+using testData::queryparamSetSS;
+using testData::resultsetQueries;
+using testData::structsetParamQueries;
+using testData::structsetQueries;
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+using apache::geode::client::TimeoutException;
+
bool isLocalServer = false;
bool isLocator = false;
const char* poolNames[] = {"Pool1", "Pool2", "Pool3"};
@@ -73,7 +83,8 @@ void stepOne() {
createRegionAndAttachPool(qRegionNames[0], USE_ACK, poolNames[0]);
auto regptr = getHelper()->getRegion(qRegionNames[0]);
- auto subregPtr = regptr->createSubregion(qRegionNames[1], regptr->getAttributes());
+ auto subregPtr =
+ regptr->createSubregion(qRegionNames[1], regptr->getAttributes());
LOG("StepOne complete.");
}
diff --git a/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp b/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
index 0c7107d..0df1de5 100644
--- a/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
+++ b/cppcache/integration-test/testThinClientRemoteRegionQuery.cpp
@@ -32,14 +32,19 @@
#include "SerializationRegistry.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace testData;
#define CLIENT1 s1p1
#define LOCATOR s1p2
#define SERVER1 s2p1
+using testData::QueryStrings;
+using testData::regionQueries;
+using testData::regionQueryRowCounts;
+using testData::unsupported;
+
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryException;
+
bool isLocalServer = false;
bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientRemoveOps.cpp b/cppcache/integration-test/testThinClientRemoveOps.cpp
index 35b6cf3..9f4c548 100644
--- a/cppcache/integration-test/testThinClientRemoveOps.cpp
+++ b/cppcache/integration-test/testThinClientRemoveOps.cpp
@@ -28,13 +28,24 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-
#define CLIENT1 s1p1
#define CLIENT2 s1p2
#define SERVER1 s2p1
#define SERVER2 s2p2
+
+using apache::geode::client::Cacheable;
+using apache::geode::client::CacheableInt32;
+using apache::geode::client::CacheableInt64;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::EntryExistsException;
+using apache::geode::client::EntryNotFoundException;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalArgumentException;
+using apache::geode::client::Properties;
+using apache::geode::client::RegionDestroyedException;
+
CacheHelper* cacheHelper = nullptr;
static bool isLocalServer = false;
static bool isLocator = false;
diff --git a/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp b/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp
index 9497f31..7ff72b4 100644
--- a/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp
+++ b/cppcache/integration-test/testThinClientSSLAuthCorrupt.cpp
@@ -25,8 +25,11 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::NotConnectedException;
+using apache::geode::client::Properties;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientSSLAuthFail.cpp b/cppcache/integration-test/testThinClientSSLAuthFail.cpp
index 7142aa5..d84815d 100644
--- a/cppcache/integration-test/testThinClientSSLAuthFail.cpp
+++ b/cppcache/integration-test/testThinClientSSLAuthFail.cpp
@@ -25,8 +25,11 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::NotConnectedException;
+using apache::geode::client::Properties;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp b/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp
index 8c48180..fa7c3d4 100644
--- a/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp
+++ b/cppcache/integration-test/testThinClientSSLAuthUntrusted.cpp
@@ -25,8 +25,11 @@
#include "CacheHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::NotConnectedException;
+using apache::geode::client::Properties;
CacheHelper* cacheHelper = nullptr;
bool isLocalServer = false;
diff --git a/cppcache/integration-test/testThinClientSSLWithSecurityAuthz.cpp b/cppcache/integration-test/testThinClientSSLWithSecurityAuthz.cpp
index 51885d7..402b133 100644
--- a/cppcache/integration-test/testThinClientSSLWithSecurityAuthz.cpp
+++ b/cppcache/integration-test/testThinClientSSLWithSecurityAuthz.cpp
@@ -28,11 +28,32 @@
#include "ThinClientSecurity.hpp"
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::FunctionService;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::HashSetOfCacheableKey;
+using apache::geode::client::QueryService;
+using apache::geode::client::testframework::security::CredentialGenerator;
+using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
+using apache::geode::client::testframework::security::OP_CREATE;
+using apache::geode::client::testframework::security::OP_DESTROY;
+using apache::geode::client::testframework::security::OP_EXECUTE_FUNCTION;
+using apache::geode::client::testframework::security::OP_GET;
+using apache::geode::client::testframework::security::OP_GETALL;
+using apache::geode::client::testframework::security::OP_INVALIDATE;
+using apache::geode::client::testframework::security::OP_KEY_SET;
+using apache::geode::client::testframework::security::OP_PUTALL;
+using apache::geode::client::testframework::security::OP_QUERY;
+using apache::geode::client::testframework::security::OP_REGION_CLEAR;
+using apache::geode::client::testframework::security::OP_REGISTER_CQ;
+using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UPDATE;
+using apache::geode::client::testframework::security::opCodeList;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
+
std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
std::string getXmlPath() {
diff --git a/cppcache/integration-test/testThinClientSecurityAuthentication.cpp b/cppcache/integration-test/testThinClientSecurityAuthentication.cpp
index 98754fe..ac10ed3 100644
--- a/cppcache/integration-test/testThinClientSecurityAuthentication.cpp
+++ b/cppcache/integration-test/testThinClientSecurityAuthentication.cpp
@@ -22,13 +22,13 @@
#include "ThinClientSecurity.hpp"
#include <geode/CacheTransactionManager.hpp>
-using namespace apache::geode::client;
-using namespace test;
#define CORRECT_CREDENTIALS 'C'
#define INCORRECT_CREDENTIALS 'I'
#define NOT_PROVIDED_CREDENTIALS 'N'
+using apache::geode::client::testframework::security::CredentialGenerator;
+
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
const char* regionNamesAuth[] = {"DistRegionAck", "DistRegionNoAck"};
diff --git a/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp b/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp
index 8597b04..45fcfe3 100644
--- a/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp
+++ b/cppcache/integration-test/testThinClientSecurityAuthenticationMU.cpp
@@ -25,13 +25,12 @@
#include "ThinClientSecurity.hpp"
#include <geode/CacheTransactionManager.hpp>
-using namespace apache::geode::client;
-using namespace test;
-
#define CORRECT_CREDENTIALS 'C'
#define INCORRECT_CREDENTIALS 'I'
#define NOT_PROVIDED_CREDENTIALS 'N'
+using apache::geode::client::testframework::security::CredentialGenerator;
+
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
const char* regionNamesAuth[] = {"DistRegionAck", "DistRegionNoAck"};
diff --git a/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp b/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp
index 78f1bed..66c5815 100644
--- a/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp
+++ b/cppcache/integration-test/testThinClientSecurityAuthenticationSetAuthInitialize.cpp
@@ -24,8 +24,10 @@
#include "ThinClientHelper.hpp"
#include "ThinClientSecurity.hpp"
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::AuthenticationFailedException;
+using apache::geode::client::AuthInitialize;
+using apache::geode::client::Cacheable;
+using apache::geode::client::testframework::security::CredentialGenerator;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
diff --git a/cppcache/integration-test/testThinClientSecurityAuthorization.cpp b/cppcache/integration-test/testThinClientSecurityAuthorization.cpp
index 5ff3bdf..1b1d660 100644
--- a/cppcache/integration-test/testThinClientSecurityAuthorization.cpp
+++ b/cppcache/integration-test/testThinClientSecurityAuthorization.cpp
@@ -27,8 +27,27 @@
#include "ThinClientSecurity.hpp"
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::FunctionService;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::QueryService;
+using apache::geode::client::testframework::security::CredentialGenerator;
+using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
+using apache::geode::client::testframework::security::OP_CREATE;
+using apache::geode::client::testframework::security::OP_DESTROY;
+using apache::geode::client::testframework::security::OP_EXECUTE_FUNCTION;
+using apache::geode::client::testframework::security::OP_GET;
+using apache::geode::client::testframework::security::OP_GETALL;
+using apache::geode::client::testframework::security::OP_INVALIDATE;
+using apache::geode::client::testframework::security::OP_KEY_SET;
+using apache::geode::client::testframework::security::OP_PUTALL;
+using apache::geode::client::testframework::security::OP_QUERY;
+using apache::geode::client::testframework::security::OP_REGION_CLEAR;
+using apache::geode::client::testframework::security::OP_REGISTER_CQ;
+using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UPDATE;
+using apache::geode::client::testframework::security::opCodeList;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
diff --git a/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp b/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp
index 50e47c1..4e61e5f 100644
--- a/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp
+++ b/cppcache/integration-test/testThinClientSecurityAuthorizationMU.cpp
@@ -30,12 +30,39 @@
#include "ThinClientSecurity.hpp"
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+using apache::geode::client::CacheableArray;
+using apache::geode::client::CacheableArrayList;
+using apache::geode::client::CacheableBoolean;
+using apache::geode::client::CacheableVector;
+using apache::geode::client::ClassCastException;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::FunctionService;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::QueryService;
+using apache::geode::client::UserFunctionExecutionException;
+using apache::geode::client::testframework::security::CredentialGenerator;
+using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
+using apache::geode::client::testframework::security::OP_CREATE;
+using apache::geode::client::testframework::security::OP_DESTROY;
+using apache::geode::client::testframework::security::OP_EXECUTE_FUNCTION;
+using apache::geode::client::testframework::security::OP_GET;
+using apache::geode::client::testframework::security::OP_GETALL;
+using apache::geode::client::testframework::security::OP_INVALIDATE;
+using apache::geode::client::testframework::security::OP_KEY_SET;
+using apache::geode::client::testframework::security::OP_PUTALL;
+using apache::geode::client::testframework::security::OP_QUERY;
+using apache::geode::client::testframework::security::OP_REGION_CLEAR;
+using apache::geode::client::testframework::security::OP_REGISTER_CQ;
+using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UPDATE;
+using apache::geode::client::testframework::security::opCodeList;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
+
std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
+
const char* exFuncNameSendException = "executeFunction_SendException";
std::string getXmlPath() {
diff --git a/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp b/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
index 1aaee22..37c16d3 100644
--- a/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
+++ b/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
@@ -38,17 +38,20 @@
#include "ThinClientCQ.hpp"
-using namespace test;
-using namespace testData;
-
#include "CacheHelper.hpp"
#include "ThinClientHelper.hpp"
#include "ace/Process.h"
-//#include "ThinClientSecurity.hpp"
+using apache::geode::client::testframework::security::CredentialGenerator;
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+using apache::geode::client::AuthenticatedView;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::CqOperation;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
diff --git a/cppcache/integration-test/testThinClientSecurityDH.cpp b/cppcache/integration-test/testThinClientSecurityDH.cpp
index aa8d834..652f615 100644
--- a/cppcache/integration-test/testThinClientSecurityDH.cpp
+++ b/cppcache/integration-test/testThinClientSecurityDH.cpp
@@ -52,8 +52,7 @@ portion in this test.
#define CORRECT_CREDENTIALS 'C'
#define INCORRECT_CREDENTIALS 'I'
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::testframework::security::CredentialGenerator;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
diff --git a/cppcache/integration-test/testThinClientSecurityDH_MU.cpp b/cppcache/integration-test/testThinClientSecurityDH_MU.cpp
index 26b42d3..08b5e40 100644
--- a/cppcache/integration-test/testThinClientSecurityDH_MU.cpp
+++ b/cppcache/integration-test/testThinClientSecurityDH_MU.cpp
@@ -55,8 +55,7 @@ portion in this test.
#define CORRECT_CREDENTIALS 'C'
#define INCORRECT_CREDENTIALS 'I'
-using namespace apache::geode::client;
-using namespace test;
+using apache::geode::client::testframework::security::CredentialGenerator;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
diff --git a/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp b/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
index eb04d71..a007cb3 100644
--- a/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
+++ b/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
@@ -38,21 +38,25 @@
#include "ThinClientCQ.hpp"
-using namespace test;
-using namespace testData;
-
#include "CacheHelper.hpp"
#include "ThinClientHelper.hpp"
#include "ace/Process.h"
-//#include "ThinClientSecurity.hpp"
-
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+using apache::geode::client::AuthenticatedView;
+using apache::geode::client::CqAttributesFactory;
+using apache::geode::client::CqEvent;
+using apache::geode::client::CqListener;
+using apache::geode::client::CqOperation;
+using apache::geode::client::Exception;
+using apache::geode::client::IllegalStateException;
+using apache::geode::client::QueryService;
+using apache::geode::client::testframework::security::CredentialGenerator;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
+
std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
+
#define CLIENT1 s1p1
#define SERVER1 s2p1
#define CLIENT2 s1p2
diff --git a/cppcache/integration-test/testThinClientSecurityMultiUserTest.cpp b/cppcache/integration-test/testThinClientSecurityMultiUserTest.cpp
index 1da4069..cf4927b 100644
--- a/cppcache/integration-test/testThinClientSecurityMultiUserTest.cpp
+++ b/cppcache/integration-test/testThinClientSecurityMultiUserTest.cpp
@@ -23,7 +23,8 @@
#include "ThinClientSecurity.hpp"
#include "ThinClientHelper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::RegionShortcut;
#define CLIENT1 s1p1
#define LOCATORSERVER s2p2
diff --git a/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp b/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp
index 35b71d6..d70d736 100644
--- a/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp
+++ b/cppcache/integration-test/testThinClientSecurityPostAuthorization.cpp
@@ -31,30 +31,33 @@
#include "ThinClientSecurity.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Exception;
+using apache::geode::client::HashMapOfCacheable;
+using apache::geode::client::HashMapOfException;
+using apache::geode::client::NotAuthorizedException;
const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
-#define HANDLE_NO_NOT_AUTHORIZED_EXCEPTION \
- catch (const apache::geode::client::NotAuthorizedException&) { \
- LOG("NotAuthorizedException Caught"); \
- FAIL("should not have caught NotAuthorizedException"); \
- } \
- catch (const apache::geode::client::Exception& other) { \
- LOG("Got apache::geode::client::Exception& other "); \
- LOG(other.getStackTrace().c_str()); \
- FAIL(other.what()); \
+#define HANDLE_NO_NOT_AUTHORIZED_EXCEPTION \
+ catch (const NotAuthorizedException&) { \
+ LOG("NotAuthorizedException Caught"); \
+ FAIL("should not have caught NotAuthorizedException"); \
+ } \
+ catch (const Exception& other) { \
+ LOG("Got apache::geode::client::Exception& other "); \
+ LOG(other.getStackTrace().c_str()); \
+ FAIL(other.what()); \
}
-#define HANDLE_NOT_AUTHORIZED_EXCEPTION \
- catch (const apache::geode::client::NotAuthorizedException&) { \
- LOG("NotAuthorizedException Caught"); \
- LOG("Success"); \
- } \
- catch (const apache::geode::client::Exception& other) { \
- LOG(other.getStackTrace().c_str()); \
- FAIL(other.what()); \
+#define HANDLE_NOT_AUTHORIZED_EXCEPTION \
+ catch (const NotAuthorizedException&) { \
+ LOG("NotAuthorizedException Caught"); \
+ LOG("Success"); \
+ } \
+ catch (const Exception& other) { \
+ LOG(other.getStackTrace().c_str()); \
+ FAIL(other.what()); \
}
#define ADMIN_CLIENT s1p1
diff --git a/cppcache/integration-test/testThinClientTicket317.cpp b/cppcache/integration-test/testThinClientTicket317.cpp
index c3f837e..e3093a4 100644
--- a/cppcache/integration-test/testThinClientTicket317.cpp
+++ b/cppcache/integration-test/testThinClientTicket317.cpp
@@ -24,6 +24,8 @@
#include "locator_globals.hpp"
#include "LocatorHelper.hpp"
+using apache::geode::client::EntryNotFoundException;
+
DUNIT_TASK_DEFINITION(SERVER1, CreateServerWithNBSTrue)
{
// starting server with notify_subscription true
diff --git a/cppcache/integration-test/testThinClientWriterException.cpp b/cppcache/integration-test/testThinClientWriterException.cpp
index 67d8ce6..aff5806 100644
--- a/cppcache/integration-test/testThinClientWriterException.cpp
+++ b/cppcache/integration-test/testThinClientWriterException.cpp
@@ -30,8 +30,15 @@
thrown and no data in local region.
4. test also check the localput operation.
*/
-using namespace apache::geode::client::testframework::security;
-using namespace apache::geode::client;
+
+using apache::geode::client::testframework::security::CredentialGenerator;
+using apache::geode::client::testframework::security::OP_CONTAINS_KEY;
+using apache::geode::client::testframework::security::OP_GET;
+using apache::geode::client::testframework::security::OP_KEY_SET;
+using apache::geode::client::testframework::security::OP_REGISTER_INTEREST;
+using apache::geode::client::testframework::security::OP_UNREGISTER_INTEREST;
+using apache::geode::client::testframework::security::opCodeList;
+
std::shared_ptr<TallyListener> regListener;
std::shared_ptr<TallyWriter> regWriter;
@@ -39,43 +46,43 @@ const char* locHostPort =
CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
const char* regionNamesAuth[] = {"DistRegionAck"};
- std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
-
- std::string getXmlPath() {
- char xmlPath[1000] = {'\0'};
- const char* path = ACE_OS::getenv("TESTSRC");
- ASSERT(path != nullptr,
- "Environment variable TESTSRC for test source directory is not set.");
- strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
- strcat(xmlPath, "xml/Security/");
- return std::string(xmlPath);
- }
-
- void initCredentialGenerator() {
- static int loopNum = 1;
-
- switch (loopNum) {
- case 1: {
- credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
- break;
- }
- case 2: {
- credentialGeneratorHandler = CredentialGenerator::create("LDAP");
- break;
- }
- default:
- case 3: {
- credentialGeneratorHandler = CredentialGenerator::create("PKCS");
- break;
- }
- }
-
- if (credentialGeneratorHandler == nullptr) {
- FAIL("credentialGeneratorHandler is nullptr");
- }
-
- loopNum++;
- if (loopNum > 2) loopNum = 1;
+std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
+
+std::string getXmlPath() {
+ char xmlPath[1000] = {'\0'};
+ const char* path = ACE_OS::getenv("TESTSRC");
+ ASSERT(path != nullptr,
+ "Environment variable TESTSRC for test source directory is not set.");
+ strncpy(xmlPath, path, strlen(path) - strlen("cppcache"));
+ strcat(xmlPath, "xml/Security/");
+ return std::string(xmlPath);
+}
+
+void initCredentialGenerator() {
+ static int loopNum = 1;
+
+ switch (loopNum) {
+ case 1: {
+ credentialGeneratorHandler = CredentialGenerator::create("DUMMY");
+ break;
+ }
+ case 2: {
+ credentialGeneratorHandler = CredentialGenerator::create("LDAP");
+ break;
+ }
+ default:
+ case 3: {
+ credentialGeneratorHandler = CredentialGenerator::create("PKCS");
+ break;
+ }
+ }
+
+ if (credentialGeneratorHandler == nullptr) {
+ FAIL("credentialGeneratorHandler is nullptr");
+ }
+
+ loopNum++;
+ if (loopNum > 2) loopNum = 1;
}
opCodeList::value_type tmpRArr[] = {OP_GET, OP_REGISTER_INTEREST,
@@ -102,7 +109,7 @@ opCodeList::value_type tmpRArr[] = {OP_GET, OP_REGISTER_INTEREST,
#define READER_CLIENT s2p1
void initClientAuth() {
- auto config = Properties::create();
+ auto config = Properties::create();
opCodeList rt(tmpRArr, tmpRArr + sizeof tmpRArr / sizeof *tmpRArr);
credentialGeneratorHandler->getAuthInit(config);
credentialGeneratorHandler->getAllowedCredentialsForOps(rt, config, nullptr);
@@ -118,10 +125,11 @@ void initClientAuth() {
}
}
-void setCacheWriter(const char* regName, std::shared_ptr<TallyWriter> regWriter) {
- auto reg = getHelper()->getRegion(regName);
- auto attrMutator = reg->getAttributesMutator();
- attrMutator->setCacheWriter(regWriter);
+void setCacheWriter(const char* regName,
+ std::shared_ptr<TallyWriter> regWriter) {
+ auto reg = getHelper()->getRegion(regName);
+ auto attrMutator = reg->getAttributesMutator();
+ attrMutator->setCacheWriter(regWriter);
}
DUNIT_TASK_DEFINITION(ADMIN_CLIENT, StartServer1)
diff --git a/cppcache/integration-test/testUtils.hpp b/cppcache/integration-test/testUtils.hpp
index 2e57cbf..6c4f3a1 100644
--- a/cppcache/integration-test/testUtils.hpp
+++ b/cppcache/integration-test/testUtils.hpp
@@ -1,8 +1,3 @@
-#pragma once
-
-#ifndef GEODE_INTEGRATION_TEST_TESTUTILS_H_
-#define GEODE_INTEGRATION_TEST_TESTUTILS_H_
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -20,6 +15,11 @@
* limitations under the License.
*/
+#pragma once
+
+#ifndef GEODE_INTEGRATION_TEST_TESTUTILS_H_
+#define GEODE_INTEGRATION_TEST_TESTUTILS_H_
+
/* use CacheHelper to gain the impl pointer from cache or region object
*/
@@ -40,7 +40,13 @@
#include <DistributedSystemImpl.hpp>
#include <CacheImpl.hpp>
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheImpl;
+using apache::geode::client::CacheRegionHelper;
+using apache::geode::client::Region;
+using apache::geode::client::RegionInternal;
namespace unitTests {
diff --git a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
index c26d1d9..bff7df4 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
@@ -22,7 +22,13 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheXmlException;
+using apache::geode::client::DiskPolicyType;
+using apache::geode::client::Exception;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::Region;
int testXmlCacheCreationWithOverflow() {
auto cacheFactory = CacheFactory();
@@ -33,7 +39,8 @@ int testXmlCacheCreationWithOverflow() {
char* path = ACE_OS::getenv("TESTSRC");
std::string directory(path);
- std::cout << "create DistributedSytem with name=XML_CACHE_CREATION_TEST" << std::endl;
+ std::cout << "create DistributedSytem with name=XML_CACHE_CREATION_TEST"
+ << std::endl;
std::cout << "Create cache with the configurations provided in "
"valid_overflowAttr.xml"
<< std::endl;
diff --git a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
index 634fc34..19ad5f3 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
@@ -31,6 +31,13 @@
#include "CacheHelper.hpp"
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableStringArray;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Exception;
+using apache::geode::client::Pool;
+
static bool isLocalServer = false;
static bool isLocator = false;
static int numberOfLocators = 1;
@@ -40,11 +47,10 @@ const char* locatorsG =
#include "LocatorHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace std;
+using std::string;
+using std::vector;
-#define SLIST vector<string>
+using SLIST = vector<string>;
bool findString(string& item, std::shared_ptr<CacheableStringArray> array) {
for (int size = 0; size < array->length(); size++) {
@@ -85,7 +91,7 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST& locators,
int subscriptionAckInterval, int subscriptionRedundancy,
int statisticInterval, bool prSingleHopEnabled,
int updateLocatorListInterval) {
- using namespace apache::geode::internal::chrono::duration;
+ using apache::geode::internal::chrono::duration::to_string;
char logmsg[500] = {0};
@@ -303,7 +309,7 @@ int testXmlCacheCreationWithPools() {
}
auto regPtr1 = vrp.at(0);
- std::vector<std::shared_ptr<Region>> vr = regPtr1->subregions(true);
+ auto&& vr = regPtr1->subregions(true);
std::cout << "Test if the number of sub regions with the root region Root1 "
"are correct"
<< std::endl;
diff --git a/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp b/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp
index 9fcc322..546d862 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithRefid.cpp
@@ -24,7 +24,11 @@
#include "fw_helper.hpp"
-using namespace apache::geode::client;
+using apache::geode::client::Cache;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheXmlException;
+using apache::geode::client::ExpirationAction;
+using apache::geode::client::Region;
int testXmlCacheCreationWithRefid(const char* fileName) {
auto cacheFactory = CacheFactory();
diff --git a/cppcache/integration-test/testXmlCacheInitialization.cpp b/cppcache/integration-test/testXmlCacheInitialization.cpp
index 087d966..76e3b69 100644
--- a/cppcache/integration-test/testXmlCacheInitialization.cpp
+++ b/cppcache/integration-test/testXmlCacheInitialization.cpp
@@ -29,6 +29,11 @@
#include "CacheHelper.hpp"
+using apache::geode::client::Cache;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheHelper;
+using apache::geode::client::Exception;
+
static bool isLocalServer = false;
static bool isLocator = false;
static int numberOfLocators = 1;
@@ -38,10 +43,6 @@ const char* locatorsG =
#include "LocatorHelper.hpp"
-using namespace apache::geode::client;
-using namespace test;
-using namespace std;
-
int testXmlDeclarativeCacheCreation() {
auto cacheFactory = CacheFactory();
std::shared_ptr<Cache> cptr;
diff --git a/cppcache/src/Assert.cpp b/cppcache/src/Assert.cpp
index 6114d38..709b845 100644
--- a/cppcache/src/Assert.cpp
+++ b/cppcache/src/Assert.cpp
@@ -17,7 +17,6 @@
#include <sstream>
-#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED
#include <boost/stacktrace.hpp>
#include <geode/ExceptionTypes.hpp>
#include "Assert.hpp"
diff --git a/cppcache/src/AuthenticatedView.cpp b/cppcache/src/AuthenticatedView.cpp
index 56c9ed3..571ffd1 100644
--- a/cppcache/src/AuthenticatedView.cpp
+++ b/cppcache/src/AuthenticatedView.cpp
@@ -34,7 +34,9 @@
#include "FunctionServiceImpl.hpp"
#include "ThinClientPoolDM.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
/**
* Indicates if this cache has been closed.
@@ -174,3 +176,6 @@ PdxInstanceFactory AuthenticatedView::createPdxInstanceFactory(
.getSystemProperties()
.getEnableTimeStatistics());
}
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CacheFactory.cpp b/cppcache/src/CacheFactory.cpp
index f84131a..5d203f7 100644
--- a/cppcache/src/CacheFactory.cpp
+++ b/cppcache/src/CacheFactory.cpp
@@ -80,9 +80,9 @@ Cache CacheFactory::create() const {
} else {
cache.m_cacheImpl->initServices();
}
- } catch (const apache::geode::client::RegionExistsException&) {
+ } catch (const RegionExistsException&) {
LOGWARN("Attempt to create existing regions declaratively");
- } catch (const apache::geode::client::Exception&) {
+ } catch (const Exception&) {
if (!cache.isClosed()) {
cache.close();
}
@@ -91,8 +91,7 @@ Cache CacheFactory::create() const {
if (!cache.isClosed()) {
cache.close();
}
- throw apache::geode::client::UnknownException(
- "Exception thrown in CacheFactory::create");
+ throw UnknownException("Exception thrown in CacheFactory::create");
}
auto& cacheImpl = cache.m_cacheImpl;
@@ -140,9 +139,9 @@ Cache CacheFactory::create(
} else {
cache.m_cacheImpl->initServices();
}
- } catch (const apache::geode::client::RegionExistsException&) {
+ } catch (const RegionExistsException&) {
LOGWARN("Attempt to create existing regions declaratively");
- } catch (const apache::geode::client::Exception&) {
+ } catch (const Exception&) {
if (!cache.isClosed()) {
cache.close();
}
@@ -151,8 +150,7 @@ Cache CacheFactory::create(
if (!cache.isClosed()) {
cache.close();
}
- throw apache::geode::client::UnknownException(
- "Exception thrown in CacheFactory::create");
+ throw UnknownException("Exception thrown in CacheFactory::create");
}
return cache;
diff --git a/cppcache/src/CacheImpl.cpp b/cppcache/src/CacheImpl.cpp
index ce1af08..2336df6 100644
--- a/cppcache/src/CacheImpl.cpp
+++ b/cppcache/src/CacheImpl.cpp
@@ -47,7 +47,9 @@
#define DEFAULT_DS_NAME "default_GeodeDS"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
CacheImpl::CacheImpl(Cache* c, const std::shared_ptr<Properties>& dsProps,
bool ignorePdxUnreadFields, bool readPdxSerialized,
@@ -77,6 +79,8 @@ CacheImpl::CacheImpl(Cache* c, const std::shared_ptr<Properties>& dsProps,
m_threadPool(new ThreadPool(
m_distributedSystem.getSystemProperties().threadPoolSize())),
m_authInitialize(authInitialize) {
+ using apache::geode::statistics::StatisticsManager;
+
m_cacheTXManager = std::shared_ptr<InternalCacheTransactionManager2PC>(
new InternalCacheTransactionManager2PCImpl(this));
@@ -172,7 +176,7 @@ CacheImpl::RegionKind CacheImpl::getRegionKind(
pPtr->getSubscriptionEnabled())) ||
m_tcrConnectionManager->isDurable()) {
regionKind = THINCLIENT_HA_REGION; // As of now ThinClinetHARegion deals
- // with Pool as well.
+ // with Pool as well.
} else {
regionKind = THINCLIENT_POOL_REGION;
}
@@ -869,3 +873,6 @@ AuthenticatedView CacheImpl::createAuthenticatedView(
}
void CacheImpl::setCache(Cache* cache) { m_cache = cache; }
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CachePerfStats.hpp b/cppcache/src/CachePerfStats.hpp
index 32614ee..3268fbe 100644
--- a/cppcache/src/CachePerfStats.hpp
+++ b/cppcache/src/CachePerfStats.hpp
@@ -31,7 +31,9 @@ namespace apache {
namespace geode {
namespace client {
-using namespace apache::geode::statistics;
+using statistics::StatisticDescriptor;
+using statistics::Statistics;
+using statistics::StatisticsFactory;
/** hold statistics for cache.. */
class APACHE_GEODE_EXPORT CachePerfStats {
@@ -280,9 +282,7 @@ class APACHE_GEODE_EXPORT CachePerfStats {
m_cachePerfStats->incInt(m_pdxInstanceDeserializationsId, 1);
}
- inline apache::geode::statistics::Statistics* getStat() {
- return m_cachePerfStats;
- }
+ inline Statistics* getStat() { return m_cachePerfStats; }
inline int32_t getPdxInstanceDeserializationTimeId() {
return m_pdxInstanceDeserializationTimeId;
diff --git a/cppcache/src/CacheXml.cpp b/cppcache/src/CacheXml.cpp
index 4f29352..fad7551 100644
--- a/cppcache/src/CacheXml.cpp
+++ b/cppcache/src/CacheXml.cpp
@@ -17,7 +17,9 @@
#include "CacheXml.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
CacheXml::CacheXml() {
/** The name of the <code>cache</code> element */
@@ -184,3 +186,7 @@ CacheXml::CacheXml() {
REFID = "refid";
PR_SINGLE_HOP_ENABLED = "pr-single-hop-enabled";
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CacheXmlCreation.cpp b/cppcache/src/CacheXmlCreation.cpp
index bd66cac..7c86112 100644
--- a/cppcache/src/CacheXmlCreation.cpp
+++ b/cppcache/src/CacheXmlCreation.cpp
@@ -20,7 +20,9 @@
#include "CacheImpl.hpp"
#include "PoolAttributes.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
void CacheXmlCreation::addRootRegion(std::shared_ptr<RegionXmlCreation> root) {
rootRegions.push_back(root);
@@ -61,3 +63,6 @@ CacheXmlCreation::CacheXmlCreation()
m_pdxIgnoreUnreadFields = false;
m_readPdxSerialized = false;
}
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CacheXmlParser.cpp b/cppcache/src/CacheXmlParser.cpp
index a03d90c..fdc6a26 100644
--- a/cppcache/src/CacheXmlParser.cpp
+++ b/cppcache/src/CacheXmlParser.cpp
@@ -42,7 +42,7 @@ void* getFactoryFunc(const std::string& lib, const std::string& funcName);
namespace {
-using namespace apache::geode::client::impl;
+using apache::geode::client::impl::getFactoryFunc;
std::vector<std::pair<std::string, int>> parseEndPoints(
const std::string& str) {
@@ -638,7 +638,7 @@ void CacheXmlParser::endPool() {
void CacheXmlParser::setPoolInfo(PoolFactory* factory, const char* name,
const char* value) {
- using namespace apache::geode::internal::chrono::duration;
+ using apache::geode::internal::chrono::duration::from_string;
if (strcmp(name, FREE_CONNECTION_TIMEOUT) == 0) {
factory->setFreeConnectionTimeout(
@@ -1048,6 +1048,8 @@ void CacheXmlParser::endRegionAttributes() {
* the element's attributes and push it on the _stack.
*/
void CacheXmlParser::startExpirationAttributes(const xmlChar** atts) {
+ using apache::geode::internal::chrono::duration::from_string;
+
if (!atts) {
std::string s = "XML:No attributes provided for <expiration-attributes> ";
throw CacheXmlException(s.c_str());
diff --git a/cppcache/src/CacheableEnum.cpp b/cppcache/src/CacheableEnum.cpp
index 3295c84..ef1395a 100644
--- a/cppcache/src/CacheableEnum.cpp
+++ b/cppcache/src/CacheableEnum.cpp
@@ -52,6 +52,8 @@ void CacheableEnum::fromData(apache::geode::client::DataInput& input) {
}
void CacheableEnum::calculateHashcode() {
+ using internal::geode_hash;
+
m_hashcode = 1;
const int32_t prime = 31;
m_hashcode = prime * m_hashcode + geode_hash<std::string>{}(m_enumClassName);
diff --git a/cppcache/src/CacheableObjectPartList.hpp b/cppcache/src/CacheableObjectPartList.hpp
index 5339e1e..1dcd368 100644
--- a/cppcache/src/CacheableObjectPartList.hpp
+++ b/cppcache/src/CacheableObjectPartList.hpp
@@ -38,6 +38,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSFid;
+
class ThinClientRegion;
/**
@@ -50,9 +52,9 @@ class ThinClientRegion;
*
*
*/
-class CacheableObjectPartList : public DataSerializableFixedId {
+class CacheableObjectPartList : public internal::DataSerializableFixedId {
protected:
- const std::vector<std::shared_ptr<CacheableKey>> * m_keys;
+ const std::vector<std::shared_ptr<CacheableKey>>* m_keys;
uint32_t* m_keysOffset;
std::shared_ptr<HashMapOfCacheable> m_values;
std::shared_ptr<HashMapOfException> m_exceptions;
@@ -116,9 +118,7 @@ class CacheableObjectPartList : public DataSerializableFixedId {
void fromData(DataInput& input) override;
- DSFid getDSFID() const override {
- return DSFid::CacheableObjectPartList;
- }
+ DSFid getDSFID() const override { return DSFid::CacheableObjectPartList; }
size_t objectSize() const override;
};
diff --git a/cppcache/src/CacheableString.cpp b/cppcache/src/CacheableString.cpp
index 5140a8f..701567b 100644
--- a/cppcache/src/CacheableString.cpp
+++ b/cppcache/src/CacheableString.cpp
@@ -108,7 +108,7 @@ bool CacheableString::operator==(const CacheableKey& other) const {
int32_t CacheableString::hashcode() const {
if (m_hashcode == 0) {
- m_hashcode = geode_hash<std::string>{}(m_str);
+ m_hashcode = internal::geode_hash<std::string>{}(m_str);
}
return m_hashcode;
}
diff --git a/cppcache/src/CacheableToken.cpp b/cppcache/src/CacheableToken.cpp
index 10461bd..496863a 100644
--- a/cppcache/src/CacheableToken.cpp
+++ b/cppcache/src/CacheableToken.cpp
@@ -22,7 +22,9 @@
#include <geode/DataOutput.hpp>
#include <geode/CacheableString.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
//---- statics
std::shared_ptr<CacheableToken> CacheableToken::invalidToken =
@@ -73,3 +75,7 @@ std::string CacheableToken::toString() const {
}
size_t CacheableToken::objectSize() const { return sizeof(m_value); }
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ClientConnectionRequest.cpp b/cppcache/src/ClientConnectionRequest.cpp
index cc61713..d5666bf 100644
--- a/cppcache/src/ClientConnectionRequest.cpp
+++ b/cppcache/src/ClientConnectionRequest.cpp
@@ -19,7 +19,9 @@
#include <geode/DataOutput.hpp>
#include <geode/DataInput.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
void ClientConnectionRequest::toData(DataOutput& output) const {
output.writeString(m_servergroup);
@@ -41,3 +43,7 @@ void ClientConnectionRequest::writeSetOfServerLocation(
it++;
}
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ClientConnectionResponse.cpp b/cppcache/src/ClientConnectionResponse.cpp
index d70f39d..01f8edc 100644
--- a/cppcache/src/ClientConnectionResponse.cpp
+++ b/cppcache/src/ClientConnectionResponse.cpp
@@ -18,7 +18,11 @@
#include <geode/DataOutput.hpp>
#include <geode/DataInput.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
+
+using internal::DSFid;
void ClientConnectionResponse::fromData(DataInput& input) {
m_serverFound = input.readBoolean();
@@ -38,3 +42,7 @@ size_t ClientConnectionResponse::objectSize() const {
ServerLocation ClientConnectionResponse::getServerLocation() const {
return m_server;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ClientConnectionResponse.hpp b/cppcache/src/ClientConnectionResponse.hpp
index 12c4ebd..928e964 100644
--- a/cppcache/src/ClientConnectionResponse.hpp
+++ b/cppcache/src/ClientConnectionResponse.hpp
@@ -28,6 +28,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSFid;
+
class ClientConnectionResponse : public ServerLocationResponse {
public:
ClientConnectionResponse() : ServerLocationResponse(), m_serverFound(false) {}
diff --git a/cppcache/src/ClientHealthStats.hpp b/cppcache/src/ClientHealthStats.hpp
index 98dee26..1e350f2 100644
--- a/cppcache/src/ClientHealthStats.hpp
+++ b/cppcache/src/ClientHealthStats.hpp
@@ -31,7 +31,7 @@ namespace geode {
namespace client {
class ClientHealthStats : public internal::DataSerializableFixedId_t<
- DSFid::ClientHealthStats> {
+ internal::DSFid::ClientHealthStats> {
public:
void toData(DataOutput& output) const override;
diff --git a/cppcache/src/ClientProxyMembershipID.cpp b/cppcache/src/ClientProxyMembershipID.cpp
index 5b5d8a7..c3acf65 100644
--- a/cppcache/src/ClientProxyMembershipID.cpp
+++ b/cppcache/src/ClientProxyMembershipID.cpp
@@ -35,7 +35,9 @@
#define VMKIND 13
#define ROLEARRLENGTH 0
static int synch_counter = 2;
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
namespace {
static class RandomInitializer {
@@ -398,3 +400,7 @@ void ClientProxyMembershipID::writeVersion(int16_t ordinal,
LOGDEBUG("ClientProxyMembershipID::writeVersion ordinal = %d ", ordinal);
}
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ClientProxyMembershipID.hpp b/cppcache/src/ClientProxyMembershipID.hpp
index cf7679f..b189079 100644
--- a/cppcache/src/ClientProxyMembershipID.hpp
+++ b/cppcache/src/ClientProxyMembershipID.hpp
@@ -34,6 +34,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSFid;
+
class ClientProxyMembershipID;
class ClientProxyMembershipID : public DSMemberForVersionStamp {
@@ -95,7 +97,8 @@ class ClientProxyMembershipID : public DSMemberForVersionStamp {
offset += ACE_OS::snprintf(hostInfo + offset, 255 - offset, ":%x",
m_hostAddr[i]);
}
- result += geode_hash<std::string>{}(std::string(hostInfo, offset));
+ result +=
+ internal::geode_hash<std::string>{}(std::string(hostInfo, offset));
result += m_hostPort;
return result;
}
diff --git a/cppcache/src/ClientReplacementRequest.cpp b/cppcache/src/ClientReplacementRequest.cpp
index cd87e74..ab185a2 100644
--- a/cppcache/src/ClientReplacementRequest.cpp
+++ b/cppcache/src/ClientReplacementRequest.cpp
@@ -19,7 +19,9 @@
#include <geode/DataOutput.hpp>
#include <geode/DataInput.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
void ClientReplacementRequest::toData(DataOutput& output) const {
ClientConnectionRequest::toData(output);
@@ -29,3 +31,7 @@ void ClientReplacementRequest::toData(DataOutput& output) const {
DSFid ClientReplacementRequest::getDSFID() const {
return DSFid::ClientReplacementRequest;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ConcurrentEntriesMap.cpp b/cppcache/src/ConcurrentEntriesMap.cpp
index 5a0a311..cdadbc0 100644
--- a/cppcache/src/ConcurrentEntriesMap.cpp
+++ b/cppcache/src/ConcurrentEntriesMap.cpp
@@ -20,7 +20,9 @@
#include <algorithm>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
bool EntriesMap::boolVal = false;
@@ -248,3 +250,7 @@ GfErrType ConcurrentEntriesMap::isTombstone(std::shared_ptr<CacheableKey>& key,
bool& result) {
return segmentFor(key)->isTombstone(key, me, result);
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CqAttributesMutator.cpp b/cppcache/src/CqAttributesMutator.cpp
index 1b14fd4..5472186 100644
--- a/cppcache/src/CqAttributesMutator.cpp
+++ b/cppcache/src/CqAttributesMutator.cpp
@@ -18,7 +18,9 @@
#include "CqAttributesImpl.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
CqAttributesMutator::CqAttributesMutator(const std::shared_ptr<CqAttributes>& impl)
: m_cqAttributes(impl) {}
@@ -39,3 +41,7 @@ void CqAttributesMutator::setCqListeners(
std::static_pointer_cast<CqAttributesImpl>(m_cqAttributes)
->setCqListeners(newListeners);
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CqEventImpl.cpp b/cppcache/src/CqEventImpl.cpp
index 8a84304..728322e 100644
--- a/cppcache/src/CqEventImpl.cpp
+++ b/cppcache/src/CqEventImpl.cpp
@@ -20,7 +20,9 @@
#include "ThinClientCacheDistributionManager.hpp"
#include "TcrMessage.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
CqEventImpl::CqEventImpl(std::shared_ptr<CqQuery>& cQuery, CqOperation baseOp,
CqOperation cqOp, std::shared_ptr<CacheableKey>& key,
std::shared_ptr<Cacheable>& value,
@@ -102,3 +104,7 @@ std::string CqEventImpl::toString() {
std::shared_ptr<CacheableBytes> CqEventImpl::getDeltaValue() const {
return m_deltaValue;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CqQueryImpl.cpp b/cppcache/src/CqQueryImpl.cpp
index b5d0a1e..928498a 100644
--- a/cppcache/src/CqQueryImpl.cpp
+++ b/cppcache/src/CqQueryImpl.cpp
@@ -30,7 +30,9 @@
#include "util/Log.hpp"
#include "util/exception.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
CqQueryImpl::CqQueryImpl(
const std::shared_ptr<CqService>& cqService, const std::string& cqName,
@@ -593,3 +595,7 @@ bool CqQueryImpl::isClosed() const {
* @return true if durable, false otherwise
*/
bool CqQueryImpl::isDurable() const { return m_isDurable; }
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/CqServiceVsdStats.hpp b/cppcache/src/CqServiceVsdStats.hpp
index ba31c2c..7c5071c 100644
--- a/cppcache/src/CqServiceVsdStats.hpp
+++ b/cppcache/src/CqServiceVsdStats.hpp
@@ -104,7 +104,7 @@ class APACHE_GEODE_EXPORT CqServiceVsdStats : public CqServiceStatistics {
}
private:
- apache::geode::statistics::Statistics* m_cqServiceVsdStats;
+ Statistics* m_cqServiceVsdStats;
int32_t m_numCqsActiveId;
int32_t m_numCqsCreatedId;
diff --git a/cppcache/src/DSMemberForVersionStamp.hpp b/cppcache/src/DSMemberForVersionStamp.hpp
index a61233d..7e6decd 100644
--- a/cppcache/src/DSMemberForVersionStamp.hpp
+++ b/cppcache/src/DSMemberForVersionStamp.hpp
@@ -30,6 +30,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DataSerializableFixedId;
+
class DSMemberForVersionStamp;
class DSMemberForVersionStamp : public CacheableKey,
diff --git a/cppcache/src/DataInput.cpp b/cppcache/src/DataInput.cpp
index 0597d62..352ac38 100644
--- a/cppcache/src/DataInput.cpp
+++ b/cppcache/src/DataInput.cpp
@@ -62,8 +62,8 @@ void DataInput::readJavaModifiedUtf8(
std::basic_string<char16_t, _Traits, _Allocator>& value) {
uint16_t length = readInt16();
_GEODE_CHECK_BUFFER_SIZE(length);
- value =
- JavaModifiedUtf8::decode(reinterpret_cast<const char*>(m_buf), length);
+ value = internal::JavaModifiedUtf8::decode(
+ reinterpret_cast<const char*>(m_buf), length);
advanceCursor(length);
}
template APACHE_GEODE_EXPLICIT_TEMPLATE_EXPORT void
diff --git a/cppcache/src/DataOutput.cpp b/cppcache/src/DataOutput.cpp
index 7bafb6c..31844ad 100644
--- a/cppcache/src/DataOutput.cpp
+++ b/cppcache/src/DataOutput.cpp
@@ -34,8 +34,6 @@ namespace apache {
namespace geode {
namespace client {
-using namespace internal;
-
ACE_Recursive_Thread_Mutex g_bigBufferLock;
size_t DataOutput::m_highWaterMark = 50 * 1024 * 1024;
size_t DataOutput::m_lowWaterMark = 8192;
@@ -188,7 +186,7 @@ void DataOutput::writeJavaModifiedUtf8(const char32_t* data, size_t len) {
size_t DataOutput::getJavaModifiedUtf8EncodedLength(const char16_t* data,
size_t length) {
- return JavaModifiedUtf8::encodedLength(data, length);
+ return internal::JavaModifiedUtf8::encodedLength(data, length);
}
template <class _Traits, class _Allocator>
diff --git a/cppcache/src/DefaultResultCollector.cpp b/cppcache/src/DefaultResultCollector.cpp
index 7d33593..c81c0c0 100644
--- a/cppcache/src/DefaultResultCollector.cpp
+++ b/cppcache/src/DefaultResultCollector.cpp
@@ -17,7 +17,9 @@
#include <geode/DefaultResultCollector.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
DefaultResultCollector::DefaultResultCollector()
: resultList(CacheableVector::create()), ready(false) {}
@@ -35,7 +37,8 @@ std::shared_ptr<CacheableVector> DefaultResultCollector::getResult(
"getResult() method");
}
-void DefaultResultCollector::addResult(const std::shared_ptr<Cacheable>& result) {
+void DefaultResultCollector::addResult(
+ const std::shared_ptr<Cacheable>& result) {
resultList->push_back(result);
}
@@ -48,3 +51,7 @@ void DefaultResultCollector::endResults() {
}
void DefaultResultCollector::clearResults() { resultList->clear(); }
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/DiskStoreId.cpp b/cppcache/src/DiskStoreId.cpp
index 1210f46..366b5ea 100644
--- a/cppcache/src/DiskStoreId.cpp
+++ b/cppcache/src/DiskStoreId.cpp
@@ -15,7 +15,6 @@
* limitations under the License.
*/
-#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <ace/OS.h>
diff --git a/cppcache/src/DiskStoreId.hpp b/cppcache/src/DiskStoreId.hpp
index 4af4e71..494eca1 100644
--- a/cppcache/src/DiskStoreId.hpp
+++ b/cppcache/src/DiskStoreId.hpp
@@ -28,6 +28,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSFid;
+
class DiskStoreId : public DSMemberForVersionStamp {
public:
DiskStoreId() : m_hashCode(""), m_mostSig(0), m_leastSig(0) {}
diff --git a/cppcache/src/DistributedSystem.cpp b/cppcache/src/DistributedSystem.cpp
index f013cde..6aa1dc2 100644
--- a/cppcache/src/DistributedSystem.cpp
+++ b/cppcache/src/DistributedSystem.cpp
@@ -37,8 +37,6 @@ namespace apache {
namespace geode {
namespace client {
-using namespace apache::geode::statistics;
-
DistributedSystem::DistributedSystem(const std::string& name,
std::unique_ptr<SystemProperties> sysProps)
: m_impl(new DistributedSystemImpl(name, this, std::move(sysProps))) {}
diff --git a/cppcache/src/EntriesMapFactory.cpp b/cppcache/src/EntriesMapFactory.cpp
index 4c22c0a..30eefed 100644
--- a/cppcache/src/EntriesMapFactory.cpp
+++ b/cppcache/src/EntriesMapFactory.cpp
@@ -24,7 +24,9 @@
//#include <geode/ExpirationAction.hpp>
#include <geode/SystemProperties.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
/**
* @brief Return a ConcurrentEntriesMap if no LRU, otherwise return a
@@ -32,8 +34,8 @@ using namespace apache::geode::client;
* In the future, a EntriesMap facade can be put over the SharedRegionData to
* support shared regions directly.
*/
-EntriesMap* EntriesMapFactory::createMap(
- RegionInternal* region, RegionAttributes attrs) {
+EntriesMap* EntriesMapFactory::createMap(RegionInternal* region,
+ RegionAttributes attrs) {
EntriesMap* result = nullptr;
uint32_t initialCapacity = attrs.getInitialCapacity();
uint8_t concurrency = attrs.getConcurrencyLevel();
@@ -95,3 +97,7 @@ EntriesMap* EntriesMapFactory::createMap(
result->open(initialCapacity);
return result;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/EnumInfo.hpp b/cppcache/src/EnumInfo.hpp
index fba2efc..4535837 100644
--- a/cppcache/src/EnumInfo.hpp
+++ b/cppcache/src/EnumInfo.hpp
@@ -29,6 +29,9 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DataSerializableFixedId_t;
+using internal::DSFid;
+
class APACHE_GEODE_EXPORT EnumInfo
: public DataSerializableFixedId_t<DSFid::EnumInfo>,
public CacheableKey {
diff --git a/cppcache/src/EventId.hpp b/cppcache/src/EventId.hpp
index 0c41110..c6c3a05 100644
--- a/cppcache/src/EventId.hpp
+++ b/cppcache/src/EventId.hpp
@@ -33,6 +33,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSFid;
+
/**
* EventID "token" with a Distributed Member ID, Thread ID and per-thread
* Sequence ID
diff --git a/cppcache/src/EventIdMap.cpp b/cppcache/src/EventIdMap.cpp
index 89db70e..5b960c5 100644
--- a/cppcache/src/EventIdMap.cpp
+++ b/cppcache/src/EventIdMap.cpp
@@ -16,7 +16,9 @@
*/
#include "EventIdMap.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
EventIdMap::~EventIdMap() { clear(); }
@@ -202,3 +204,7 @@ void EventSequence::setDeadline(ACE_Time_Value deadline) {
bool EventSequence::operator<=(const EventSequence& rhs) const {
return this->m_seqNum <= (&rhs)->m_seqNum;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/EvictionThread.cpp b/cppcache/src/EvictionThread.cpp
index 36dbd37..fba41ff 100644
--- a/cppcache/src/EvictionThread.cpp
+++ b/cppcache/src/EvictionThread.cpp
@@ -17,7 +17,10 @@
#include "EvictionThread.hpp"
#include "EvictionController.hpp"
#include "DistributedSystemImpl.hpp"
-using namespace apache::geode::client;
+
+namespace apache {
+namespace geode {
+namespace client {
const char* EvictionThread::NC_Evic_Thread = "NC Evic Thread";
EvictionThread::EvictionThread(EvictionController* parent)
@@ -48,3 +51,7 @@ void EvictionThread::processEvictions() {
}
void EvictionThread::putEvictionInfo(int32_t info) { m_queue.put(info); }
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ExpiryTaskManager.cpp b/cppcache/src/ExpiryTaskManager.cpp
index eddb4cd..7a1485b 100644
--- a/cppcache/src/ExpiryTaskManager.cpp
+++ b/cppcache/src/ExpiryTaskManager.cpp
@@ -31,7 +31,9 @@
#include <ace/Dev_Poll_Reactor.h>
#endif
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
const char* ExpiryTaskManager::NC_ETM_Thread = "NC ETM Thread";
@@ -59,7 +61,8 @@ long ExpiryTaskManager::scheduleExpiryTask(ACE_Event_Handler* handler,
ACE_Time_Value expTimeValue(expTime);
ACE_Time_Value intervalValue(interval);
- return m_reactor->schedule_timer(handler, nullptr, expTimeValue, intervalValue);
+ return m_reactor->schedule_timer(handler, nullptr, expTimeValue,
+ intervalValue);
}
long ExpiryTaskManager::scheduleExpiryTask(ACE_Event_Handler* handler,
@@ -115,3 +118,7 @@ ExpiryTaskManager::~ExpiryTaskManager() {
delete m_reactor;
m_reactor = nullptr;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/ExpiryTaskManager.hpp b/cppcache/src/ExpiryTaskManager.hpp
index 0783c8b..468f878 100644
--- a/cppcache/src/ExpiryTaskManager.hpp
+++ b/cppcache/src/ExpiryTaskManager.hpp
@@ -40,7 +40,7 @@ namespace apache {
namespace geode {
namespace client {
-using namespace apache::geode::internal::chrono::duration;
+using ::apache::geode::internal::chrono::duration::to_string;
/**
* @class ExpiryTaskManager ExpiryTaskManager.hpp
diff --git a/cppcache/src/FixedPartitionAttributesImpl.hpp b/cppcache/src/FixedPartitionAttributesImpl.hpp
index 3dc6bcd..6ac972d 100644
--- a/cppcache/src/FixedPartitionAttributesImpl.hpp
+++ b/cppcache/src/FixedPartitionAttributesImpl.hpp
@@ -30,7 +30,7 @@ namespace apache {
namespace geode {
namespace client {
-class FixedPartitionAttributesImpl : public DataSerializableInternal {
+class FixedPartitionAttributesImpl : public internal::DataSerializableInternal {
private:
std::string m_partitionName;
bool m_isPrimary;
diff --git a/cppcache/src/FunctionService.cpp b/cppcache/src/FunctionService.cpp
index f4a7f54..c1f69d5 100644
--- a/cppcache/src/FunctionService.cpp
+++ b/cppcache/src/FunctionService.cpp
@@ -25,7 +25,10 @@
#include "ExecutionImpl.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
+
Execution FunctionService::onRegion(const std::shared_ptr<Region>& region) {
LOGDEBUG("FunctionService::onRegion(std::shared_ptr<Region> region)");
if (region == nullptr) {
@@ -57,7 +60,8 @@ Execution FunctionService::onRegion(const std::shared_ptr<Region>& region) {
}
// getting real region to execute function on region
if (!realRegion->getCache().isClosed()) {
- realRegion = realRegion->getCache().m_cacheImpl->getRegion(realRegion->getName());
+ realRegion = realRegion->getCache().m_cacheImpl->getRegion(
+ realRegion->getName());
} else {
throw IllegalStateException("Cache has been closed");
}
@@ -149,3 +153,7 @@ Execution FunctionService::onServersWithCache(RegionService& cache) {
realcache.m_cacheImpl->getPoolManager().getDefaultPool());
}
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/FunctionServiceImpl.cpp b/cppcache/src/FunctionServiceImpl.cpp
index 8f6dd2d..5071d44 100644
--- a/cppcache/src/FunctionServiceImpl.cpp
+++ b/cppcache/src/FunctionServiceImpl.cpp
@@ -19,7 +19,9 @@
#include "ExecutionImpl.hpp"
#include <geode/PoolManager.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
FunctionServiceImpl::FunctionServiceImpl(AuthenticatedView* authenticatedView) {
m_authenticatedView = authenticatedView;
@@ -29,3 +31,7 @@ std::shared_ptr<FunctionService> FunctionServiceImpl::getFunctionService(
AuthenticatedView* authenticatedView) {
return std::make_shared<FunctionServiceImpl>(authenticatedView);
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/GetAllServersRequest.cpp b/cppcache/src/GetAllServersRequest.cpp
index b8a37dd..333e51d 100644
--- a/cppcache/src/GetAllServersRequest.cpp
+++ b/cppcache/src/GetAllServersRequest.cpp
@@ -17,7 +17,9 @@
#include "GetAllServersRequest.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
void GetAllServersRequest::toData(DataOutput& output) const {
output.writeObject(m_serverGroup);
@@ -27,3 +29,7 @@ void GetAllServersRequest::fromData(DataInput& input) {
m_serverGroup =
std::dynamic_pointer_cast<CacheableString>(input.readObject());
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/GetAllServersRequest.hpp b/cppcache/src/GetAllServersRequest.hpp
index d955391..732fe66 100644
--- a/cppcache/src/GetAllServersRequest.hpp
+++ b/cppcache/src/GetAllServersRequest.hpp
@@ -34,7 +34,7 @@ namespace geode {
namespace client {
class GetAllServersRequest : public internal::DataSerializableFixedId_t<
- DSFid::GetAllServersRequest> {
+ internal::DSFid::GetAllServersRequest> {
std::shared_ptr<CacheableString> m_serverGroup;
public:
diff --git a/cppcache/src/GetAllServersResponse.cpp b/cppcache/src/GetAllServersResponse.cpp
index cdaa9ed..78a82eb 100644
--- a/cppcache/src/GetAllServersResponse.cpp
+++ b/cppcache/src/GetAllServersResponse.cpp
@@ -16,7 +16,9 @@
*/
#include "GetAllServersResponse.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
void GetAllServersResponse::toData(DataOutput& output) const {
int32_t length = static_cast<int32_t>(m_servers.size());
@@ -34,3 +36,7 @@ void GetAllServersResponse::fromData(DataInput& input) {
m_servers.push_back(sLoc);
}
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/GetAllServersResponse.hpp b/cppcache/src/GetAllServersResponse.hpp
index 3b7967d..3043711 100644
--- a/cppcache/src/GetAllServersResponse.hpp
+++ b/cppcache/src/GetAllServersResponse.hpp
@@ -33,7 +33,7 @@ namespace geode {
namespace client {
class GetAllServersResponse : public internal::DataSerializableFixedId_t<
- DSFid::GetAllServersResponse> {
+ internal::DSFid::GetAllServersResponse> {
std::vector<ServerLocation> m_servers;
public:
diff --git a/cppcache/src/HashMapOfException.hpp b/cppcache/src/HashMapOfException.hpp
index ed1aa44..b0baf1d 100644
--- a/cppcache/src/HashMapOfException.hpp
+++ b/cppcache/src/HashMapOfException.hpp
@@ -29,10 +29,12 @@ namespace apache {
namespace geode {
namespace client {
+using internal::dereference_equal_to;
+using internal::dereference_hash;
+
class CacheableKey;
class Exception;
-using namespace apache::geode::client::internal;
typedef std::unordered_map<std::shared_ptr<CacheableKey>,
std::shared_ptr<Exception>,
dereference_hash<std::shared_ptr<CacheableKey>>,
diff --git a/cppcache/src/InterestResultPolicy.cpp b/cppcache/src/InterestResultPolicy.cpp
index 81ce877..b043896 100644
--- a/cppcache/src/InterestResultPolicy.cpp
+++ b/cppcache/src/InterestResultPolicy.cpp
@@ -17,9 +17,15 @@
#include "InterestResultPolicy.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
char InterestResultPolicy::nextOrdinal = 0;
InterestResultPolicy InterestResultPolicy::NONE;
InterestResultPolicy InterestResultPolicy::KEYS;
InterestResultPolicy InterestResultPolicy::KEYS_VALUES;
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/LRUAction.cpp b/cppcache/src/LRUAction.cpp
index 20b994e..a367cca 100644
--- a/cppcache/src/LRUAction.cpp
+++ b/cppcache/src/LRUAction.cpp
@@ -20,7 +20,9 @@
#include "LRUEntriesMap.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
LRUAction* LRUAction::newLRUAction(const LRUAction::Action& actionType,
RegionInternal* regionPtr,
@@ -116,3 +118,7 @@ bool LRULocalInvalidateAction::evict(
}
return (err == GF_NOERR);
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/LRULocalDestroyAction.cpp b/cppcache/src/LRULocalDestroyAction.cpp
index df7b2cc..dfb78e6 100644
--- a/cppcache/src/LRULocalDestroyAction.cpp
+++ b/cppcache/src/LRULocalDestroyAction.cpp
@@ -19,7 +19,9 @@
#include "LRUEntriesMap.hpp"
#include "CacheImpl.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
bool LRULocalDestroyAction::evict(const std::shared_ptr<MapEntryImpl>& mePtr) {
std::shared_ptr<CacheableKey> keyPtr;
@@ -34,3 +36,7 @@ bool LRULocalDestroyAction::evict(const std::shared_ptr<MapEntryImpl>& mePtr) {
versionTag);
return (err == GF_NOERR);
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/LocatorListRequest.cpp b/cppcache/src/LocatorListRequest.cpp
index fd8f78d..de767b6 100644
--- a/cppcache/src/LocatorListRequest.cpp
+++ b/cppcache/src/LocatorListRequest.cpp
@@ -19,7 +19,11 @@
#include <geode/DataOutput.hpp>
#include <geode/CacheableString.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
+
+using internal::DSFid;
LocatorListRequest::LocatorListRequest(const std::string& servergroup)
: m_servergroup(servergroup) {}
@@ -31,3 +35,7 @@ void LocatorListRequest::toData(DataOutput& output) const {
DSFid LocatorListRequest::getDSFID() const {
return DSFid::LocatorListRequest;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/LocatorListResponse.cpp b/cppcache/src/LocatorListResponse.cpp
index 055d5bf..30a3cc4 100644
--- a/cppcache/src/LocatorListResponse.cpp
+++ b/cppcache/src/LocatorListResponse.cpp
@@ -19,7 +19,11 @@
#include <geode/DataInput.hpp>
#include <vector>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
+
+using internal::DSFid;
void LocatorListResponse::fromData(DataInput& input) {
readList(input);
@@ -48,3 +52,7 @@ bool LocatorListResponse::isBalanced() const { return m_isBalanced; }
std::shared_ptr<Serializable> LocatorListResponse::create() {
return std::make_shared<LocatorListResponse>();
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/LocatorListResponse.hpp b/cppcache/src/LocatorListResponse.hpp
index a5529af..5b7c798 100644
--- a/cppcache/src/LocatorListResponse.hpp
+++ b/cppcache/src/LocatorListResponse.hpp
@@ -28,6 +28,8 @@ namespace apache {
namespace geode {
namespace client {
+using internal::DSFid;
+
class DataInput;
class LocatorListResponse : public ServerLocationResponse {
diff --git a/cppcache/src/Log.cpp b/cppcache/src/Log.cpp
index d00abd1..4f10e5a 100644
--- a/cppcache/src/Log.cpp
+++ b/cppcache/src/Log.cpp
@@ -155,7 +155,21 @@ namespace client {
LogLevel Log::s_logLevel = LogLevel::Default;
-using namespace apache::geode::log::globals;
+using apache::geode::log::globals::g_bytesWritten;
+using apache::geode::log::globals::g_diskSpaceLimit;
+using apache::geode::log::globals::g_fileInfo;
+using apache::geode::log::globals::g_fileInfoPair;
+using apache::geode::log::globals::g_fileSizeLimit;
+using apache::geode::log::globals::g_isLogFileOpened;
+using apache::geode::log::globals::g_log;
+using apache::geode::log::globals::g_logFile;
+using apache::geode::log::globals::g_logFileNameBuffer;
+using apache::geode::log::globals::g_logFileWithExt;
+using apache::geode::log::globals::g_logMutex;
+using apache::geode::log::globals::g_pid;
+using apache::geode::log::globals::g_rollIndex;
+using apache::geode::log::globals::g_spaceUsed;
+using apache::geode::log::globals::g_uname;
/*****************************************************************************/
diff --git a/cppcache/src/MapSegment.hpp b/cppcache/src/MapSegment.hpp
index 6fcbdda..d102ea1 100644
--- a/cppcache/src/MapSegment.hpp
+++ b/cppcache/src/MapSegment.hpp
@@ -45,7 +45,7 @@
#include "util/concurrent/spinlock_mutex.hpp"
-ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+namespace ACE_VERSIONED_NAMESPACE_NAME {
template <>
class ACE_Hash<std::shared_ptr<apache::geode::client::CacheableKey>> {
@@ -65,7 +65,8 @@ class ACE_Equal_To<std::shared_ptr<apache::geode::client::CacheableKey>> {
return key1->operator==(*key2);
}
};
-ACE_END_VERSIONED_NAMESPACE_DECL
+
+} // namespace ACE_VERSIONED_NAMESPACE_NAME
namespace apache {
namespace geode {
diff --git a/cppcache/src/MemberListForVersionStamp.cpp b/cppcache/src/MemberListForVersionStamp.cpp
index c8f10ad..c7ada6a 100644
--- a/cppcache/src/MemberListForVersionStamp.cpp
+++ b/cppcache/src/MemberListForVersionStamp.cpp
@@ -17,7 +17,9 @@
#include "MemberListForVersionStamp.hpp"
#include "util/Log.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
MemberListForVersionStamp::MemberListForVersionStamp() { m_memberCounter = 0; }
@@ -54,3 +56,7 @@ std::shared_ptr<DSMemberForVersionStamp> MemberListForVersionStamp::getDSMember(
if (it != m_members1.end()) return (*it).second;
return nullptr;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/PdxType.hpp b/cppcache/src/PdxType.hpp
index 5c5f7d4..f6395eb 100644
--- a/cppcache/src/PdxType.hpp
+++ b/cppcache/src/PdxType.hpp
@@ -44,7 +44,7 @@ typedef std::map<std::string, std::shared_ptr<PdxFieldType>> NameVsPdxType;
class PdxType;
class PdxTypeRegistry;
-class PdxType : public DataSerializableInternal,
+class PdxType : public internal::DataSerializableInternal,
public std::enable_shared_from_this<PdxType>,
private NonCopyable,
private NonAssignable {
diff --git a/cppcache/src/Pool.cpp b/cppcache/src/Pool.cpp
index 3104f3a..b873090 100644
--- a/cppcache/src/Pool.cpp
+++ b/cppcache/src/Pool.cpp
@@ -27,7 +27,9 @@
* @file
*/
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
Pool::Pool(std::shared_ptr<PoolAttributes> attr) : m_attrs(attr) {}
Pool::~Pool() {}
@@ -139,3 +141,7 @@ int Pool::getPendingEventCount() const {
}
return poolHADM->getPrimaryServerQueueSize();
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/PoolAttributes.cpp b/cppcache/src/PoolAttributes.cpp
index b0a8179..52e5928 100644
--- a/cppcache/src/PoolAttributes.cpp
+++ b/cppcache/src/PoolAttributes.cpp
@@ -18,7 +18,9 @@
#include <geode/ExceptionTypes.hpp>
#include <geode/PoolFactory.hpp>
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
PoolAttributes::PoolAttributes()
: m_isThreadLocalConn(PoolFactory::DEFAULT_THREAD_LOCAL_CONN),
@@ -113,3 +115,7 @@ void PoolAttributes::addServer(const std::string& host, int port) {
}
m_initServList.push_back(host + ":" + std::to_string(port));
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/PoolFactory.cpp b/cppcache/src/PoolFactory.cpp
index 4ad6da6..46c93c4 100644
--- a/cppcache/src/PoolFactory.cpp
+++ b/cppcache/src/PoolFactory.cpp
@@ -31,7 +31,9 @@
#include "ThinClientPoolStickyHADM.hpp"
#include "CacheRegionHelper.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
const std::chrono::milliseconds PoolFactory::DEFAULT_FREE_CONNECTION_TIMEOUT =
std::chrono::seconds{10};
@@ -314,3 +316,7 @@ PoolFactory& PoolFactory::addCheck(const std::string& host, int port) {
}
return *this;
}
+
+} // namespace client
+} // namespace geode
+} // namespace apache
diff --git a/cppcache/src/PoolXmlCreation.cpp b/cppcache/src/PoolXmlCreation.cpp
index ec6d428..d203962 100644
--- a/cppcache/src/PoolXmlCreation.cpp
+++ b/cppcache/src/PoolXmlCreation.cpp
@@ -20,7 +20,9 @@
#include "PoolXmlCreation.hpp"
-using namespace apache::geode::client;
+namespace apache {
+namespace geode {
+namespace client {
/*
void PoolXmlCreation::addLocator(const char * host, const char * port)
@@ -45,3 +47,7 @@ PoolXmlCreation::PoolXmlCreation(const char* name, std::shared_ptr<PoolFactory>
}
PoolXmlCreation::~PoolXmlCreation() {}
... 5423 lines suppressed ...