http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/DistributedSystem.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/DistributedSystem.cpp b/src/clicache/src/DistributedSystem.cpp index bd29a91..239d7e2 100644 --- a/src/clicache/src/DistributedSystem.cpp +++ b/src/clicache/src/DistributedSystem.cpp @@ -15,8 +15,19 @@ * limitations under the License. */ -//#include "geode_includes.hpp" -#include "version.h" +#include "begin_native.hpp" +#include <version.h> +#include <geode/CacheLoader.hpp> +#include <geode/CacheListener.hpp> +#include <geode/FixedPartitionResolver.hpp> +#include <geode/CacheWriter.hpp> +#include <geode/GeodeTypeIds.hpp> +#include <CacheImpl.hpp> +#include <CacheXmlParser.hpp> +#include <DistributedSystemImpl.hpp> +#include <ace/Process.h> // Added to get rid of unresolved token warning +#include "end_native.hpp" + #include "Serializable.hpp" #include "DistributedSystem.hpp" #include "SystemProperties.hpp" @@ -40,16 +51,7 @@ #include "Log.hpp" #include "Struct.hpp" #include "impl/MemoryPressureHandler.hpp" -#include <geode/CacheLoader.hpp> -#include <geode/CacheListener.hpp> -#include <geode/FixedPartitionResolver.hpp> -#include <geode/CacheWriter.hpp> -#include <geode/GeodeTypeIds.hpp> -#include <CacheImpl.hpp> -#include <PooledBasePool.hpp> -#include <CacheXmlParser.hpp> #include "impl/SafeConvert.hpp" -#include <DistributedSystemImpl.hpp> #include "impl/PdxType.hpp" #include "impl/EnumInfo.hpp" #include "impl/ManagedPersistenceManager.hpp" @@ -58,7 +60,6 @@ #pragma warning(disable:4091) #include <msclr/lock.h> #pragma warning(default:4091) -#include <ace/Process.h> // Added to get rid of unresolved token warning using namespace System; @@ -127,6 +128,8 @@ namespace Apache namespace Client { + namespace native = apache::geode::client; + DistributedSystem^ DistributedSystem::Connect(String^ name) { return DistributedSystem::Connect(name, nullptr); @@ -134,130 +137,53 @@ namespace Apache DistributedSystem^ DistributedSystem::Connect(String^ name, Properties<String^, String^>^ config) { - apache::geode::client::DistributedSystemImpl::acquireDisconnectLock(); + native::DistributedSystemImpl::acquireDisconnectLock(); _GF_MG_EXCEPTION_TRY2 ManagedString mg_name(name); - apache::geode::client::PropertiesPtr nativepropsptr( - GetNativePtr<apache::geode::client::Properties>(config)); - - // apache::geode::client::PropertiesPtr nativepropsptr; - DistributedSystem::AppDomainInstanceInitialization(nativepropsptr); + DistributedSystem::AppDomainInstanceInitialization(config->GetNative()); // this we are calling after all .NET initialization required in // each AppDomain - apache::geode::client::DistributedSystemPtr& nativeptr( - apache::geode::client::DistributedSystem::connect(mg_name.CharPtr, - nativepropsptr)); + auto nativeptr = native::DistributedSystem::connect(mg_name.CharPtr, + config->GetNative()); ManagedPostConnect(); - // DistributedSystem::AppDomainInstancePostInitialization(); - - return Create(nativeptr.get()); + return Create(nativeptr); _GF_MG_EXCEPTION_CATCH_ALL2 finally { - apache::geode::client::DistributedSystemImpl::releaseDisconnectLock(); + native::DistributedSystemImpl::releaseDisconnectLock(); } } void DistributedSystem::Disconnect() { - apache::geode::client::DistributedSystemImpl::acquireDisconnectLock(); + native::DistributedSystemImpl::acquireDisconnectLock(); _GF_MG_EXCEPTION_TRY2 - if (apache::geode::client::DistributedSystem::isConnected()) { - // apache::geode::client::CacheImpl::expiryTaskManager->cancelTask( + if (native::DistributedSystem::isConnected()) { + // native::CacheImpl::expiryTaskManager->cancelTask( // s_memoryPressureTaskID); Serializable::UnregisterNativesGeneric(); DistributedSystem::UnregisterBuiltinManagedTypes(); } - apache::geode::client::DistributedSystem::disconnect(); + native::DistributedSystem::disconnect(); _GF_MG_EXCEPTION_CATCH_ALL2 finally { - apache::geode::client::DistributedSystemImpl::releaseDisconnectLock(); + native::DistributedSystemImpl::releaseDisconnectLock(); } } - - /* DistributedSystem^ DistributedSystem::ConnectOrGetInstance(String^ name) - { - return DistributedSystem::ConnectOrGetInstance(name, nullptr); - } - - DistributedSystem^ DistributedSystem::ConnectOrGetInstance(String^ name, - Properties^ config) - { - apache::geode::client::DistributedSystemImpl::acquireDisconnectLock(); - - _GF_MG_EXCEPTION_TRY - - ManagedString mg_name(name); - apache::geode::client::PropertiesPtr nativepropsptr( - GetNativePtr<apache::geode::client::Properties>(config)); - DistributedSystem::AppDomainInstanceInitialization(nativepropsptr); - - // this we are calling after all .NET initialization required in - // each AppDomain - apache::geode::client::DistributedSystemPtr& nativeptr( - apache::geode::client::DistributedSystem::connectOrGetInstance(mg_name.CharPtr, - nativepropsptr)); - - if (apache::geode::client::DistributedSystem::currentInstances() == 1) { - // stuff to be done only for the first connect - ManagedPostConnect(); - } - - DistributedSystem::AppDomainInstancePostInitialization(); - - return Create(nativeptr.get()); - - _GF_MG_EXCEPTION_CATCH_ALL - - finally { - apache::geode::client::DistributedSystemImpl::releaseDisconnectLock(); - } - } - */ - /* int DistributedSystem::DisconnectInstance() - { - apache::geode::client::DistributedSystemImpl::acquireDisconnectLock(); - - _GF_MG_EXCEPTION_TRY - - int remainingInstances = - apache::geode::client::DistributedSystem::currentInstances(); - if (remainingInstances <= 0) { - throw gcnew NotConnectedException("DistributedSystem." - "DisconnectInstance: no remaining instance connections"); - } - - //apache::geode::client::CacheImpl::expiryTaskManager->cancelTask( - //s_memoryPressureTaskID); - Serializable::UnregisterNatives(); - - if (remainingInstances == 1) { // last instance - DistributedSystem::UnregisterBuiltinManagedTypes(); - } - return apache::geode::client::DistributedSystem::disconnectInstance(); - - _GF_MG_EXCEPTION_CATCH_ALL - - finally { - apache::geode::client::DistributedSystemImpl::releaseDisconnectLock(); - } - } - */ - void DistributedSystem::AppDomainInstanceInitialization( - const apache::geode::client::PropertiesPtr& nativepropsptr) + const native::PropertiesPtr& nativepropsptr) { _GF_MG_EXCEPTION_TRY2 @@ -266,128 +192,128 @@ namespace Apache /* Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(Apache::Geode::Client::CacheableHashSet::Create), - apache::geode::client::GeodeTypeIds::CacheableHashSet); + native::GeodeTypeIds::CacheableHashSet); Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(Apache::Geode::Client::CacheableLinkedHashSet::Create), - apache::geode::client::GeodeTypeIds::CacheableLinkedHashSet); + native::GeodeTypeIds::CacheableLinkedHashSet); Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(Apache::Geode::Client::Struct::Create), - apache::geode::client::GeodeTypeIds::Struct); + native::GeodeTypeIds::Struct); Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(Apache::Geode::Client::Properties::CreateDeserializable), - apache::geode::client::GeodeTypeIds::Properties); + native::GeodeTypeIds::Properties); // End register wrapper types for built-in types // Register with cpp using unmanaged Cacheablekey wrapper Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableByte, + native::GeodeTypeIds::CacheableByte, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableByte::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableBoolean, + native::GeodeTypeIds::CacheableBoolean, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableBoolean::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableBytes, + native::GeodeTypeIds::CacheableBytes, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableBytes::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::BooleanArray, + native::GeodeTypeIds::BooleanArray, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::BooleanArray::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableWideChar, + native::GeodeTypeIds::CacheableWideChar, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableCharacter::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CharArray, + native::GeodeTypeIds::CharArray, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CharArray::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableDouble, + native::GeodeTypeIds::CacheableDouble, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableDouble::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableDoubleArray, + native::GeodeTypeIds::CacheableDoubleArray, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableDoubleArray::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableFloat, + native::GeodeTypeIds::CacheableFloat, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableFloat::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableFloatArray, + native::GeodeTypeIds::CacheableFloatArray, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableFloatArray::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashSet, + native::GeodeTypeIds::CacheableHashSet, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableHashSet::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableLinkedHashSet, + native::GeodeTypeIds::CacheableLinkedHashSet, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableLinkedHashSet::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt16, + native::GeodeTypeIds::CacheableInt16, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableInt16::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt16Array, + native::GeodeTypeIds::CacheableInt16Array, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableInt16Array::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt32, + native::GeodeTypeIds::CacheableInt32, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableInt32::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt32Array, + native::GeodeTypeIds::CacheableInt32Array, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableInt32Array::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt64, + native::GeodeTypeIds::CacheableInt64, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableInt64::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt64Array, + native::GeodeTypeIds::CacheableInt64Array, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableInt64Array::CreateDeserializable)); */ /*Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableASCIIString, + native::GeodeTypeIds::CacheableASCIIString, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableString::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableASCIIStringHuge, + native::GeodeTypeIds::CacheableASCIIStringHuge, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableString::createDeserializableHuge)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableString, + native::GeodeTypeIds::CacheableString, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableString::createUTFDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableStringHuge, + native::GeodeTypeIds::CacheableStringHuge, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableString::createUTFDeserializableHuge));*/ /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableNullString, + native::GeodeTypeIds::CacheableNullString, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableString::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableStringArray, + native::GeodeTypeIds::CacheableStringArray, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableStringArray::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::Struct, + native::GeodeTypeIds::Struct, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::Struct::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::Properties, + native::GeodeTypeIds::Properties, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::Properties::CreateDeserializable)); */ @@ -399,209 +325,209 @@ namespace Apache /* Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableByte::Create), - apache::geode::client::GeodeTypeIds::CacheableByte, Byte::typeid);*/ + native::GeodeTypeIds::CacheableByte, Byte::typeid);*/ Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableByte::Create), - apache::geode::client::GeodeTypeIds::CacheableByte, SByte::typeid); + native::GeodeTypeIds::CacheableByte, SByte::typeid); //boolean Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableBoolean::Create), - apache::geode::client::GeodeTypeIds::CacheableBoolean, Boolean::typeid); + native::GeodeTypeIds::CacheableBoolean, Boolean::typeid); //wide char Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableCharacter::Create), - apache::geode::client::GeodeTypeIds::CacheableWideChar, Char::typeid); + native::GeodeTypeIds::CacheableWideChar, Char::typeid); //double Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableDouble::Create), - apache::geode::client::GeodeTypeIds::CacheableDouble, Double::typeid); + native::GeodeTypeIds::CacheableDouble, Double::typeid); //ascii string Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableString::Create), - apache::geode::client::GeodeTypeIds::CacheableASCIIString, String::typeid); + native::GeodeTypeIds::CacheableASCIIString, String::typeid); //TODO: ////ascii string huge //Serializable::RegisterWrapperGeneric( // gcnew WrapperDelegateGeneric(CacheableString::Create), - // apache::geode::client::GeodeTypeIds::CacheableASCIIStringHuge, String::typeid); + // native::GeodeTypeIds::CacheableASCIIStringHuge, String::typeid); ////string //Serializable::RegisterWrapperGeneric( // gcnew WrapperDelegateGeneric(CacheableString::Create), - // apache::geode::client::GeodeTypeIds::CacheableString, String::typeid); + // native::GeodeTypeIds::CacheableString, String::typeid); ////string huge //Serializable::RegisterWrapperGeneric( // gcnew WrapperDelegateGeneric(CacheableString::Create), - // apache::geode::client::GeodeTypeIds::CacheableStringHuge, String::typeid); + // native::GeodeTypeIds::CacheableStringHuge, String::typeid); //float Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableFloat::Create), - apache::geode::client::GeodeTypeIds::CacheableFloat, float::typeid); + native::GeodeTypeIds::CacheableFloat, float::typeid); //int 16 Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableInt16::Create), - apache::geode::client::GeodeTypeIds::CacheableInt16, Int16::typeid); + native::GeodeTypeIds::CacheableInt16, Int16::typeid); //int32 Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableInt32::Create), - apache::geode::client::GeodeTypeIds::CacheableInt32, Int32::typeid); + native::GeodeTypeIds::CacheableInt32, Int32::typeid); //int64 Serializable::RegisterWrapperGeneric( gcnew WrapperDelegateGeneric(CacheableInt64::Create), - apache::geode::client::GeodeTypeIds::CacheableInt64, Int64::typeid); + native::GeodeTypeIds::CacheableInt64, Int64::typeid); ////uint16 //Serializable::RegisterWrapperGeneric( // gcnew WrapperDelegateGeneric(CacheableInt16::Create), - // apache::geode::client::GeodeTypeIds::CacheableInt16, UInt16::typeid); + // native::GeodeTypeIds::CacheableInt16, UInt16::typeid); ////uint32 //Serializable::RegisterWrapperGeneric( // gcnew WrapperDelegateGeneric(CacheableInt32::Create), - // apache::geode::client::GeodeTypeIds::CacheableInt32, UInt32::typeid); + // native::GeodeTypeIds::CacheableInt32, UInt32::typeid); ////uint64 //Serializable::RegisterWrapperGeneric( // gcnew WrapperDelegateGeneric(CacheableInt64::Create), - // apache::geode::client::GeodeTypeIds::CacheableInt64, UInt64::typeid); + // native::GeodeTypeIds::CacheableInt64, UInt64::typeid); //======================================================================= //Now onwards all will be wrap in managed cacheable key.. Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableBytes, + native::GeodeTypeIds::CacheableBytes, gcnew TypeFactoryMethodGeneric(CacheableBytes::CreateDeserializable), Type::GetType("System.Byte[]")); /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableBytes, + native::GeodeTypeIds::CacheableBytes, gcnew TypeFactoryMethodGeneric(CacheableBytes::CreateDeserializable), Type::GetType("System.SByte[]"));*/ Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableDoubleArray, + native::GeodeTypeIds::CacheableDoubleArray, gcnew TypeFactoryMethodGeneric(CacheableDoubleArray::CreateDeserializable), Type::GetType("System.Double[]")); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableFloatArray, + native::GeodeTypeIds::CacheableFloatArray, gcnew TypeFactoryMethodGeneric(CacheableFloatArray::CreateDeserializable), Type::GetType("System.Single[]")); //TODO: //as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashSet, + native::GeodeTypeIds::CacheableHashSet, gcnew TypeFactoryMethodGeneric(CacheableHashSet::CreateDeserializable), nullptr); //as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableLinkedHashSet, + native::GeodeTypeIds::CacheableLinkedHashSet, gcnew TypeFactoryMethodGeneric(CacheableLinkedHashSet::CreateDeserializable), nullptr); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt16Array, + native::GeodeTypeIds::CacheableInt16Array, gcnew TypeFactoryMethodGeneric(CacheableInt16Array::CreateDeserializable), Type::GetType("System.Int16[]")); /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt16Array, + native::GeodeTypeIds::CacheableInt16Array, gcnew TypeFactoryMethodGeneric(CacheableInt16Array::CreateDeserializable), Type::GetType("System.UInt16[]"));*/ Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt32Array, + native::GeodeTypeIds::CacheableInt32Array, gcnew TypeFactoryMethodGeneric(CacheableInt32Array::CreateDeserializable), Type::GetType("System.Int32[]")); /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt32Array, + native::GeodeTypeIds::CacheableInt32Array, gcnew TypeFactoryMethodGeneric(CacheableInt32Array::CreateDeserializable), Type::GetType("System.UInt32[]"));*/ Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt64Array, + native::GeodeTypeIds::CacheableInt64Array, gcnew TypeFactoryMethodGeneric(CacheableInt64Array::CreateDeserializable), Type::GetType("System.Int64[]")); /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableInt64Array, + native::GeodeTypeIds::CacheableInt64Array, gcnew TypeFactoryMethodGeneric(CacheableInt64Array::CreateDeserializable), Type::GetType("System.UInt64[]"));*/ //TODO:;split Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::BooleanArray, + native::GeodeTypeIds::BooleanArray, gcnew TypeFactoryMethodGeneric(BooleanArray::CreateDeserializable), Type::GetType("System.Boolean[]")); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CharArray, + native::GeodeTypeIds::CharArray, gcnew TypeFactoryMethodGeneric(CharArray::CreateDeserializable), Type::GetType("System.Char[]")); //TODO:: //Serializable::RegisterTypeGeneric( - // apache::geode::client::GeodeTypeIds::CacheableNullString, + // native::GeodeTypeIds::CacheableNullString, // gcnew TypeFactoryMethodNew(Apache::Geode::Client::CacheableString::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableStringArray, + native::GeodeTypeIds::CacheableStringArray, gcnew TypeFactoryMethodGeneric(CacheableStringArray::CreateDeserializable), Type::GetType("System.String[]")); //as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::Struct, + native::GeodeTypeIds::Struct, gcnew TypeFactoryMethodGeneric(Struct::CreateDeserializable), nullptr); //as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::Properties, + native::GeodeTypeIds::Properties, gcnew TypeFactoryMethodGeneric(Properties<String^, String^>::CreateDeserializable), nullptr); /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::PdxType, + native::GeodeTypeIds::PdxType, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::Internal::PdxType::CreateDeserializable), nullptr);*/ Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::EnumInfo, + native::GeodeTypeIds::EnumInfo, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::Internal::EnumInfo::CreateDeserializable), nullptr); // End register generic wrapper types for built-in types - if (!apache::geode::client::DistributedSystem::isConnected()) + if (!native::DistributedSystem::isConnected()) { // Set the Generic ManagedAuthInitialize factory function - apache::geode::client::SystemProperties::managedAuthInitializeFn = - apache::geode::client::ManagedAuthInitializeGeneric::create; + native::SystemProperties::managedAuthInitializeFn = + native::ManagedAuthInitializeGeneric::create; // Set the Generic ManagedCacheLoader/Listener/Writer factory functions. - apache::geode::client::CacheXmlParser::managedCacheLoaderFn = - apache::geode::client::ManagedCacheLoaderGeneric::create; - apache::geode::client::CacheXmlParser::managedCacheListenerFn = - apache::geode::client::ManagedCacheListenerGeneric::create; - apache::geode::client::CacheXmlParser::managedCacheWriterFn = - apache::geode::client::ManagedCacheWriterGeneric::create; + native::CacheXmlParser::managedCacheLoaderFn = + native::ManagedCacheLoaderGeneric::create; + native::CacheXmlParser::managedCacheListenerFn = + native::ManagedCacheListenerGeneric::create; + native::CacheXmlParser::managedCacheWriterFn = + native::ManagedCacheWriterGeneric::create; // Set the Generic ManagedPartitionResolver factory function - apache::geode::client::CacheXmlParser::managedPartitionResolverFn = - apache::geode::client::ManagedFixedPartitionResolverGeneric::create; + native::CacheXmlParser::managedPartitionResolverFn = + native::ManagedFixedPartitionResolverGeneric::create; // Set the Generic ManagedPersistanceManager factory function - apache::geode::client::CacheXmlParser::managedPersistenceManagerFn = - apache::geode::client::ManagedPersistenceManagerGeneric::create; + native::CacheXmlParser::managedPersistenceManagerFn = + native::ManagedPersistenceManagerGeneric::create; } _GF_MG_EXCEPTION_CATCH_ALL2 @@ -615,36 +541,36 @@ namespace Apache // Register other built-in types /* Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableDate, + native::GeodeTypeIds::CacheableDate, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableDate::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableFileName, + native::GeodeTypeIds::CacheableFileName, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableFileName::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashMap, + native::GeodeTypeIds::CacheableHashMap, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableHashMap::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashTable, + native::GeodeTypeIds::CacheableHashTable, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableHashTable::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableIdentityHashMap, + native::GeodeTypeIds::CacheableIdentityHashMap, gcnew TypeFactoryMethodGeneric( Apache::Geode::Client::CacheableIdentityHashMap::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableUndefined, + native::GeodeTypeIds::CacheableUndefined, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableUndefined::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableVector, + native::GeodeTypeIds::CacheableVector, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableVector::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableObjectArray, + native::GeodeTypeIds::CacheableObjectArray, gcnew TypeFactoryMethodGeneric( Apache::Geode::Client::CacheableObjectArray::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableArrayList, + native::GeodeTypeIds::CacheableArrayList, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableArrayList::CreateDeserializable)); Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableStack, + native::GeodeTypeIds::CacheableStack, gcnew TypeFactoryMethodGeneric(Apache::Geode::Client::CacheableStack::CreateDeserializable)); Serializable::RegisterTypeGeneric( GeodeClassIds::CacheableManagedObject - 0x80000000, @@ -659,63 +585,63 @@ namespace Apache //c# datatime Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableDate, + native::GeodeTypeIds::CacheableDate, gcnew TypeFactoryMethodGeneric(CacheableDate::CreateDeserializable), Type::GetType("System.DateTime")); //as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableFileName, + native::GeodeTypeIds::CacheableFileName, gcnew TypeFactoryMethodGeneric(CacheableFileName::CreateDeserializable), nullptr); //for generic dictionary define its type in static constructor of Serializable.hpp Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashMap, + native::GeodeTypeIds::CacheableHashMap, gcnew TypeFactoryMethodGeneric(CacheableHashMap::CreateDeserializable), nullptr); //c# hashtable Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashTable, + native::GeodeTypeIds::CacheableHashTable, gcnew TypeFactoryMethodGeneric(CacheableHashTable::CreateDeserializable), Type::GetType("System.Collections.Hashtable")); //Need to keep public as no counterpart in c# Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableIdentityHashMap, + native::GeodeTypeIds::CacheableIdentityHashMap, gcnew TypeFactoryMethodGeneric( CacheableIdentityHashMap::CreateDeserializable), nullptr); //keep as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableUndefined, + native::GeodeTypeIds::CacheableUndefined, gcnew TypeFactoryMethodGeneric(CacheableUndefined::CreateDeserializable), nullptr); //c# arraylist Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableVector, + native::GeodeTypeIds::CacheableVector, gcnew TypeFactoryMethodGeneric(CacheableVector::CreateDeserializable), nullptr); //as it is Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableObjectArray, + native::GeodeTypeIds::CacheableObjectArray, gcnew TypeFactoryMethodGeneric( CacheableObjectArray::CreateDeserializable), nullptr); //Generic::List Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableArrayList, + native::GeodeTypeIds::CacheableArrayList, gcnew TypeFactoryMethodGeneric(CacheableArrayList::CreateDeserializable), nullptr); //c# generic stack Serializable::RegisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableStack, + native::GeodeTypeIds::CacheableStack, gcnew TypeFactoryMethodGeneric(CacheableStack::CreateDeserializable), nullptr); @@ -750,41 +676,41 @@ namespace Apache void DistributedSystem::AppDomainInstancePostInitialization() { //to create .net memory pressure handler - Create(apache::geode::client::DistributedSystem::getInstance().get()); + Create(native::DistributedSystem::getInstance()); } void DistributedSystem::UnregisterBuiltinManagedTypes() { _GF_MG_EXCEPTION_TRY2 - apache::geode::client::DistributedSystemImpl::acquireDisconnectLock(); + native::DistributedSystemImpl::acquireDisconnectLock(); Serializable::UnregisterNativesGeneric(); int remainingInstances = - apache::geode::client::DistributedSystemImpl::currentInstances(); + native::DistributedSystemImpl::currentInstances(); if (remainingInstances == 0) { // last instance Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableDate); + native::GeodeTypeIds::CacheableDate); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableFileName); + native::GeodeTypeIds::CacheableFileName); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashMap); + native::GeodeTypeIds::CacheableHashMap); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableHashTable); + native::GeodeTypeIds::CacheableHashTable); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableIdentityHashMap); + native::GeodeTypeIds::CacheableIdentityHashMap); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableVector); + native::GeodeTypeIds::CacheableVector); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableObjectArray); + native::GeodeTypeIds::CacheableObjectArray); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableArrayList); + native::GeodeTypeIds::CacheableArrayList); Serializable::UnregisterTypeGeneric( - apache::geode::client::GeodeTypeIds::CacheableStack); + native::GeodeTypeIds::CacheableStack); Serializable::UnregisterTypeGeneric( GeodeClassIds::CacheableManagedObject - 0x80000000); Serializable::UnregisterTypeGeneric( @@ -795,7 +721,7 @@ namespace Apache _GF_MG_EXCEPTION_CATCH_ALL2 finally { - apache::geode::client::DistributedSystemImpl::releaseDisconnectLock(); + native::DistributedSystemImpl::releaseDisconnectLock(); } } @@ -803,30 +729,32 @@ namespace Apache { _GF_MG_EXCEPTION_TRY2 - // TODO return Apache::Geode::Client::SystemProperties::Create( - apache::geode::client::DistributedSystem::getSystemProperties()); - - //return nullptr; + native::DistributedSystem::getSystemProperties()); _GF_MG_EXCEPTION_CATCH_ALL2 } String^ DistributedSystem::Name::get() { - return ManagedString::Get(NativePtr->getName()); + try + { + return ManagedString::Get(m_nativeptr->get()->getName()); + } + finally + { + GC::KeepAlive(m_nativeptr); + } } bool DistributedSystem::IsConnected::get() { - return apache::geode::client::DistributedSystem::isConnected(); + return native::DistributedSystem::isConnected(); } DistributedSystem^ DistributedSystem::GetInstance() { - apache::geode::client::DistributedSystemPtr& nativeptr( - apache::geode::client::DistributedSystem::getInstance()); - return Create(nativeptr.get()); + return Create(native::DistributedSystem::getInstance()); } void DistributedSystem::HandleMemoryPressure(System::Object^ state) @@ -836,25 +764,23 @@ namespace Apache handler.handle_timeout(dummy, nullptr); } - DistributedSystem^ DistributedSystem::Create( - apache::geode::client::DistributedSystem* nativeptr) + DistributedSystem^ DistributedSystem::Create(native::DistributedSystemPtr nativeptr) { if (m_instance == nullptr) { msclr::lock lockInstance(m_singletonSync); if (m_instance == nullptr) { - m_instance = (nativeptr != nullptr - ? gcnew DistributedSystem(nativeptr) : nullptr); + m_instance = __nullptr == nativeptr ? nullptr : + gcnew DistributedSystem(nativeptr); } } - DistributedSystem^ instance = (DistributedSystem^)m_instance; + auto instance = (DistributedSystem^)m_instance; return instance; } - DistributedSystem::DistributedSystem(apache::geode::client::DistributedSystem* nativeptr) - : SBWrap(nativeptr) + DistributedSystem::DistributedSystem(native::DistributedSystemPtr nativeptr) { - System::Threading::TimerCallback^ timerCallback = gcnew System:: - Threading::TimerCallback(&DistributedSystem::HandleMemoryPressure); + m_nativeptr = gcnew native_shared_ptr<native::DistributedSystem>(nativeptr); + auto timerCallback = gcnew System::Threading::TimerCallback(&DistributedSystem::HandleMemoryPressure); m_memoryPressureHandler = gcnew System::Threading::Timer( timerCallback, "MemoryPressureHandler", 3 * 60000, 3 * 60000); } @@ -866,42 +792,41 @@ namespace Apache void DistributedSystem::acquireDisconnectLock() { - apache::geode::client::DistributedSystemImpl::acquireDisconnectLock(); + native::DistributedSystemImpl::acquireDisconnectLock(); } void DistributedSystem::disconnectInstance() { - apache::geode::client::DistributedSystemImpl::disconnectInstance(); + native::DistributedSystemImpl::disconnectInstance(); } void DistributedSystem::releaseDisconnectLock() { - apache::geode::client::DistributedSystemImpl::releaseDisconnectLock(); + native::DistributedSystemImpl::releaseDisconnectLock(); } void DistributedSystem::connectInstance() { - apache::geode::client::DistributedSystemImpl::connectInstance(); + native::DistributedSystemImpl::connectInstance(); } void DistributedSystem::registerCliCallback() { m_cliCallBackObj = gcnew CliCallbackDelegate(); - cliCallback^ nativeCallback = + auto nativeCallback = gcnew cliCallback(m_cliCallBackObj, &CliCallbackDelegate::Callback); - apache::geode::client::DistributedSystemImpl::registerCliCallback(System::Threading::Thread::GetDomainID(), - (apache::geode::client::CliCallbackMethod)System::Runtime::InteropServices:: + native::DistributedSystemImpl::registerCliCallback(System::Threading::Thread::GetDomainID(), + (native::CliCallbackMethod)System::Runtime::InteropServices:: Marshal::GetFunctionPointerForDelegate( nativeCallback).ToPointer()); } void DistributedSystem::unregisterCliCallback() { - apache::geode::client::DistributedSystemImpl::unregisterCliCallback(System::Threading::Thread::GetDomainID()); - } // namespace Client - } // namespace Geode - } // namespace Apache - -} + native::DistributedSystemImpl::unregisterCliCallback(System::Threading::Thread::GetDomainID()); + } + } // namespace Client + } // namespace Geode +} // namespace Apache
http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/DistributedSystem.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/DistributedSystem.hpp b/src/clicache/src/DistributedSystem.hpp index af95be1..65e8be8 100644 --- a/src/clicache/src/DistributedSystem.hpp +++ b/src/clicache/src/DistributedSystem.hpp @@ -18,8 +18,11 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/DistributedSystem.hpp> -//#include "impl/NativeWrapper.hpp" +#include "end_native.hpp" + +#include "native_shared_ptr.hpp" #include "SystemProperties.hpp" #include "Properties.hpp" #include "impl/CliCallbackDelgate.hpp" @@ -33,6 +36,8 @@ namespace Apache namespace Client { + namespace native = apache::geode::client; + /// <summary> /// DistributedSystem encapsulates this applications "connection" into the /// Geode Java servers. @@ -43,7 +48,6 @@ namespace Apache /// DistributedSystem. /// </remarks> public ref class DistributedSystem sealed - : public Client::Internal::SBWrap<apache::geode::client::DistributedSystem> { public: @@ -130,7 +134,7 @@ namespace Apache /// <returns> /// The managed wrapper object; null if the native pointer is null. /// </returns> - static DistributedSystem^ Create(apache::geode::client::DistributedSystem* nativeptr); + static DistributedSystem^ Create(native::DistributedSystemPtr nativeptr); static void acquireDisconnectLock(); @@ -149,7 +153,7 @@ namespace Apache /// Stuff that needs to be done for Connect in each AppDomain. /// </summary> static void AppDomainInstanceInitialization( - const apache::geode::client::PropertiesPtr& nativepropsptr); + const native::PropertiesPtr& nativepropsptr); /// <summary> /// Managed registrations and other stuff to be done for the manage @@ -168,6 +172,11 @@ namespace Apache /// </summary> static void UnregisterBuiltinManagedTypes(); + std::shared_ptr<native::DistributedSystem> GetNative() + { + return m_nativeptr->get_shared_ptr(); + } + private: ///// <summary> @@ -180,13 +189,14 @@ namespace Apache /// Private constructor to wrap a native object pointer /// </summary> /// <param name="nativeptr">The native object pointer</param> - DistributedSystem(apache::geode::client::DistributedSystem* nativeptr); + DistributedSystem(native::DistributedSystemPtr nativeptr); /// <summary> /// Finalizer for the singleton instance of this class. /// </summary> ~DistributedSystem(); + native_shared_ptr<native::DistributedSystem>^ m_nativeptr; /// <summary> http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/EntryEvent.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/EntryEvent.cpp b/src/clicache/src/EntryEvent.cpp index 49869f5..51a0ef5 100644 --- a/src/clicache/src/EntryEvent.cpp +++ b/src/clicache/src/EntryEvent.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -//#include "geode_includes.hpp" #include "EntryEvent.hpp" #include "Region.hpp" #include "impl/SafeConvert.hpp" @@ -30,65 +29,46 @@ namespace Apache { generic<class TKey, class TValue> - EntryEvent<TKey, TValue>::EntryEvent(IRegion<TKey, TValue>^ region, - TKey key, TValue oldValue, - TValue newValue, Object^ aCallbackArgument, - bool remoteOrigin) - : UMWrap( ) - { - //TODO:: from where this gets called - /*apache::geode::client::RegionPtr regionptr( GetNativePtr<apache::geode::client::Region>( region ) ); - apache::geode::client::CacheableKeyPtr keyptr( SafeMKeyConvert( key ) ); - apache::geode::client::CacheablePtr oldptr( SafeMSerializableConvert( oldValue ) ); - apache::geode::client::CacheablePtr newptr( SafeMSerializableConvert( newValue ) ); - apache::geode::client::UserDataPtr callbackptr(SafeMSerializableConvert( - aCallbackArgument)); - - SetPtr(new apache::geode::client::EntryEvent(regionptr, keyptr, - oldptr, newptr, callbackptr, remoteOrigin), true);*/ - } - - generic<class TKey, class TValue> IRegion<TKey, TValue>^ EntryEvent<TKey, TValue>::Region::get( ) { - apache::geode::client::RegionPtr& regionptr( NativePtr->getRegion( ) ); - return Client::Region<TKey, TValue>::Create( regionptr.ptr( ) ); + apache::geode::client::RegionPtr regionptr = m_nativeptr->getRegion(); + return Client::Region<TKey, TValue>::Create( regionptr ); } generic<class TKey, class TValue> TKey EntryEvent<TKey, TValue>::Key::get( ) { - apache::geode::client::CacheableKeyPtr& keyptr( NativePtr->getKey( ) ); + apache::geode::client::CacheableKeyPtr& keyptr( m_nativeptr->getKey( ) ); return Serializable::GetManagedValueGeneric<TKey>( keyptr ); } generic<class TKey, class TValue> TValue EntryEvent<TKey, TValue>::OldValue::get( ) { - apache::geode::client::CacheablePtr& valptr( NativePtr->getOldValue( ) ); + apache::geode::client::CacheablePtr& valptr( m_nativeptr->getOldValue( ) ); return Serializable::GetManagedValueGeneric<TValue>( valptr ); } generic<class TKey, class TValue> TValue EntryEvent<TKey, TValue>::NewValue::get( ) { - apache::geode::client::CacheablePtr& valptr( NativePtr->getNewValue( ) ); + apache::geode::client::CacheablePtr& valptr( m_nativeptr->getNewValue( ) ); return Serializable::GetManagedValueGeneric<TValue>( valptr ); } generic<class TKey, class TValue> Object^ EntryEvent<TKey, TValue>::CallbackArgument::get() { - apache::geode::client::UserDataPtr& valptr(NativePtr->getCallbackArgument()); + apache::geode::client::UserDataPtr& valptr(m_nativeptr->getCallbackArgument()); return Serializable::GetManagedValueGeneric<Object^>( valptr ); } generic<class TKey, class TValue> - bool EntryEvent<TKey, TValue>::RemoteOrigin::get( ) + bool EntryEvent<TKey, TValue>::RemoteOrigin::get() { - return NativePtr->remoteOrigin( ); + return m_nativeptr->remoteOrigin(); + } } // namespace Client } // namespace Geode } // namespace Apache - } //namespace http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/EntryEvent.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/EntryEvent.hpp b/src/clicache/src/EntryEvent.hpp index 644fbbb..36008ea 100644 --- a/src/clicache/src/EntryEvent.hpp +++ b/src/clicache/src/EntryEvent.hpp @@ -18,10 +18,11 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/EntryEvent.hpp> -#include "impl/NativeWrapper.hpp" +#include "end_native.hpp" + #include "IRegion.hpp" -//#include "Region.hpp" using namespace System; @@ -31,8 +32,9 @@ namespace Apache { namespace Client { + namespace native = apache::geode::client; - interface class IGeodeSerializable; + interface class IGeodeSerializable; // ref class Region; //interface class ICacheableKey; @@ -42,18 +44,10 @@ namespace Apache /// </summary> generic<class TKey, class TValue> public ref class EntryEvent sealed - : public Internal::UMWrap<apache::geode::client::EntryEvent> { public: /// <summary> - /// Constructor to create an <c>EntryEvent</c> for the given region. - /// </summary> - EntryEvent(IRegion<TKey, TValue>^ region, TKey key, TValue oldValue, - TValue newValue, Object^ aCallbackArgument, - bool remoteOrigin ); - - /// <summary> /// Return the region this event occurred in. /// </summary> property IRegion<TKey, TValue>^ Region @@ -106,16 +100,22 @@ namespace Apache bool get( ); } - internal: + const native::EntryEvent* GetNative() + { + return m_nativeptr; + } /// <summary> /// Private constructor to wrap a native object pointer /// </summary> /// <param name="nativeptr">The native object pointer</param> - inline EntryEvent<TKey, TValue>( const apache::geode::client::EntryEvent* nativeptr ) - : Internal::UMWrap<apache::geode::client::EntryEvent>( - const_cast<apache::geode::client::EntryEvent*>( nativeptr ), false ) { } + inline EntryEvent<TKey, TValue>( const native::EntryEvent* nativeptr ) + : m_nativeptr( nativeptr ) + { + } + private: + const native::EntryEvent* m_nativeptr; }; } // namespace Client } // namespace Geode http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ExceptionTypes.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ExceptionTypes.cpp b/src/clicache/src/ExceptionTypes.cpp index 9388670..e8eeb0c 100644 --- a/src/clicache/src/ExceptionTypes.cpp +++ b/src/clicache/src/ExceptionTypes.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -//#include "geode_includes.hpp" #include "ExceptionTypes.hpp" #include <cstdlib> http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ExceptionTypes.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ExceptionTypes.hpp b/src/clicache/src/ExceptionTypes.hpp index 8f25654..491dfcb 100644 --- a/src/clicache/src/ExceptionTypes.hpp +++ b/src/clicache/src/ExceptionTypes.hpp @@ -18,7 +18,10 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/ExceptionTypes.hpp> +#include "end_native.hpp" + #include "impl/ManagedString.hpp" @@ -162,8 +165,8 @@ namespace Apache cause = GeodeException::GetNative(ex->InnerException); } ManagedString mg_exStr(MgSysExPrefix + ex->ToString()); - return apache::geode::client::ExceptionPtr(new apache::geode::client::Exception( - mg_exStr.CharPtr, NULL, false, cause)); + return std::make_shared<apache::geode::client::Exception>( + mg_exStr.CharPtr, __nullptr, false, cause); } } return nullptr; @@ -181,8 +184,8 @@ namespace Apache if (this->InnerException != nullptr) { cause = GeodeException::GetNative(this->InnerException); } - return apache::geode::client::ExceptionPtr(new apache::geode::client::Exception(mg_msg.CharPtr, - NULL, false, cause)); + return std::make_shared<apache::geode::client::Exception>(mg_msg.CharPtr, + __nullptr, false, cause); } /// <summary> @@ -355,8 +358,8 @@ namespace Apache if (this->InnerException != nullptr) { \ cause = GeodeException::GetNative(this->InnerException); \ } \ - return apache::geode::client::ExceptionPtr(new apache::geode::client::y(mg_msg.CharPtr, \ - NULL, false, cause)); \ + return std::make_shared<apache::geode::client::y>(mg_msg.CharPtr, \ + __nullptr, false, cause); \ } \ } http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/Execution.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/Execution.cpp b/src/clicache/src/Execution.cpp index 6037299..0a43e9b 100644 --- a/src/clicache/src/Execution.cpp +++ b/src/clicache/src/Execution.cpp @@ -18,7 +18,10 @@ //#include "geode_includes.hpp" #include "Execution.hpp" +#include "begin_native.hpp" #include <geode/Execution.hpp> +#include "end_native.hpp" + #include "ResultCollector.hpp" #include "impl/ManagedResultCollector.hpp" @@ -34,6 +37,7 @@ namespace Apache { namespace Client { + namespace native = apache::geode::client; generic<class TResult> generic<class TFilter> @@ -41,14 +45,21 @@ namespace Apache { if (routingObj != nullptr) { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - apache::geode::client::CacheableVectorPtr rsptr = apache::geode::client::CacheableVector::create(); + auto rsptr = native::CacheableVector::create(); for each(TFilter item in routingObj) { rsptr->push_back(Serializable::GetUnmanagedValueGeneric<TFilter>( item )); } - return Execution<TResult>::Create(NativePtr->withFilter(rsptr).get(), this->m_rc); + try + { + return Execution<TResult>::Create(m_nativeptr->get()->withFilter(rsptr), this->m_rc); + } + finally + { + GC::KeepAlive(m_nativeptr); + } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } else { @@ -61,9 +72,15 @@ namespace Apache Execution<TResult>^ Execution<TResult>::WithArgs( TArgs args ) { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - - apache::geode::client::CacheablePtr argsptr( Serializable::GetUnmanagedValueGeneric<TArgs>( args ) ); - return Execution<TResult>::Create(NativePtr->withArgs(argsptr).get(), this->m_rc); + try + { + auto argsptr = Serializable::GetUnmanagedValueGeneric<TArgs>( args ); + return Execution<TResult>::Create(m_nativeptr->get()->withArgs(argsptr), this->m_rc); + } + finally + { + GC::KeepAlive(m_nativeptr); + } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -71,15 +88,20 @@ namespace Apache Execution<TResult>^ Execution<TResult>::WithCollector(Client::IResultCollector<TResult>^ rc) { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - apache::geode::client::ResultCollectorPtr rcptr; + native::ResultCollectorPtr rcptr; if ( rc != nullptr ) { - ResultCollectorGeneric<TResult>^ rcg = gcnew ResultCollectorGeneric<TResult>(); - rcg->SetResultCollector(rc); - - rcptr = new apache::geode::client::ManagedResultCollectorGeneric( rcg ); - //((apache::geode::client::ManagedResultCollectorGeneric*)rcptr.get())->setptr(rcg); + auto rcg = gcnew ResultCollectorGeneric<TResult>(); + rcg->SetResultCollector(rc); + rcptr = std::shared_ptr<native::ManagedResultCollectorGeneric>(new native::ManagedResultCollectorGeneric(rcg)); + } + try + { + return Execution<TResult>::Create( m_nativeptr->get()->withCollector(rcptr), rc); + } + finally + { + GC::KeepAlive(m_nativeptr); } - return Execution<TResult>::Create( NativePtr->withCollector(rcptr).get(), rc); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -87,12 +109,19 @@ namespace Apache IResultCollector<TResult>^ Execution<TResult>::Execute(String^ func, UInt32 timeout) { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - ManagedString mg_function( func ); - apache::geode::client::ResultCollectorPtr rc = NativePtr->execute(mg_function.CharPtr, timeout); - if(m_rc == nullptr) - return gcnew ResultCollector<TResult>(rc.get()); - else - return m_rc; + try + { + ManagedString mg_function(func); + auto rc = m_nativeptr->get()->execute(mg_function.CharPtr, timeout); + if (m_rc == nullptr) + return gcnew ResultCollector<TResult>(rc); + else + return m_rc; + } + finally + { + GC::KeepAlive(m_nativeptr); + } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -100,8 +129,7 @@ namespace Apache IResultCollector<TResult>^ Execution<TResult>::Execute(String^ func) { return Execute(func, DEFAULT_QUERY_RESPONSE_TIMEOUT); + } } // namespace Client } // namespace Geode } // namespace Apache - -} //namespace http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/Execution.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/Execution.hpp b/src/clicache/src/Execution.hpp index f45a5db..44fcf44 100644 --- a/src/clicache/src/Execution.hpp +++ b/src/clicache/src/Execution.hpp @@ -18,9 +18,11 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/Execution.hpp> -#include "impl/NativeWrapper.hpp" -//#include "impl/ResultCollectorProxy.hpp" +#include "end_native.hpp" + +#include "native_shared_ptr.hpp" using namespace System; @@ -30,6 +32,7 @@ namespace Apache { namespace Client { + namespace native = apache::geode::client; generic<class TResult> interface class IResultCollector; @@ -42,7 +45,6 @@ namespace Apache /// </summary> generic<class TResult> public ref class Execution sealed - : public Internal::SBWrap<apache::geode::client::Execution> { public: /// <summary> @@ -88,20 +90,25 @@ namespace Apache /// <returns> /// The managed wrapper object; null if the native pointer is null. /// </returns> - inline static Execution<TResult>^ Create( apache::geode::client::Execution* nativeptr, IResultCollector<TResult>^ rc ) + inline static Execution<TResult>^ Create( native::ExecutionPtr nativeptr, IResultCollector<TResult>^ rc ) { - return ( nativeptr != nullptr ? - gcnew Execution<TResult>( nativeptr, rc ) : nullptr ); - } + return __nullptr == nativeptr ? nullptr : + gcnew Execution<TResult>( nativeptr, rc ); + } /// <summary> /// Private constructor to wrap a native object pointer. /// </summary> /// <param name="nativeptr">The native object pointer</param> - inline Execution( apache::geode::client::Execution* nativeptr, IResultCollector<TResult>^ rc ) - : SBWrap( nativeptr ) { m_rc = rc;} + inline Execution( native::ExecutionPtr nativeptr, IResultCollector<TResult>^ rc ) + { + m_rc = rc; + m_nativeptr = gcnew native_shared_ptr<native::Execution>(nativeptr); + } private: IResultCollector<TResult>^ m_rc; + + native_shared_ptr<native::Execution>^ m_nativeptr; }; } // namespace Client } // namespace Geode http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ExpirationAction.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ExpirationAction.hpp b/src/clicache/src/ExpirationAction.hpp index 25c0564..c8a12bf 100644 --- a/src/clicache/src/ExpirationAction.hpp +++ b/src/clicache/src/ExpirationAction.hpp @@ -20,7 +20,10 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/ExpirationAction.hpp> +#include "end_native.hpp" + using namespace System; http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/FunctionService.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/FunctionService.cpp b/src/clicache/src/FunctionService.cpp index 4f3a3ed..456f2e5 100644 --- a/src/clicache/src/FunctionService.cpp +++ b/src/clicache/src/FunctionService.cpp @@ -15,14 +15,17 @@ * limitations under the License. */ -//#include "geode_includes.hpp" +#include "begin_native.hpp" +#include <geode/RegionService.hpp> +#include "end_native.hpp" + #include "FunctionService.hpp" #include "Pool.hpp" #include "Region.hpp" #include "Execution.hpp" -#include <geode/RegionService.hpp> + #include "impl/AuthenticatedCache.hpp" -#include "impl/SafeConvert.hpp" + using namespace System; namespace Apache @@ -31,6 +34,7 @@ namespace Apache { namespace Client { + namespace native = apache::geode::client; generic <class TResult> generic <class TKey, class TValue> @@ -38,40 +42,31 @@ namespace Apache { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - IRegion<TKey, TValue>^ regImpl = safe_cast<IRegion<TKey, TValue>^>( rg); - - apache::geode::client::RegionPtr regionptr(GetNativePtrFromSBWrapGeneric((Client::Region<TKey, TValue>^)regImpl)); - - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onRegion( - regionptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ), nullptr ); + auto nativeRegion = ((Region<TKey, TValue>^)rg)->GetNative(); + auto execution = native::FunctionService::onRegion(nativeRegion); + return Execution<TResult>::Create( execution, nullptr ); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } generic <class TResult> - Execution<TResult>^ FunctionService<TResult>::OnServer( Pool/*<TKey, TValue>*/^ pl ) + Execution<TResult>^ FunctionService<TResult>::OnServer( Pool^ pl ) { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - apache::geode::client::PoolPtr poolptr(GetNativePtrFromSBWrapGeneric<apache::geode::client::Pool>( pl ) ); - - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onServer( - poolptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ) , nullptr); + auto nativeptr = native::FunctionService::onServer(pl->GetNative()); + return Execution<TResult>::Create( nativeptr , nullptr); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } generic <class TResult> - Execution<TResult>^ FunctionService<TResult>::OnServers( Pool/*<TKey, TValue>*/^ pl ) + Execution<TResult>^ FunctionService<TResult>::OnServers( Pool^ pl ) { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - apache::geode::client::PoolPtr poolptr(GetNativePtrFromSBWrapGeneric<apache::geode::client::Pool>( pl ) ); - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onServers( - poolptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ) , nullptr); + auto nativeptr = native::FunctionService::onServers(pl->GetNative()); + return Execution<TResult>::Create( nativeptr , nullptr); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -81,28 +76,17 @@ namespace Apache { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - Apache::Geode::Client::Cache^ realCache = - dynamic_cast<Apache::Geode::Client::Cache^>(cache); - - if(realCache != nullptr) - { - apache::geode::client::RegionServicePtr cacheptr(GetNativePtr<apache::geode::client::RegionService>( realCache ) ); - - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onServer( - cacheptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ), nullptr ); - } - else - { - Apache::Geode::Client::AuthenticatedCache^ authCache = - dynamic_cast<Apache::Geode::Client::AuthenticatedCache^>(cache); - apache::geode::client::RegionServicePtr cacheptr(GetNativePtr<apache::geode::client::RegionService>( authCache ) ); - - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onServer( - cacheptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ), nullptr ); - } - + if(auto realCache = dynamic_cast<Cache^>(cache)) + { + auto nativeptr = native::FunctionService::onServer(realCache->GetNative()); + return Execution<TResult>::Create( nativeptr, nullptr ); + } + else + { + auto authCache = dynamic_cast<AuthenticatedCache^>(cache); + auto nativeptr = native::FunctionService::onServer(authCache->GetNative()); + return Execution<TResult>::Create( nativeptr, nullptr ); + } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -112,31 +96,20 @@ namespace Apache { _GF_MG_EXCEPTION_TRY2/* due to auto replace */ - Apache::Geode::Client::Cache^ realCache = - dynamic_cast<Apache::Geode::Client::Cache^>(cache); - - if(realCache != nullptr) + if(auto realCache = dynamic_cast<Cache^>(cache)) { - apache::geode::client::RegionServicePtr cacheptr(GetNativePtr<apache::geode::client::RegionService>( realCache ) ); - - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onServers( - cacheptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ), nullptr ); + auto nativeptr = native::FunctionService::onServers(realCache->GetNative()); + return Execution<TResult>::Create( nativeptr, nullptr ); } else { - Apache::Geode::Client::AuthenticatedCache^ authCache = - dynamic_cast<Apache::Geode::Client::AuthenticatedCache^>(cache); - apache::geode::client::RegionServicePtr cacheptr(GetNativePtr<apache::geode::client::RegionService>( authCache ) ); - - apache::geode::client::ExecutionPtr& nativeptr( apache::geode::client::FunctionService::onServers( - cacheptr ) ); - return Execution<TResult>::Create( nativeptr.ptr( ) , nullptr); + auto authCache = dynamic_cast<AuthenticatedCache^>(cache); + auto nativeptr = native::FunctionService::onServers(authCache->GetNative()); + return Execution<TResult>::Create( nativeptr, nullptr ); } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ + } } // namespace Client } // namespace Geode } // namespace Apache - - } //namespace http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/FunctionService.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/FunctionService.hpp b/src/clicache/src/FunctionService.hpp index 923a625..7af9bc8 100644 --- a/src/clicache/src/FunctionService.hpp +++ b/src/clicache/src/FunctionService.hpp @@ -18,10 +18,11 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/FunctionService.hpp> -#include "Cache.hpp" -//#include "impl/NativeWrapper.hpp" +#include "end_native.hpp" +#include "Cache.hpp" using namespace System; @@ -43,8 +44,7 @@ namespace Apache /// </summary> /// <remarks> generic<class TResult> - public ref class FunctionService - : public Internal::SBWrap<apache::geode::client::FunctionService> + public ref class FunctionService { public: @@ -63,8 +63,7 @@ namespace Apache /// <remarks> /// </remarks> /// <exception cref="UnsupportedOperationException">unsupported operation exception, when Pool is in multiusersecure mode.</exception> - //generic<class TKey, class TValue> - static Execution<TResult>^ OnServer( Pool/*<TKey, TValue>*/^ pl ); + static Execution<TResult>^ OnServer( Pool^ pl ); /// <summary> /// Creates a new Execution object on all servers in the pool @@ -72,8 +71,7 @@ namespace Apache /// <remarks> /// </remarks> /// <exception cref="UnsupportedOperationException">unsupported operation exception, when Pool is in multiusersecure mode.</exception> - //generic<class TKey, class TValue> - static Execution<TResult>^ OnServers( Pool/*<TKey, TValue>*/^ pl ); + static Execution<TResult>^ OnServers( Pool^ pl ); /// <summary> /// Creates a new Execution object on one server. @@ -81,7 +79,6 @@ namespace Apache /// <remarks> /// </remarks> /// <exception cref="IllegalStateException">when Pool has been closed.</exception> - //generic<class TResult> static Execution<TResult>^ OnServer( IRegionService^ cache ); /// <summary> @@ -90,18 +87,8 @@ namespace Apache /// <remarks> /// </remarks> /// <exception cref="IllegalStateException">when Pool has been closed.</exception> - //generic<class TResult> static Execution<TResult>^ OnServers( IRegionService^ cache ); - internal: - - /// <summary> - /// Private constructor to wrap a native object pointer - /// </summary> - /// <param name="nativeptr">The native object pointer</param> - inline FunctionService( apache::geode::client::FunctionService* nativeptr ) - : SBWrap( nativeptr ) { } - }; } // namespace Client } // namespace Geode http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/GeodeClassIds.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/GeodeClassIds.hpp b/src/clicache/src/GeodeClassIds.hpp index 0ab567a..9d6eebd 100644 --- a/src/clicache/src/GeodeClassIds.hpp +++ b/src/clicache/src/GeodeClassIds.hpp @@ -20,7 +20,10 @@ #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/GeodeTypeIds.hpp> +#include "end_native.hpp" + namespace Apache http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ICacheLoader.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ICacheLoader.hpp b/src/clicache/src/ICacheLoader.hpp index 76b2f19..e5b1a8e 100644 --- a/src/clicache/src/ICacheLoader.hpp +++ b/src/clicache/src/ICacheLoader.hpp @@ -18,7 +18,10 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/CacheLoader.hpp> +#include "end_native.hpp" + #include "IRegion.hpp" //#include "Region.hpp" //#include "ICacheableKey.hpp" http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ICacheableKey.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ICacheableKey.hpp b/src/clicache/src/ICacheableKey.hpp index 1578207..3ca9514 100644 --- a/src/clicache/src/ICacheableKey.hpp +++ b/src/clicache/src/ICacheableKey.hpp @@ -20,7 +20,6 @@ #include "geode_defs.hpp" #include "IGeodeSerializable.hpp" - using namespace System; namespace Apache http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ICqResults.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ICqResults.hpp b/src/clicache/src/ICqResults.hpp index b0d5970..f8d737f 100644 --- a/src/clicache/src/ICqResults.hpp +++ b/src/clicache/src/ICqResults.hpp @@ -18,8 +18,11 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/SelectResults.hpp> -//#include "impl/NativeWrapper.hpp" +#include "end_native.hpp" + + #include "ISelectResults.hpp" http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/IGeodeSerializable.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/IGeodeSerializable.hpp b/src/clicache/src/IGeodeSerializable.hpp index 311601b..c21946f 100644 --- a/src/clicache/src/IGeodeSerializable.hpp +++ b/src/clicache/src/IGeodeSerializable.hpp @@ -18,7 +18,9 @@ #pragma once #include "geode_defs.hpp" -#include "geode/geode_types.hpp" +#include "begin_native.hpp" +#include <geode/geode_types.hpp> +#include "end_native.hpp" using namespace System; http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/IRegion.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/IRegion.hpp b/src/clicache/src/IRegion.hpp index 8c17d2f..cbbf2eb 100644 --- a/src/clicache/src/IRegion.hpp +++ b/src/clicache/src/IRegion.hpp @@ -19,7 +19,10 @@ #include "geode_defs.hpp" #include "ISubscriptionService.hpp" +#include "begin_native.hpp" #include <geode/DataOutput.hpp> +#include "end_native.hpp" + //#include "ExceptionTypes.hpp" using namespace System; http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ISelectResults.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ISelectResults.hpp b/src/clicache/src/ISelectResults.hpp index e53e17c..68feff8 100644 --- a/src/clicache/src/ISelectResults.hpp +++ b/src/clicache/src/ISelectResults.hpp @@ -18,8 +18,11 @@ #pragma once #include "geode_defs.hpp" +#include "begin_native.hpp" #include <geode/SelectResults.hpp> -//#include "impl/NativeWrapper.hpp" +#include "end_native.hpp" + + #include "IGeodeSerializable.hpp" using namespace System; http://git-wip-us.apache.org/repos/asf/geode-native/blob/6027574a/src/clicache/src/ISubscriptionService.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ISubscriptionService.hpp b/src/clicache/src/ISubscriptionService.hpp index ec1d041..1c91efd 100644 --- a/src/clicache/src/ISubscriptionService.hpp +++ b/src/clicache/src/ISubscriptionService.hpp @@ -18,7 +18,8 @@ #pragma once #include "geode_defs.hpp" -//#include "ExceptionTypes.hpp" +#include "ExceptionTypes.hpp" + using namespace System; namespace Apache {
