geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [20/51] [partial] incubator-geode git commit: Add source for geode c++ and .net clients
Date Thu, 19 May 2016 15:14:27 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CMakeLists.txt b/geode-client-native/src/clicache/CMakeLists.txt
new file mode 100644
index 0000000..ac2d2ae
--- /dev/null
+++ b/geode-client-native/src/clicache/CMakeLists.txt
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 3.4)
+project(clicache)
+
+file(GLOB_RECURSE SOURCES "*.cpp")
+
+#set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} Dbghelp)
+add_library(gfclicache SHARED ${SOURCES})
+
+#TODO get external project library names
+target_link_libraries(gfclicache
+  PUBLIC
+  PRIVATE
+    gfcppcache-static
+    psapi
+    ${ACE_STATIC_LIB}
+    ${libxml2_STATIC_LIB}
+)
+
+add_dependencies(gfclicache libxml2 ACE)
+
+#TODO cmake DEBUG add_definitions(-DACE_NLOGGING -DACE_NDEBUG )
+#TODO move to config.h when not building shared ace
+add_definitions(-D__ACE_INLINE__)
+add_definitions(-DACE_AS_STATIC_LIBS)
+
+string(REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /clr /wd4947 /doc")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /keyfile:${CMAKE_SOURCE_DIR}/../release/keys/gemfire.snk")
+
+set_target_properties(gfclicache PROPERTIES
+  OUTPUT_NAME Gemstone.Gemfire.Cache
+  VS_DOTNET_TARGET_FRAMEWORK_VERSION "v4.5.1"
+  VS_DOTNET_REFERENCES "System;System.Xml")
+
+#TODO move cppcache headers?
+include_directories(${CMAKE_BINARY_DIR}/cppcache)
+include_directories(${CMAKE_SOURCE_DIR})
+include_directories(${CMAKE_SOURCE_DIR}/cppcache)
+include_directories(${DEPENDENCIES_ACE_DIR}/include)
+include_directories(${DEPENDENCIES_libxml2_DIR}/include/libxml2)
+
+add_subdirectory(templates)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheAttributesFactoryM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheAttributesFactoryM.cpp b/geode-client-native/src/clicache/CacheAttributesFactoryM.cpp
new file mode 100644
index 0000000..69041a8
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheAttributesFactoryM.cpp
@@ -0,0 +1,49 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#include "gf_includes.hpp"
+#include "CacheAttributesFactoryM.hpp"
+#include "CacheAttributesM.hpp"
+#include "ExceptionTypesM.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      void CacheAttributesFactory::SetRedundancyLevel( int32_t redundancyLevel )
+      {
+        NativePtr->setRedundancyLevel( redundancyLevel );
+      }
+
+      void CacheAttributesFactory::SetEndpoints( String^ endpoints )
+      {
+        ManagedString mg_endpoints( endpoints );
+        NativePtr->setEndpoints( mg_endpoints.CharPtr );
+      }
+
+      CacheAttributes^ CacheAttributesFactory::CreateCacheAttributes( )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::CacheAttributesPtr& nativeptr =
+            NativePtr->createCacheAttributes();
+
+          return CacheAttributes::Create(nativeptr.ptr());
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheAttributesFactoryM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheAttributesFactoryM.hpp b/geode-client-native/src/clicache/CacheAttributesFactoryM.hpp
new file mode 100644
index 0000000..b620caf
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheAttributesFactoryM.hpp
@@ -0,0 +1,74 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "cppcache/CacheAttributesFactory.hpp"
+#include "impl/NativeWrapper.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      ref class CacheAttributes;
+
+      /// <summary>
+      /// Creates instances of <c>CacheAttributes</c>.
+      /// </summary>
+      /// <seealso cref="CacheAttributes" />
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheAttributesFactory sealed
+        : public Internal::UMWrap<gemfire::CacheAttributesFactory>
+      {
+      public:
+
+        /// <summary>
+        /// Creates a new instance of <c>CacheAttributesFactory</c> ready
+        /// to create a <c>CacheAttributes</c> with default settings.
+        /// </summary>
+        inline CacheAttributesFactory( )
+          : UMWrap( new gemfire::CacheAttributesFactory( ), true )
+        { }
+
+        // ATTRIBUTES
+
+        /// <summary>
+        /// Sets redundancy level to use for regions in the cache.
+        /// </summary>
+        [Obsolete("This method is obsolete since 3.5; use PoolFactory.SetSubscriptionRedundancy instead.")]
+        void SetRedundancyLevel( int32_t redundancyLevel );
+
+        /// <summary>
+        /// Sets endpoints list to be used at the cache-level.
+        /// </summary>
+        [Obsolete("This method is obsolete since 3.5; use PoolFactory.AddServer or PoolFactory.AddLocator instead.")]
+        void SetEndpoints( String^ endpoints );
+
+        // FACTORY METHOD
+
+        /// <summary>
+        /// Creates a <c>CacheAttributes</c> with the current settings.
+        /// </summary>
+        /// <returns>The newly created <c>CacheAttributes</c></returns>
+        /// <exception cref="IllegalStateException">
+        /// if the current settings violate the <a href="compability.html">
+        /// compatibility</a> rules.
+        /// </exception>
+        CacheAttributes^ CreateCacheAttributes( );
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheAttributesM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheAttributesM.cpp b/geode-client-native/src/clicache/CacheAttributesM.cpp
new file mode 100644
index 0000000..64b6e38
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheAttributesM.cpp
@@ -0,0 +1,34 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#include "gf_includes.hpp"
+#include "CacheAttributesM.hpp"
+#include "impl/ManagedString.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      int32_t CacheAttributes::RedundancyLevel::get( )
+      {
+        return NativePtr->getRedundancyLevel( );
+      }
+
+      String^ CacheAttributes::Endpoints::get( )
+      {
+        return ManagedString::Get( NativePtr->getEndpoints( ) );
+      }
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheAttributesM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheAttributesM.hpp b/geode-client-native/src/clicache/CacheAttributesM.hpp
new file mode 100644
index 0000000..171b679
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheAttributesM.hpp
@@ -0,0 +1,95 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "cppcache/CacheAttributes.hpp"
+#include "impl/NativeWrapper.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      /// <summary>
+      /// Defines attributes for configuring a cache.
+      /// </summary>
+      /// <remarks>
+      /// Currently the following attributes are defined:
+      /// <c>redundancyLevel</c>: Redundancy for HA client queues.
+      /// <c>endpoints</c>: Cache level endpoints list.
+      /// To create an instance of this interface, use
+      /// <see cref="CacheAttributesFactory.CreateCacheAttributes" />.
+      ///
+      /// For compatibility rules and default values, see
+      /// <see cref="CacheAttributesFactory" />.
+      ///
+      /// Note that the <c>CacheAttributes</c> are not distributed with
+      /// the region.
+      /// </remarks>
+      /// <seealso cref="CacheAttributesFactory" />
+        [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheAttributes sealed
+        : public Internal::SBWrap<gemfire::CacheAttributes>
+      {
+      public:
+
+        /// <summary>
+        /// Gets redundancy level for regions in the cache.
+        /// </summary>
+        property int32_t RedundancyLevel
+        {
+          int32_t get( );
+        }
+
+        /// <summary>
+        /// Gets cache level endpoints list.
+        /// </summary>
+        property String^ Endpoints
+        {
+          String^ get( );
+        }
+
+
+      internal:
+
+        /// <summary>
+        /// Internal factory function to wrap a native object pointer inside
+        /// this managed class with null pointer check.
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        /// <returns>
+        /// The managed wrapper object; null if the native pointer is null.
+        /// </returns>
+        inline static CacheAttributes^ Create(
+          gemfire::CacheAttributes* nativeptr )
+        {
+          return ( nativeptr != nullptr ?
+            gcnew CacheAttributes( nativeptr ) : nullptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CacheAttributes( gemfire::CacheAttributes* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheFactoryM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheFactoryM.cpp b/geode-client-native/src/clicache/CacheFactoryM.cpp
new file mode 100644
index 0000000..854c1c8
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheFactoryM.cpp
@@ -0,0 +1,410 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#include "gf_includes.hpp"
+#include "CacheFactoryM.hpp"
+#include "CacheM.hpp"
+#include "CacheAttributesM.hpp"
+#include "DistributedSystemM.hpp"
+#include "SystemPropertiesM.hpp"
+//#pragma warning(disable:4091)
+//#include <msclr/lock.h>
+//#pragma warning(disable:4091)
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+      CacheFactory^ CacheFactory::CreateCacheFactory()
+      {
+        return CacheFactory::CreateCacheFactory(Properties::Create());
+      }
+
+      CacheFactory^ CacheFactory::CreateCacheFactory(Properties^ dsProps)
+      {
+        _GF_MG_EXCEPTION_TRY
+
+           gemfire::PropertiesPtr nativepropsptr(
+            GetNativePtr<gemfire::Properties>(dsProps));
+
+          gemfire::CacheFactoryPtr& nativeptr( gemfire::CacheFactory::createCacheFactory( nativepropsptr) );         
+          if (nativeptr.ptr() != nullptr)
+            return gcnew CacheFactory( nativeptr.ptr(), dsProps );
+          return nullptr;
+
+        _GF_MG_EXCEPTION_CATCH_ALL        
+      }
+
+      Cache^ CacheFactory::Create()
+      {
+        _GF_MG_EXCEPTION_TRY
+          //msclr::lock lockInstance(m_singletonSync);
+          DistributedSystem::acquireDisconnectLock();
+    
+          if(!m_connected)
+          {
+             gemfire::PropertiesPtr nativepropsptr(
+               GetNativePtr<gemfire::Properties>(m_dsProps));
+            DistributedSystem::AppDomainInstanceInitialization(nativepropsptr);      
+          }
+
+          gemfire::CachePtr& nativeptr( NativePtr->create( ) );
+
+          bool appDomainEnable = DistributedSystem::SystemProperties->AppDomainEnabled;
+          SafeConvertClass::SetAppDomainEnabled(appDomainEnable);
+
+           if(!m_connected)
+           {
+             //it registers types in unmanage layer, so should be once only 
+             DistributedSystem::ManagedPostConnect();
+             DistributedSystem::AppDomainInstancePostInitialization();
+             DistributedSystem::connectInstance();
+           }
+          
+           m_connected = true;
+           
+           return Cache::Create( nativeptr.ptr( ) );
+        _GF_MG_EXCEPTION_CATCH_ALL
+          finally {
+          DistributedSystem::releaseDisconnectLock();
+        }
+      }
+
+      Cache^ CacheFactory::Create( String^ name, DistributedSystem^ system )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_name( name );
+          gemfire::DistributedSystemPtr systemptr(
+            GetNativePtr<gemfire::DistributedSystem>( system ) );
+
+          gemfire::CachePtr& nativeptr( gemfire::CacheFactory::create(
+            mg_name.CharPtr, systemptr ) );
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Cache^ CacheFactory::Create( String^ name, DistributedSystem^ system,
+        String^ cacheXml )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_name( name );
+          gemfire::DistributedSystemPtr systemptr(
+            GetNativePtr<gemfire::DistributedSystem>( system ) );
+          ManagedString mg_cacheXml( cacheXml );
+
+          gemfire::CachePtr& nativeptr( gemfire::CacheFactory::create(
+            mg_name.CharPtr, systemptr, mg_cacheXml.CharPtr ) );
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Cache^ CacheFactory::Create( String^ name, DistributedSystem^ system,
+        CacheAttributes^ attributes )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_name( name );
+          gemfire::DistributedSystemPtr systemptr(
+            GetNativePtr<gemfire::DistributedSystem>( system ) );
+          gemfire::CacheAttributesPtr attrsPtr(
+            GetNativePtr<gemfire::CacheAttributes>(attributes));
+
+          gemfire::CachePtr& nativeptr( gemfire::CacheFactory::create(
+            mg_name.CharPtr, systemptr, attrsPtr ) );
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Cache^ CacheFactory::Create( String^ name, DistributedSystem^ system,
+        String^ cacheXml, CacheAttributes^ attributes )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_name( name );
+          gemfire::DistributedSystemPtr systemptr(
+            GetNativePtr<gemfire::DistributedSystem>( system ) );
+          ManagedString mg_cacheXml( cacheXml );
+          gemfire::CacheAttributesPtr attrsPtr(
+            GetNativePtr<gemfire::CacheAttributes>(attributes));
+
+          gemfire::CachePtr& nativeptr( gemfire::CacheFactory::create(
+            mg_name.CharPtr, systemptr, mg_cacheXml.CharPtr, attrsPtr ) );
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Cache^ CacheFactory::GetInstance( DistributedSystem^ system )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::DistributedSystemPtr p_system(
+            GetNativePtr<gemfire::DistributedSystem>( system ) );
+          gemfire::CachePtr& nativeptr(
+            gemfire::CacheFactory::getInstance( p_system ) );
+
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Cache^ CacheFactory::GetInstanceCloseOk( DistributedSystem^ system )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::DistributedSystemPtr p_system(
+            GetNativePtr<gemfire::DistributedSystem>( system ) );
+          gemfire::CachePtr& nativeptr(
+            gemfire::CacheFactory::getInstanceCloseOk( p_system ) );
+
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Cache^ CacheFactory::GetAnyInstance( )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::CachePtr& nativeptr(
+            gemfire::CacheFactory::getAnyInstance( ) );
+          return Cache::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      String^ CacheFactory::Version::get( )
+      {
+        return ManagedString::Get( gemfire::CacheFactory::getVersion( ) );
+      }
+
+      String^ CacheFactory::ProductDescription::get( )
+      {
+        return ManagedString::Get(
+          gemfire::CacheFactory::getProductDescription( ) );
+      }
+
+
+      CacheFactory^ CacheFactory::SetFreeConnectionTimeout( Int32 connectionTimeout )
+		  {
+			  _GF_MG_EXCEPTION_TRY
+
+			  NativePtr->setFreeConnectionTimeout( connectionTimeout );
+
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetLoadConditioningInterval( Int32 loadConditioningInterval )
+		  {
+			  _GF_MG_EXCEPTION_TRY
+
+			  NativePtr->setLoadConditioningInterval( loadConditioningInterval );
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetSocketBufferSize( Int32 bufferSize )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setSocketBufferSize( bufferSize );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetReadTimeout( Int32 timeout )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setReadTimeout( timeout );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetMinConnections( Int32 minConnections )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setMinConnections( minConnections );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetMaxConnections( Int32 maxConnections )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setMaxConnections( maxConnections );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetIdleTimeout( Int32 idleTimeout )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setIdleTimeout( idleTimeout );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetRetryAttempts( Int32 retryAttempts )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+			  NativePtr->setRetryAttempts( retryAttempts );
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetPingInterval( Int32 pingInterval )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setPingInterval( pingInterval );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+      CacheFactory^ CacheFactory::SetStatisticInterval( Int32 statisticInterval )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setStatisticInterval( statisticInterval );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+      CacheFactory^ CacheFactory::SetServerGroup( String^ group )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+        ManagedString mg_servergroup( group );
+        NativePtr->setServerGroup( mg_servergroup.CharPtr );
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::AddLocator( String^ host, Int32 port )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+        ManagedString mg_host( host );
+        NativePtr->addLocator( mg_host.CharPtr, port );
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+      CacheFactory^ CacheFactory::AddServer( String^ host, Int32 port )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+			  ManagedString mg_host( host );
+        NativePtr->addServer( mg_host.CharPtr, port );
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetSubscriptionEnabled( Boolean enabled )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+			  NativePtr->setSubscriptionEnabled( enabled );
+        return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+      CacheFactory^ CacheFactory::SetPRSingleHopEnabled( Boolean enabled )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setPRSingleHopEnabled(enabled);
+          return this;
+
+         _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+		  CacheFactory^ CacheFactory::SetSubscriptionRedundancy( Int32 redundancy )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setSubscriptionRedundancy( redundancy );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetSubscriptionMessageTrackingTimeout( Int32 messageTrackingTimeout )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setSubscriptionMessageTrackingTimeout( messageTrackingTimeout );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+		  CacheFactory^ CacheFactory::SetSubscriptionAckInterval( Int32 ackInterval )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setSubscriptionAckInterval( ackInterval );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+		  }
+
+      CacheFactory^ CacheFactory::SetMultiuserAuthentication( bool multiuserAuthentication )
+      {
+			  _GF_MG_EXCEPTION_TRY
+
+          NativePtr->setMultiuserAuthentication( multiuserAuthentication );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+	   }
+
+      CacheFactory^ CacheFactory::Set(String^ name, String^ value)
+      {
+        _GF_MG_EXCEPTION_TRY
+          ManagedString mg_name( name );
+          ManagedString mg_value( value );
+          NativePtr->set( mg_name.CharPtr, mg_value.CharPtr );
+          return this;
+
+			  _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheFactoryM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheFactoryM.hpp b/geode-client-native/src/clicache/CacheFactoryM.hpp
new file mode 100644
index 0000000..3307072
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheFactoryM.hpp
@@ -0,0 +1,658 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "cppcache/CacheFactory.hpp"
+#include "PropertiesM.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      ref class Cache;
+      ref class CacheAttributes;
+      ref class DistributedSystem;
+
+      /// <summary>
+      /// A factory class that must be used to obtain instance of <see cref="Cache" />.
+      /// </summary>
+      /// <remarks>
+      /// To create a new cache instance, use <see cref="CacheFactory.CreateCacheFactory" />.
+      /// <para>
+      /// To get an existing unclosed cache instance, use <see cref="CacheFactory.GetInstance" />.
+      /// </para>
+      /// </remarks>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheFactory :public Internal::SBWrap<gemfire::CacheFactory>
+      {
+      public:
+
+        /// <summary>
+        /// A factory class that must be used to obtain instance of <see cref="Cache" />.
+        /// This should be called once. Using this one can set default values of <see cref="Pool" />.
+        /// </summary>
+        /// <param name="dsProps">Properties which are applicable at client level.</param>
+        static CacheFactory^ CreateCacheFactory(Properties^ dsProps);
+
+        /// <summary>
+        /// A factory class that must be used to obtain instance of <see cref="Cache" />.
+        /// This should be called once. Using this one can set default values of <see cref="Pool" />.
+        /// </summary>       
+        static CacheFactory^ CreateCacheFactory();
+
+        /// <summary>
+        /// To create the instance of <see cref="Cache" />.
+        /// </summary>
+        Cache^ Create();
+
+        /// <summary>
+        /// Creates a new cache using the specified system.
+        /// </summary>
+        /// <param name="name">the name to associate with the new cache</param>
+        /// <param name="system">
+        /// a DistributedSystem obtained by calling
+        /// <see cref="DistributedSystem.Connect" />
+        /// </param>
+        /// <returns>
+        /// a <c>Cache</c> that uses the specified <c>DistributedSystem</c>
+        /// for distribution.
+        /// </returns>
+        /// <exception cref="IllegalArgumentException">
+        /// If <c>system</c> is not connected
+        /// ( <see cref="DistributedSystem.IsConnected" /> ) or name is null.
+        /// </exception>
+        /// <exception cref="CacheExistsException">
+        /// If an open cache already exists.
+        /// </exception>
+        /// <deprecated>
+        /// as of NativeClient 3.5, use <see cref="CacheFactory.CreateCacheFactory" /> instead.
+        /// </deprecated>
+        static Cache^ Create( String^ name, DistributedSystem^ system );
+
+        /// <summary>
+        /// Creates a new cache using the specified system using parameters
+        /// from the given <a href="cacheXml.html">XML</a> file.
+        /// </summary>
+        /// <param name="name">the name to associate with the new cache</param>
+        /// <param name="system">
+        /// a DistributedSystem obtained by calling
+        /// <see cref="DistributedSystem.Connect" />
+        /// </param>
+        /// <param name="cacheXml">
+        /// name of the cache configuration XML file
+        /// </param>
+        /// <returns>
+        /// a <c>Cache</c> that uses the specified <c>DistributedSystem</c>
+        /// for distribution.
+        /// </returns>
+        /// <exception cref="IllegalArgumentException">
+        /// If <c>system</c> is not <see cref="DistributedSystem.IsConnected"/>
+        /// or name is null
+        /// </exception>
+        /// <exception cref="CacheExistsException">
+        /// ff an open cache already exists
+        /// </exception>
+        /// <exception cref="CacheXmlException">
+        /// if something went wrong while parsing the XML
+        /// </exception>
+        /// <exception cref="IllegalStateException">
+        /// if the XML file is well-formed but not valid (consistent)
+        /// </exception>
+        /// <deprecated>
+        /// as of NativeClient 3.5, use <see cref="CacheFactory.CreateCacheFactory" /> instead.
+        /// </deprecated>
+        static Cache^ Create( String^ name, DistributedSystem^ system,
+          String^ cacheXml );
+
+        /// <summary>
+        /// Creates a new cache using the specified system using the given
+        /// <c>CacheAttributes</c>.
+        /// </summary>
+        /// <param name="name">the name to associate with the new cache</param>
+        /// <param name="system">
+        /// a DistributedSystem obtained by calling
+        /// <see cref="DistributedSystem.Connect" />
+        /// </param>
+        /// <param name="attributes">
+        /// optional <c>CacheAttributes</c> for this cache
+        /// </param>
+        /// <returns>
+        /// a <c>Cache</c> that uses the specified <c>DistributedSystem</c>
+        /// for distribution.
+        /// </returns>
+        /// <exception cref="IllegalArgumentException">
+        /// If <c>system</c> is not <see cref="DistributedSystem.IsConnected"/>
+        /// or name is null
+        /// </exception>
+        /// <exception cref="CacheExistsException">
+        /// ff an open cache already exists
+        /// </exception>
+        /// <deprecated>
+        /// as of NativeClient 3.5, use <see cref="CacheFactory.CreateCacheFactory" /> instead.
+        /// </deprecated>
+        static Cache^ Create( String^ name, DistributedSystem^ system,
+          CacheAttributes^ attributes );
+
+        /// <summary>
+        /// Creates a new cache using the specified system using parameters
+        /// from the given <a href="cacheXml.html">XML</a> file and with
+        /// the given <c>CacheAttributes</c>.
+        /// </summary>
+        /// <param name="name">the name to associate with the new cache</param>
+        /// <param name="system">
+        /// a DistributedSystem obtained by calling
+        /// <see cref="DistributedSystem.Connect" />
+        /// </param>
+        /// <param name="cacheXml">
+        /// name of the cache configuration XML file
+        /// </param>
+        /// <param name="attributes">
+        /// optional <c>CacheAttributes</c> for this cache; these
+        /// override the ones provided in <c>cacheXml</c>.
+        /// </param>
+        /// <returns>
+        /// a <c>Cache</c> that uses the specified <c>DistributedSystem</c>
+        /// for distribution.
+        /// </returns>
+        /// <exception cref="IllegalArgumentException">
+        /// If <c>system</c> is not <see cref="DistributedSystem.IsConnected"/>
+        /// or name is null
+        /// </exception>
+        /// <exception cref="CacheExistsException">
+        /// ff an open cache already exists
+        /// </exception>
+        /// <exception cref="CacheXmlException">
+        /// if something went wrong while parsing the XML
+        /// </exception>
+        /// <exception cref="IllegalStateException">
+        /// if the XML file is well-formed but not valid (consistent)
+        /// </exception>
+        /// <deprecated>
+        /// as of NativeClient 3.5, use <see cref="CacheFactory.CreateCacheFactory" /> instead.
+        /// </deprecated>
+        static Cache^ Create( String^ name, DistributedSystem^ system,
+          String^ cacheXml, CacheAttributes^ attributes );
+
+        /// <summary>
+        /// Gets the instance of <see cref="Cache" /> produced by an
+        /// earlier call to <see cref="CacheFactory.Create" />.
+        /// </summary>
+        /// <param name="system">
+        /// the <see cref="DistributedSystem" /> the cache was created with.
+        /// </param>
+        /// <returns>the <see cref="Cache" /> associated with the specified system.</returns>
+        /// <exception cref="IllegalArgumentException">
+        /// if the distributed system argument is null
+        /// </exception>
+        /// <exception cref="CacheClosedException">
+        /// if a cache has not been created or the created one is closed
+        /// ( <see cref="Cache.IsClosed" /> )
+        /// </exception>
+        /// <exception cref="EntryNotFoundException">
+        /// if a cache with specified system not found
+        /// </exception>
+        static Cache^ GetInstance( DistributedSystem^ system );
+
+        /// <summary>
+        /// Gets the instance of <see cref="Cache" /> produced by an
+        /// earlier call to <see cref="CacheFactory.Create" />, even if it has been closed.
+        /// </summary>
+        /// <param name="system">
+        /// the <see cref="DistributedSystem" /> the cache was created with.
+        /// </param>
+        /// <returns>
+        /// the <c>Cache</c> associated with the specified system.
+        /// </returns>
+        /// <exception cref="IllegalArgumentException">
+        /// if the distributed system argument is null
+        /// </exception>
+        /// <exception cref="CacheClosedException">
+        /// if a cache has not been created.
+        /// </exception>
+        /// <exception cref="EntryNotFoundException">
+        /// if a cache with specified system not found
+        /// </exception>
+        static Cache^ GetInstanceCloseOk( DistributedSystem^ system );
+
+        /// <summary>
+        /// Gets an arbitrary open instance of <see cref="Cache" /> produced by an
+        /// earlier call to <see cref="CacheFactory.Create" />.
+        /// </summary>
+        /// <exception cref="CacheClosedException">
+        /// if a cache has not been created or the only created one is
+        /// closed ( <see cref="Cache.IsClosed" /> )
+        /// </exception>
+        /// <exception cref="EntryNotFoundException">
+        /// if a cache with specified system not found
+        /// </exception>
+        static Cache^ GetAnyInstance( );
+
+        /// <summary>
+        /// Set allocators for non default Microsoft CRT versions.
+        /// </summary>
+        static void SetNewAndDelete()
+        {
+          gemfire::setNewAndDelete( & operator new, & operator delete );
+        }
+
+        /// <summary>
+        /// Returns the version of the cache implementation.
+        /// For the 1.0 release of GemFire, the string returned is <c>1.0</c>.
+        /// </summary>
+        /// <returns>the version of the cache implementation as a <c>String</c></returns>
+        static property String^ Version
+        {
+          static String^ get( );
+        }
+
+        /// <summary>
+        /// Returns the product description string including product name and version.
+        /// </summary>
+        static property String^ ProductDescription
+        {
+          static String^ get( );
+        }
+
+      /// <summary>
+		  /// Sets the free connection timeout for this pool.
+		  /// </summary>
+		  /// <remarks>
+		  /// If the pool has a max connections setting, operations will block
+		  /// if all of the connections are in use. The free connection timeout
+		  /// specifies how long those operations will block waiting for
+		  /// a free connection before receiving an AllConnectionsInUseException.
+		  /// If max connections is not set this setting has no effect.
+      /// </remarks>
+		  /// <param>
+		  /// connectionTimeout the connection timeout in milliseconds
+		  /// </param>
+		  /// <exception>
+		  /// IllegalArgumentException if connectionTimeout 
+		  /// is less than or equal to 0.
+		  /// </exception>
+		  CacheFactory^ SetFreeConnectionTimeout( Int32 connectionTimeout );
+
+		  /// <summary>
+		  /// Sets the load conditioning interval for this pool.
+		  /// </summary>
+		  /// <remarks>
+		  /// This interval controls how frequently the pool will check to see if
+		  /// a connection to a given server should be moved to a different
+		  /// server to improve the load balance.
+		  /// </remarks>
+		  /// <param>
+		  /// loadConditioningInterval the connection lifetime in milliseconds
+		  /// A value of -1 disables load conditioning.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if connectionLifetime
+		  /// is less than -1.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+      CacheFactory^ SetLoadConditioningInterval( Int32 loadConditioningInterval );
+
+		  /// <summary>
+		  /// Sets the socket buffer size for each connection made in this pool.
+		  /// </summary>
+		  /// <remarks>
+		  /// Large messages can be received and sent faster when this buffer is larger.
+		  /// Larger buffers also optimize the rate at which servers can send events
+		  /// for client subscriptions.
+		  /// </remarks>
+		  /// <param>
+		  /// bufferSize the size of the socket buffers used for reading and
+		  /// writing on each connection in this pool.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if bufferSize
+		  /// is less than or equal to 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetSocketBufferSize( Int32 bufferSize );
+
+		  /// <summary>
+		  /// Sets the number of milliseconds to wait for a response from a server before
+		  /// timing out the operation and trying another server (if any are available).
+		  /// </summary>
+		  /// <param>
+		  /// timeout number of milliseconds to wait for a response from a server
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if timeout
+		  /// is less than or equal to 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetReadTimeout( Int32 timeout );
+
+		  /// <summary>
+		  /// Set the minimum number of connections to keep available at all times.
+		  /// </summary>
+		  /// <remarks>
+		  /// When the pool is created, it will create this many connections.
+		  /// If 0 then connections will not be made until an actual operation
+		  /// is done that requires client-to-server communication.
+		  /// </remarks>
+		  /// <param>
+		  /// minConnections the initial number of connections this pool will create.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if minConnections is less than 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetMinConnections( Int32 minConnections );
+
+		  /// <summary>
+		  /// Set the max number of client to server connections that the pool will create.
+		  /// </summary>
+		  /// <remarks>
+		  /// If all of the connections are in use, an operation requiring a client to
+		  /// server connection will block until a connection is available.
+		  /// see setFreeConnectionTimeout(int)
+		  /// </remarks>
+		  /// <param>
+		  /// maxConnections the maximum number of connections in the pool.
+		  /// -1 indicates that there is no maximum number of connections.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if maxConnections is less than minConnections.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetMaxConnections( Int32 maxConnections );
+
+		  /// <summary>
+		  /// Set the amount of time a connection can be idle before expiring the connection.
+		  /// </summary>
+		  /// <remarks>
+		  /// If the pool size is greater than the minimum specified, connections which have
+		  /// been idle for longer than the idleTimeout will be closed.
+		  /// </remarks>
+		  /// <param>
+		  /// idleTimeout The amount of time in milliseconds that an idle connection
+		  /// should live before expiring. -1 indicates that connections should never expire.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if idleTimout is less than 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetIdleTimeout( Int32 idleTimeout );
+
+		  /// <summary>
+		  /// Set the number of times to retry a request after timeout/exception.
+		  /// </summary>
+		  /// <param>
+		  /// retryAttempts The number of times to retry a request
+		  /// after timeout/exception. -1 indicates that a request should be
+		  /// tried against every available server before failing.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if idleTimout is less than 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetRetryAttempts( Int32 retryAttempts );
+
+		  /// <summary>
+		  /// Set how often to ping servers to verify that they are still alive.
+		  /// </summary>
+		  /// <remarks>
+		  /// Each server will be sent a ping every pingInterval if there has not
+		  /// been any other communication with the server.
+		  /// These pings are used by the server to monitor the health of
+		  /// the client. Make sure that the pingInterval is less than the
+		  /// maximum time between pings allowed by the bridge server.
+		  /// see in CacheServer: setMaximumTimeBetweenPings(int)
+		  /// </remarks>
+		  /// <param>
+		  /// pingInterval The amount of time in milliseconds between pings.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if pingInterval is less than 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetPingInterval( Int32 pingInterval );
+
+		  /// <summary>
+		  /// Set how often to send client statistics to the server.
+		  /// </summary>
+		  /// <remarks>
+		  /// Doing this allows gfmon to monitor clients.
+		  /// A value of -1 disables the sending of client statistics
+		  /// to the server.
+          /// </remarks>
+		  /// <param>
+		  /// statisticInterval The amount of time in milliseconds between
+		  /// sends of client statistics to the server.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if statisticInterval
+		  /// is less than -1.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+      CacheFactory^ SetStatisticInterval( Int32 statisticInterval);
+
+		  /// <summary>
+		  /// Configures the group that all servers this pool connects to must belong to.
+		  /// </summary>
+		  /// <param>
+		  /// group the server group that this pool will connect to.
+		  /// If null or "" then all servers will be connected to.
+		  /// </param>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+      CacheFactory^ SetServerGroup( String^ group );
+
+		  /// <summary>
+		  /// Add a locator, given its host and port, to this factory.
+		  /// </summary>
+		  /// <remarks>
+		  /// The locator must be a server locator and will be used to discover other running
+		  /// bridge servers and locators.
+		  /// </remarks>
+		  /// <param>
+		  /// host the host name or ip address that the locator is listening on.
+		  /// </param>
+		  /// <param>
+		  /// port the port that the locator is listening on
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if host is an unknown host
+		  /// or if port is outside the valid range of [1..65535] inclusive.
+		  /// </exception>
+		  /// <exception>
+		  /// throws IllegalStateException if a locator has already been added to this factory.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ AddLocator( String^ host, Int32 port );
+
+		  /// <summary>
+		  /// Add a server, given its host and port, to this factory.
+		  /// </summary>
+		  /// <remarks>
+		  /// The server must be a bridge server and this client will
+		  /// directly connect to without consulting a server locator.
+		  /// </remarks>
+		  /// <param>
+		  /// host the host name or ip address that the server is listening on.
+		  /// </param>
+		  /// <param>
+		  /// port the port that the server is listening on
+		  /// </param>
+          /// <exception>
+		  /// throws IllegalArgumentException if host is an unknown host
+		  /// or if port is outside the valid range of [1..65535] inclusive.
+		  /// </exception>
+		  /// <exception>
+		  /// throws IllegalStateException if a server has already been added to this factory.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+      CacheFactory^ AddServer( String^ host, Int32 port );
+
+		  /// <summary>
+		  /// Enable subscriptions.
+		  /// </summary>
+		  /// <remarks>
+		  /// If set to true then the created pool will have server-to-client
+		  /// subscriptions enabled. If set to false then all Subscription*
+		  /// attributes are ignored at create time.
+		  /// </remarks>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetSubscriptionEnabled( Boolean enabled );
+
+      /// <summary>
+		  /// By default SetPRSingleHopEnabled is true.
+		  /// </summary>
+		  /// <remarks>
+		  /// The client is aware of location of partitions on servers hosting
+      /// Using this information, the client routes the client cache operations
+		  /// directly to the server which is hosting the required partition for the
+		  /// cache operation. 
+      /// If SetPRSingleHopEnabled is false the client can do an extra hop on servers
+      /// to go to the required partition for that cache operation.
+      /// The SetPRSingleHopEnabled avoids extra hops only for following cache operations :
+      /// put, get & destroy operations.
+		  /// </remarks>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetPRSingleHopEnabled( Boolean enabled );
+
+		  /// <summary>
+		  /// Sets the redundancy level for this pools server-to-client subscriptions.
+		  /// </summary>
+		  /// <remarks>
+		  /// If 0 then no redundant copies will be kept on the servers.
+		  /// Otherwise an effort will be made to maintain the requested number of
+		  /// copies of the server-to-client subscriptions. At most one copy per server will
+		  /// be made up to the requested level.
+		  /// </remarks>
+		  /// <param>
+		  /// redundancy the number of redundant servers for this client's subscriptions.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if redundancyLevel is less than -1.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetSubscriptionRedundancy( Int32 redundancy );
+
+		  /// <summary>
+		  /// Sets the messageTrackingTimeout attribute which is the time-to-live period,
+		  /// in milliseconds, for subscription events the client has received from the server.
+		  /// </summary>
+		  /// <remarks>
+		  /// It's used to minimize duplicate events. Entries that have not been modified
+		  /// for this amount of time are expired from the list.
+		  /// </remarks>
+		  /// <param>
+		  /// messageTrackingTimeout number of milliseconds to set the timeout to.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if messageTrackingTimeout is less than or equal to 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetSubscriptionMessageTrackingTimeout( Int32 messageTrackingTimeout );
+
+		  /// <summary>
+		  /// Sets the is the interval in milliseconds to wait before sending
+		  /// acknowledgements to the bridge server for events received from the server subscriptions.
+		  /// </summary>
+		  /// <param>
+		  /// ackInterval number of milliseconds to wait before sending event acknowledgements.
+		  /// </param>
+		  /// <exception>
+		  /// throws IllegalArgumentException if ackInterval is less than or equal to 0.
+		  /// </exception>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+		  CacheFactory^ SetSubscriptionAckInterval( Int32 ackInterval );
+
+
+      /// <summary>
+		  /// Sets whether pool is in multiuser mode
+		  /// </summary>
+		  /// <param>
+		  /// multiuserAuthentication should be true/false. Default value is false;
+		  /// </param>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+      CacheFactory^ SetMultiuserAuthentication( bool multiuserAuthentication );
+
+
+      /// <summary>
+		  /// Sets a gemfire property that will be used when creating the ClientCache.
+      /// </summary>
+		  /// <param>
+		  /// name the name of the gemfire property
+		  /// </param>
+      /// <param>
+		  /// value the value of the gemfire property
+		  /// </param>
+      /// <returns>
+      /// a instance of <c>CacheFactory</c> 
+      /// </returns>
+      CacheFactory^ Set(String^ name, String^ value);
+
+       private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+         inline CacheFactory( gemfire::CacheFactory* nativeptr, Properties^ dsProps )
+          : SBWrap( nativeptr ) 
+         { 
+            m_dsProps = dsProps;
+         }
+
+         Properties^ m_dsProps; 
+         static System::Object^ m_singletonSync = gcnew System::Object();
+
+        internal:
+          static bool m_connected = false;
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheListenerAdapter.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheListenerAdapter.hpp b/geode-client-native/src/clicache/CacheListenerAdapter.hpp
new file mode 100644
index 0000000..ac3c0f7
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheListenerAdapter.hpp
@@ -0,0 +1,74 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "ICacheListener.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      /// <summary>
+      /// Utility class that implements all methods in <c>ICacheListener</c>
+      /// with empty implementations. Applications can subclass this class
+      /// and only override the methods for the events of interest.
+      /// </summary>
+        [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheListenerAdapter
+        : public ICacheListener
+      {
+      public:
+        virtual void AfterCreate(EntryEvent^ ev)
+        {
+        }
+
+        virtual void AfterUpdate(EntryEvent^ ev)
+        {
+        }
+
+        virtual void AfterInvalidate(EntryEvent^ ev)
+        {
+        }
+
+        virtual void AfterDestroy(EntryEvent^ ev)
+        {
+        }
+
+        virtual void AfterRegionInvalidate(RegionEvent^ ev)
+        {
+        }
+
+        virtual void AfterRegionDestroy(RegionEvent^ ev)
+        {
+        }
+
+        virtual void AfterRegionLive(RegionEvent^ ev)
+        {
+        }
+
+        virtual void AfterRegionClear(RegionEvent^ ev)
+        {
+        }
+
+        virtual void Close(Region^ region)
+        {
+        }
+        virtual void AfterRegionDisconnected( Region^ region )
+        {
+        }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheM.cpp b/geode-client-native/src/clicache/CacheM.cpp
new file mode 100644
index 0000000..a433a01
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheM.cpp
@@ -0,0 +1,223 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#include "gf_includes.hpp"
+#include "CacheM.hpp"
+#include "DistributedSystemM.hpp"
+#include "RegionM.hpp"
+#include "RegionAttributesM.hpp"
+#include "QueryServiceM.hpp"
+#include "FunctionServiceM.hpp"
+#include "ExecutionM.hpp"
+#include "CacheFactoryM.hpp"
+#include "impl/AuthenticatedCacheM.hpp"
+
+//#include "impl/DistributedSystemImpl.hpp"
+
+#pragma warning(disable:4091)
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      void Cache::InitializeDeclarativeCache( String^ cacheXml )
+      {
+        ManagedString mg_cacheXml( cacheXml );
+        NativePtr->initializeDeclarativeCache( mg_cacheXml.CharPtr );
+      }
+
+      String^ Cache::Name::get( )
+      {
+        return ManagedString::Get( NativePtr->getName( ) );
+      }
+
+      bool Cache::IsClosed::get( )
+      {
+        return NativePtr->isClosed( );
+      }
+
+      DistributedSystem^ Cache::DistributedSystem::get( )
+      {
+        gemfire::DistributedSystemPtr& nativeptr(
+          NativePtr->getDistributedSystem( ) );
+
+        return GemStone::GemFire::Cache::DistributedSystem::Create(
+          nativeptr.ptr( ) );
+      }
+
+      void Cache::Close( )
+      {
+        Close( false );
+      }
+
+      void Cache::Close( bool keepalive )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          GemStone::GemFire::Cache::DistributedSystem::acquireDisconnectLock();
+
+          GemStone::GemFire::Cache::DistributedSystem::disconnectInstance();
+          GemStone::GemFire::Cache::CacheFactory::m_connected = false;
+
+          NativePtr->close( keepalive );
+
+          // If DS automatically disconnected due to the new bootstrap API, then cleanup the C++/CLI side
+          //if (!gemfire::DistributedSystem::isConnected())
+          {
+            GemStone::GemFire::Cache::DistributedSystem::UnregisterBuiltinManagedTypes();
+          }
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+        finally
+        {
+          GemStone::GemFire::Cache::DistributedSystem::releaseDisconnectLock();
+        }
+      }
+
+      void Cache::ReadyForEvents( )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          NativePtr->readyForEvents( );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Region^ Cache::CreateRegion( String^ name, RegionAttributes^ attributes )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_name( name );
+          gemfire::RegionAttributesPtr regionAttribsPtr(
+            GetNativePtr<gemfire::RegionAttributes>( attributes ) );
+
+          gemfire::RegionPtr& nativeptr( NativePtr->createRegion(
+            mg_name.CharPtr, regionAttribsPtr ) );
+          return Region::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Region^ Cache::GetRegion( String^ path )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_path( path );
+          gemfire::RegionPtr& nativeptr(
+            NativePtr->getRegion( mg_path.CharPtr ) );
+
+          return Region::Create( nativeptr.ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      QueryService^ Cache::GetQueryService( )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          return QueryService::Create( NativePtr->getQueryService( ).ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+      
+      QueryService^ Cache::GetQueryService(String^ poolName )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          ManagedString mg_poolName( poolName );
+          return QueryService::Create( NativePtr->getQueryService(mg_poolName.CharPtr).ptr( ) );
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      RegionFactory^ Cache::CreateRegionFactory(RegionShortcut preDefinedRegionAttributes)
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::RegionShortcut preDefineRegionAttr = gemfire::CACHING_PROXY;
+
+          switch(preDefinedRegionAttributes)
+          {
+          case RegionShortcut::PROXY:
+              preDefineRegionAttr = gemfire::PROXY;
+              break;
+          case RegionShortcut::CACHING_PROXY:
+              preDefineRegionAttr = gemfire::CACHING_PROXY;
+              break;
+          case RegionShortcut::CACHING_PROXY_ENTRY_LRU:
+              preDefineRegionAttr = gemfire::CACHING_PROXY_ENTRY_LRU;
+              break;
+          case RegionShortcut::LOCAL:
+              preDefineRegionAttr = gemfire::LOCAL;
+              break;
+          case RegionShortcut::LOCAL_ENTRY_LRU:
+              preDefineRegionAttr = gemfire::LOCAL_ENTRY_LRU;
+              break;          
+          }
+
+          return RegionFactory::Create(NativePtr->createRegionFactory(preDefineRegionAttr).ptr());
+          
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      IRegionService^ Cache::CreateAuthenticatedView(Properties^ credentials)
+      {
+        gemfire::Properties* prop = NULL;
+
+        if (credentials != nullptr)
+          prop = GetNativePtr<gemfire::Properties>( credentials );
+
+        gemfire::PropertiesPtr credPtr(prop);
+        
+        _GF_MG_EXCEPTION_TRY
+
+          return AuthenticatedCache::Create( (NativePtr->createAuthenticatedView(credPtr)).ptr());
+
+        _GF_MG_EXCEPTION_CATCH_ALL   
+      }
+
+      IRegionService^ Cache::CreateAuthenticatedView(Properties^ credentials, String^ poolName)
+      {
+        gemfire::Properties* prop = NULL;
+
+        if (credentials != nullptr)
+          prop = GetNativePtr<gemfire::Properties>( credentials );
+
+        gemfire::PropertiesPtr credPtr(prop);
+
+        ManagedString mg_poolName( poolName );
+        
+        _GF_MG_EXCEPTION_TRY
+
+          return AuthenticatedCache::Create( (NativePtr->createAuthenticatedView(credPtr, mg_poolName.CharPtr)).ptr());
+
+        _GF_MG_EXCEPTION_CATCH_ALL   
+      }
+
+			array<Region^>^ Cache::RootRegions( )
+      {
+        gemfire::VectorOfRegion vrr;
+        NativePtr->rootRegions( vrr );
+        array<Region^>^ rootRegions =
+          gcnew array<Region^>( vrr.size( ) );
+
+        for( int32_t index = 0; index < vrr.size( ); index++ )
+        {
+          gemfire::RegionPtr& nativeptr( vrr[ index ] );
+          rootRegions[ index ] = Region::Create( nativeptr.ptr( ) );
+        }
+        return rootRegions;
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheM.hpp b/geode-client-native/src/clicache/CacheM.hpp
new file mode 100644
index 0000000..cd6a804
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheM.hpp
@@ -0,0 +1,281 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "cppcache/Cache.hpp"
+#include "impl/NativeWrapper.hpp"
+#include "RegionShortcutM.hpp"
+#include "RegionFactoryM.hpp"
+#include "PropertiesM.hpp"
+#include "IGemFireCache.hpp"
+#include "IRegionService.hpp"
+#include "RegionM.hpp"
+
+#include "RegionAttributesM.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      ref class DistributedSystem;
+      //ref class Region;
+      //ref class RegionAttributes;
+      ref class QueryService;
+      ref class FunctionService;
+
+      /// <summary>
+      /// Provides a distributed cache.
+      /// </summary>
+      /// <remarks>
+      /// Caches are obtained from Create methods on the
+      /// <see cref="CacheFactory.Create"/> class.
+      /// <para>
+      /// When a cache will no longer be used, call <see cref="Cache.Close" />.
+      /// Once it <see cref="Cache.IsClosed" /> any attempt to use it
+      /// will cause a <c>CacheClosedException</c> to be thrown.
+      /// </para><para>
+      /// A cache can have multiple root regions, each with a different name.
+      /// </para>
+      /// </remarks>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class Cache sealed
+        : public IGemFireCache, Internal::SBWrap<gemfire::Cache>
+      {
+      public:
+
+        /// <summary>
+        /// Initializes the cache from an XML file.
+        /// </summary>
+        /// <param name="cacheXml">pathname of a <c>cache.xml</c> file</param>
+        virtual void InitializeDeclarativeCache( String^ cacheXml );
+
+        /// <summary>
+        /// Returns the name of this cache.
+        /// </summary>
+        /// <remarks>
+        /// This method does not throw
+        /// <c>CacheClosedException</c> if the cache is closed.
+        /// </remarks>
+        /// <returns>the string name of this cache</returns>
+        virtual property String^ Name
+        {
+          String^ get( );
+        }
+
+        /// <summary>
+        /// True if this cache has been closed.
+        /// </summary>
+        /// <remarks>
+        /// After a new cache object is created, this method returns false.
+        /// After <see cref="Close" /> is called on this cache object, this method
+        /// returns true.
+        /// </remarks>
+        /// <returns>true if this cache is closed, otherwise false</returns>
+        virtual property bool IsClosed
+        {
+          bool get( );
+        }
+
+        /// <summary>
+        /// Returns the distributed system used to
+        /// <see cref="CacheFactory.Create" /> this cache.
+        /// </summary>
+        /// <remarks>
+        /// This method does not throw
+        /// <c>CacheClosedException</c> if the cache is closed.
+        /// </remarks>
+        virtual property DistributedSystem^ DistributedSystem
+        {
+          GemStone::GemFire::Cache::DistributedSystem^ get( );
+        }
+
+        /// <summary>
+        /// Terminates this object cache and releases all the local resources.
+        /// </summary>
+        /// <remarks>
+        /// After this cache is closed, any further
+        /// method call on this cache or any region object will throw
+        /// <c>CacheClosedException</c>, unless otherwise noted.
+        /// </remarks>
+        /// <exception cref="CacheClosedException">
+        /// if the cache is already closed.
+        /// </exception>
+        virtual void Close( );
+
+        /// <summary>
+        /// Terminates this object cache and releases all the local resources.
+        /// </summary>
+        /// <remarks>
+        /// After this cache is closed, any further
+        /// method call on this cache or any region object will throw
+        /// <c>CacheClosedException</c>, unless otherwise noted.
+        /// </remarks>
+        /// <param name="keepalive">whether to keep a durable client's queue alive</param>
+        /// <exception cref="CacheClosedException">
+        /// if the cache is already closed.
+        /// </exception>
+        virtual void Close( bool keepalive );
+
+        /// <summary>
+        /// Send the client-ready message to the server for a durable client.        
+        /// </summary>
+        /// <remarks>
+        /// This method should only be called for durable clients and
+        /// with a cache server version 5.5 onwards.
+        /// </remarks>
+        /// <exception cref="IllegalStateException">
+        /// if there was a problem sending the message to the server.
+        /// </exception>
+        virtual void ReadyForEvents( );
+
+        /// <summary>
+        /// Creates a region with the given name using the specified
+        /// RegionAttributes.
+        /// The region is just created locally. It is not created on the server
+        /// to which this client is connected with.
+        /// </summary>
+        /// <remarks>
+        /// If Pool attached with Region is in multiusersecure mode then don't use return instance of region as no credential are attached with this instance.
+        /// Get instance of region from <see cref="Cache.CreateAuthenticatedView" to do the operation on Cache. 
+        /// </remarks>
+        /// <param name="name">the name of the region to create</param>
+        /// <param name="attributes">the attributes of the root region</param>
+        /// <returns>new region</returns>
+        /// <exception cref="RegionExistsException">
+        /// if a region with the same name is already in this cache
+        /// </exception>
+        /// <exception cref="CacheClosedException">
+        /// if the cache is closed
+        /// </exception>
+        /// <exception cref="OutOfMemoryException">
+        /// if the memory allocation failed
+        /// </exception>
+        /// <exception cref="RegionCreationFailedException">
+        /// if the call fails due to incomplete mirror initialization
+        /// </exception>
+        /// <exception cref="InitFailedException">
+        /// if the optional PersistenceManager fails to initialize
+        /// </exception>
+        /// <exception cref="UnknownException">otherwise</exception>
+        /// <deprecated>
+        /// as of NativeClient 3.5, use <see cref="Cache.CreateRegionFactory /> instead.
+        /// </deprecated>
+        virtual Region^ CreateRegion( String^ name, RegionAttributes^ attributes );
+
+        /// <summary>
+        /// Returns an existing region given the full path from root, or null 
+        /// if no such region exists.
+        /// </summary>
+        /// <remarks>
+        /// If Pool attached with Region is in multiusersecure mode then don't use return instance of region as no credential are attached with this instance.
+        /// Get region from RegionService instance of Cache.<see cref="Cache.CreateAuthenticatedView(PropertiesPtr)" />.
+        /// </remarks>
+        /// <param name="path">the pathname of the region</param>
+        /// <returns>the region</returns>
+        virtual GemStone::GemFire::Cache::Region^ GetRegion( String^ path );
+
+        /// <summary>
+        /// Returns an array of root regions in the cache. This set is a
+        /// snapshot and is not backed by the cache.
+        /// </summary>
+        /// <remarks>
+        /// It is not supported when Cache is created from Pool.
+        /// </remarks>
+        /// <returns>array of regions</returns>
+        virtual array<GemStone::GemFire::Cache::Region^>^ RootRegions( );
+
+        /// <summary>
+        /// Get a query service object to be able to query the cache.
+        /// Supported only when cache is created from Pool(pool is in multiuserSecure mode)
+        /// </summary>
+        /// <remarks>
+        /// Currently only works against the java server in native mode, and
+        /// at least some endpoints must have been defined in some regions
+        /// before actually firing a query.
+        /// </remarks>
+        virtual QueryService^ GetQueryService( );
+
+        /// <summary>
+        /// Get a query service object to be able to query the cache.
+        /// Use only when Cache has more than one Pool.
+        /// </summary>
+        /// <remarks>
+        /// Currently only works against the java server in native mode, and
+        /// at least some endpoints must have been defined in some regions
+        /// before actually firing a query.
+        /// </remarks>
+        QueryService^ GetQueryService(String^ poolName );
+
+        /// <summary>
+        /// Returns the instance of <see cref="RegionFactory" /> to create the region
+        /// </summary>
+        /// <remarks>
+        /// Pass the <see cref="RegionShortcut" /> to set the deafult region attributes
+        /// </remarks>
+        /// <param name="regionShortcut">the regionShortcut to set the default region attributes</param>
+        /// <returns>Instance of RegionFactory</returns>
+        RegionFactory^ CreateRegionFactory(RegionShortcut regionShortcut); 
+
+        /// <summary>
+        /// Returns the instance of <see cref="IRegionService" /> to do the operation on Cache with different Credential.
+        /// </summary>
+        /// <remarks>
+        /// Deafault pool should be in multiuser mode <see cref="CacheFactory.SetMultiuserAuthentication" />
+        /// </remarks>
+        /// <param name="credentials">the user Credentials.</param>
+        /// <returns>Instance of IRegionService</returns>
+        IRegionService^ CreateAuthenticatedView(Properties^ credentials);
+
+        /// <summary>
+        /// Returns the instance of <see cref="IRegionService" /> to do the operation on Cache with different Credential.
+        /// </summary>
+        /// <remarks>
+        /// Deafault pool should be in multiuser mode <see cref="CacheFactory.SetMultiuserAuthentication" />
+        /// </remarks>
+        /// <param name="credentials">the user Credentials.</param>
+        /// <param name="poolName">Pool, which is in multiuser mode.</param>
+        /// <returns>Instance of IRegionService</returns>
+        IRegionService^ CreateAuthenticatedView(Properties^ credentials, String^ poolName);
+
+      internal:
+
+        /// <summary>
+        /// Internal factory function to wrap a native object pointer inside
+        /// this managed class with null pointer check.
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        /// <returns>
+        /// The managed wrapper object; null if the native pointer is null.
+        /// </returns>
+        inline static Cache^ Create( gemfire::Cache* nativeptr )
+        {
+          return ( nativeptr != nullptr ?
+            gcnew Cache( nativeptr ) : nullptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline Cache( gemfire::Cache* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheStatisticsM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheStatisticsM.cpp b/geode-client-native/src/clicache/CacheStatisticsM.cpp
new file mode 100644
index 0000000..ef8d86d
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheStatisticsM.cpp
@@ -0,0 +1,32 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#include "gf_includes.hpp"
+#include "CacheStatisticsM.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      uint32_t CacheStatistics::LastModifiedTime::get( )
+      {
+        return NativePtr->getLastModifiedTime( );
+      }
+
+      uint32_t CacheStatistics::LastAccessedTime::get( )
+      {
+        return NativePtr->getLastAccessedTime( );
+      }
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheStatisticsM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheStatisticsM.hpp b/geode-client-native/src/clicache/CacheStatisticsM.hpp
new file mode 100644
index 0000000..19b6920
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheStatisticsM.hpp
@@ -0,0 +1,145 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "cppcache/CacheStatistics.hpp"
+#include "impl/NativeWrapper.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      /// <summary>
+      /// Defines common statistical information for both the region and its entries.
+      /// </summary>
+      /// <remarks>
+      /// All of these methods may throw a <c>CacheClosedException</c>,
+      /// <c>RegionDestroyedException</c>, or <c>EntryDestroyedException</c>.
+      /// </remarks>
+      /// <seealso cref="Region.Statistics" />
+      /// <seealso cref="RegionEntry.Statistics" />
+        [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheStatistics sealed
+        : public Internal::SBWrap<gemfire::CacheStatistics>
+      {
+      public:
+
+        /// <summary>
+        /// For an entry, returns the time that the entry's value was last modified.
+        /// For a region, returns the last time any of the region's entries' values or
+        /// the values in subregions' entries were modified.
+        /// </summary>
+        /// <remarks>
+        /// <para>
+        /// The modification may have been initiated locally, or it may have been
+        /// an update distributed from another cache. It may also have been a new
+        /// value provided by a loader. The modification time on a region is
+        /// propagated upward to parent regions, transitively, to the root region.
+        /// </para><para>
+        /// The number is expressed as the number of milliseconds since January 1, 1970.
+        /// The granularity may be as coarse as 100ms, so the accuracy may be off by
+        /// up to 50ms.
+        /// </para><para>
+        /// Entry and subregion creation will update the modification time on a
+        /// region, but <c>Region.Destroy</c>, <c>Region.DestroyRegion</c>,
+        /// <c>Region.Invalidate</c>, and <c>Region.InvalidateRegion</c>
+        /// do not update the modification time.
+        /// </para>
+        /// </remarks>
+        /// <returns>
+        /// the last modification time of the region or the entry;
+        /// returns 0 if the entry is invalid or the modification time is uninitialized.
+        /// </returns>
+        /// <seealso cref="Region.Put" />
+        /// <seealso cref="Region.Get" />
+        /// <seealso cref="Region.Create" />
+        /// <seealso cref="Region.CreateSubRegion" />
+        property uint32_t LastModifiedTime
+        {
+          /// <summary>
+          /// Get the last modified time of an entry or a region.
+          /// </summary>
+          /// <returns>
+          /// the last accessed time expressed as the number of milliseconds since
+          /// January 1, 1970.
+          /// </returns>
+          uint32_t get( );
+        }
+
+        /// <summary>
+        /// For an entry, returns the last time it was accessed via <c>Region.Get</c>.
+        /// For a region, returns the last time any of its entries or the entries of
+        /// its subregions were accessed with <c>Region.Get</c>.
+        /// </summary>
+        /// <remarks>
+        /// <para>
+        /// Any modifications will also update the <c>LastAccessedTime</c>,
+        /// so <c>LastAccessedTime</c> is always greater than or equal to
+        /// <c>LastModifiedTime</c>. The <c>LastAccessedTime</c> on a region is
+        /// propagated upward to parent regions, transitively, to the the root region.
+        /// </para><para>
+        /// The number is expressed as the number of milliseconds since
+        /// January 1, 1970. The granularity may be as coarse as 100ms, so
+        /// the accuracy may be off by up to 50ms.
+        /// </para>
+        /// </remarks>
+        /// <returns>
+        /// the last access time of the region or the entry's value;
+        /// returns 0 if entry is invalid or access time is uninitialized.
+        /// </returns>
+        /// <seealso cref="Region.Get" />
+        /// <seealso cref="LastModifiedTime" />
+        property uint32_t LastAccessedTime
+        {
+          /// <summary>
+          /// Get the last accessed time of an entry or a region.
+          /// </summary>
+          /// <returns>
+          /// the last accessed time expressed as the number of milliseconds since
+          /// January 1, 1970.
+          /// </returns>
+          uint32_t get( );
+        }
+
+
+      internal:
+
+        /// <summary>
+        /// Internal factory function to wrap a native object pointer inside
+        /// this managed class with null pointer check.
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        /// <returns>
+        /// The managed wrapper object; null if the native pointer is null.
+        /// </returns>
+        inline static CacheStatistics^ Create( gemfire::CacheStatistics* nativeptr )
+        {
+          return ( nativeptr != nullptr ?
+            gcnew CacheStatistics( nativeptr ) : nullptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CacheStatistics( gemfire::CacheStatistics* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheWriterAdapter.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheWriterAdapter.hpp b/geode-client-native/src/clicache/CacheWriterAdapter.hpp
new file mode 100644
index 0000000..1a9c139
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheWriterAdapter.hpp
@@ -0,0 +1,64 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "ICacheWriter.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      /// <summary>
+      /// Utility class that implements all methods in <c>ICacheWriter</c>
+      /// with empty implementations. Applications can subclass this class
+      /// and only override the methods for the events of interest.
+      /// </summary>
+        [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheWriterAdapter
+        : public ICacheWriter
+      {
+      public:
+        virtual bool BeforeUpdate(EntryEvent^ ev)
+        {
+          return true;
+        }
+
+        virtual bool BeforeCreate(EntryEvent^ ev)
+        {
+          return true;
+        }
+
+        virtual bool BeforeDestroy(EntryEvent^ ev)
+        {
+          return true;
+        }
+
+        virtual bool BeforeRegionDestroy(RegionEvent^ ev)
+        {
+          return true;
+        }
+
+        virtual bool BeforeRegionClear(RegionEvent^ ev)
+        {
+          return true;
+        }
+
+        virtual void Close(Region^ region)
+        {
+        }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/CacheableArrayListM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/CacheableArrayListM.hpp b/geode-client-native/src/clicache/CacheableArrayListM.hpp
new file mode 100644
index 0000000..5d5d5c5
--- /dev/null
+++ b/geode-client-native/src/clicache/CacheableArrayListM.hpp
@@ -0,0 +1,115 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+#pragma once
+
+#include "gf_defs.hpp"
+#include "CacheableVectorM.hpp"
+
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+      /// <summary>
+      /// A mutable <c>IGFSerializable</c> vector wrapper that can serve as
+      /// a distributable object for caching. This class extends .NET generic
+      /// <c>List</c> class.
+      /// </summary>
+        [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class CacheableArrayList
+        : public CacheableVector
+      {
+      public:
+        /// <summary>
+        /// Allocates a new empty instance.
+        /// </summary>
+        inline CacheableArrayList()
+          : CacheableVector()
+        { }
+
+        /// <summary>
+        /// Allocates a new instance copying from the given collection.
+        /// </summary>
+        /// <param name="collection">
+        /// The collection whose elements are copied to this list.
+        /// </param>
+        inline CacheableArrayList(IEnumerable<IGFSerializable^>^ collection)
+          : CacheableVector(collection)
+        { }
+
+        /// <summary>
+        /// Allocates a new empty instance with given initial size.
+        /// </summary>
+        /// <param name="capacity">
+        /// The initial capacity of the vector.
+        /// </param>
+        inline CacheableArrayList(int32_t capacity)
+          : CacheableVector(capacity)
+        { }
+
+        /// <summary>
+        /// Static function to create a new empty instance.
+        /// </summary>
+        inline static CacheableArrayList^ Create()
+        {
+          return gcnew CacheableArrayList();
+        }
+
+        /// <summary>
+        /// Static function to create a new instance copying from the
+        /// given collection.
+        /// </summary>
+        inline static CacheableArrayList^ Create(
+          IEnumerable<IGFSerializable^>^ collection)
+        {
+          return gcnew CacheableArrayList(collection);
+        }
+
+        /// <summary>
+        /// Static function to create a new instance with given initial size.
+        /// </summary>
+        inline static CacheableArrayList^ Create(int32_t capacity)
+        {
+          return gcnew CacheableArrayList(capacity);
+        }
+
+        // Region: IGFSerializable Members
+
+        /// <summary>
+        /// Returns the classId of the instance being serialized.
+        /// This is used by deserialization to determine what instance
+        /// type to create and deserialize into.
+        /// </summary>
+        /// <returns>the classId</returns>
+        virtual property uint32_t ClassId
+        {
+          virtual uint32_t get() override
+          {
+            return GemFireClassIds::CacheableArrayList;
+          }
+        }
+
+        // End Region: IGFSerializable Members
+
+        /// <summary>
+        /// Factory function to register this class.
+        /// </summary>
+        static IGFSerializable^ CreateDeserializable()
+        {
+          return gcnew CacheableArrayList();
+        }
+      };
+    }
+  }
+}


Mime
View raw message