geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [09/51] [partial] incubator-geode git commit: Add source for geode c++ and .net clients
Date Thu, 19 May 2016 15:14:16 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/RegionShortcutM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/RegionShortcutM.hpp b/geode-client-native/src/clicache/RegionShortcutM.hpp
new file mode 100755
index 0000000..0ee8f91
--- /dev/null
+++ b/geode-client-native/src/clicache/RegionShortcutM.hpp
@@ -0,0 +1,66 @@
+/*=========================================================================
+ * 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
+
+
+using namespace System;
+using namespace System::Runtime::InteropServices;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {    
+    /// <summary> 
+    /// Each enum represents a predefined <see cref="RegionAttributes" /> in a <see cref="Cache" />.
+    /// These enum values can be used to create regions using a <see cref="RegionFactory" />
+    /// obtained by calling <see cref="Cache.CreateRegionFactory(RegionShortcut) />.
+    /// <p>Another way to use predefined region attributes is in cache.xml by setting
+    /// the refid attribute on a region element or region-attributes element to the
+    /// string of each value.
+    /// </summary>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public enum class RegionShortcut {
+
+        /// <summary>
+        /// A PROXY region has no local state and forwards all operations to a server.
+        /// </summary>
+        PROXY,
+
+        /// <summary>
+        /// A CACHING_PROXY region has local state but can also send operations to a server.
+        /// If the local state is not found then the operation is sent to the server
+        /// and the local state is updated to contain the server result.
+        /// </summary>
+        CACHING_PROXY,
+          
+        /// <summary>
+        /// A CACHING_PROXY_ENTRY_LRU region has local state but can also send operations to a server.
+        /// If the local state is not found then the operation is sent to the server
+        /// and the local state is updated to contain the server result.
+        /// It will also destroy entries once it detects that the number of enteries crossing default limit of #100000.
+        /// </summary>
+        CACHING_PROXY_ENTRY_LRU,
+        
+        /// <summary>
+        /// A LOCAL region only has local state and never sends operations to a server.
+        /// </summary>
+        LOCAL,
+
+       /// <summary>
+       /// A LOCAL_ENTRY_LRU region only has local state and never sends operations to a server.
+       /// It will also destroy entries once it detects once it detects that the number of enteries crossing default limit of #100000.
+       /// </summary>
+       LOCAL_ENTRY_LRU
+      } ;
+    }
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/ResultCollectorM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/ResultCollectorM.cpp b/geode-client-native/src/clicache/ResultCollectorM.cpp
new file mode 100644
index 0000000..b2e81ba
--- /dev/null
+++ b/geode-client-native/src/clicache/ResultCollectorM.cpp
@@ -0,0 +1,63 @@
+/*=========================================================================
+ * 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 "ResultCollectorM.hpp"
+#include "ExceptionTypesM.hpp"
+#include "impl/SafeConvert.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      void ResultCollector::AddResult( IGFSerializable^ rs )
+      {
+	  _GF_MG_EXCEPTION_TRY
+	  
+      gemfire::Serializable * result = SafeMSerializableConvert(rs);
+      NativePtr->addResult( result==NULL ? (NULLPTR) : (gemfire::CacheablePtr(result)) );
+	  
+         _GF_MG_EXCEPTION_CATCH_ALL
+      }
+      array<IGFSerializable^>^  ResultCollector::GetResult()
+      {
+	return GetResult( DEFAULT_QUERY_RESPONSE_TIMEOUT );
+      }
+      array<IGFSerializable^>^  ResultCollector::GetResult(UInt32 timeout)
+      {
+	  _GF_MG_EXCEPTION_TRY
+	  gemfire::CacheableVectorPtr results = NativePtr->getResult(timeout);
+	  array<IGFSerializable^>^ rs =
+	       gcnew array<IGFSerializable^>( results->size( ) );
+	  for( int32_t index = 0; index < results->size( ); index++ )
+	  {
+	        gemfire::CacheablePtr& nativeptr(results->operator[](index));
+
+                rs[ index] =  SafeUMSerializableConvert( nativeptr.ptr( ) );
+          }
+          return rs;
+         _GF_MG_EXCEPTION_CATCH_ALL
+      }
+      void ResultCollector::EndResults()
+      {
+	_GF_MG_EXCEPTION_TRY
+	 NativePtr->endResults();
+	_GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      void ResultCollector::ClearResults()
+      {
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/ResultCollectorM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/ResultCollectorM.hpp b/geode-client-native/src/clicache/ResultCollectorM.hpp
new file mode 100644
index 0000000..45ed417
--- /dev/null
+++ b/geode-client-native/src/clicache/ResultCollectorM.hpp
@@ -0,0 +1,105 @@
+/*=========================================================================
+ * 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 "IResultCollector.hpp"
+#include "cppcache/ResultCollector.hpp"
+#include "impl/NativeWrapper.hpp"
+
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+	interface class IResultCollector;
+
+      /// <summary>
+      /// collect function execution results, default collector
+      /// </summary>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class ResultCollector
+        : public Internal::SBWrap<gemfire::ResultCollector>, public IResultCollector
+      {
+      public:
+
+        /// <summary>
+        /// add result from a single function execution
+        /// </summary>
+        virtual void AddResult( IGFSerializable^ rs );
+
+        /// <summary>
+        /// get result 
+        /// </summary>
+	virtual array<IGFSerializable^>^  GetResult(); 
+
+        /// <summary>
+        /// get result 
+        /// </summary>
+	virtual array<IGFSerializable^>^  GetResult(UInt32 timeout); 
+
+        /// <summary>
+        ///Call back provided to caller, which is called after function execution is
+	///complete and caller can retrieve results using getResult()
+        /// </summary>
+	virtual void EndResults(); 
+
+  virtual void ClearResults();
+
+      internal:
+
+        /// <summary>
+        /// Default constructor.
+        /// </summary>
+        inline ResultCollector( ):
+           SBWrap( ){ }
+
+        //inline ~ResultCollector( ) { }
+
+        /// <summary>
+        /// Internal constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline ResultCollector( gemfire::ResultCollector* nativeptr ):
+          SBWrap( nativeptr ){ }
+
+        /// <summary>
+        /// Used to assign the native Serializable pointer to a new object.
+        /// </summary>
+        /// <remarks>
+        /// Note the order of preserveSB() and releaseSB(). This handles the
+        /// corner case when <c>m_nativeptr</c> is same as <c>nativeptr</c>.
+        /// </remarks>
+        inline void AssignSP( gemfire::ResultCollector* nativeptr )
+        {
+          AssignPtr( nativeptr );
+        }
+
+        /// <summary>
+        /// Used to assign the native CqListener pointer to a new object.
+        /// </summary>
+        inline void SetSP( gemfire::ResultCollector* nativeptr )
+        {
+          if ( nativeptr != nullptr ) {
+            nativeptr->preserveSB( );
+          }
+          _SetNativePtr( nativeptr );
+        }
+
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/ResultSetM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/ResultSetM.cpp b/geode-client-native/src/clicache/ResultSetM.cpp
new file mode 100644
index 0000000..c6207e6
--- /dev/null
+++ b/geode-client-native/src/clicache/ResultSetM.cpp
@@ -0,0 +1,66 @@
+/*=========================================================================
+ * 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 "ResultSetM.hpp"
+#include "SelectResultsIteratorM.hpp"
+#include "impl/SafeConvert.hpp"
+#include "ExceptionTypesM.hpp"
+
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      bool ResultSet::IsModifiable::get( )
+      {
+        return NativePtr->isModifiable( );
+      }
+
+      int32_t ResultSet::Size::get( )
+      {
+        return NativePtr->size( );
+      }
+
+      IGFSerializable^ ResultSet::default::get( size_t index )
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          return SafeUMSerializableConvert(NativePtr->operator[](static_cast<int32_t>(index)).ptr());
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      SelectResultsIterator^ ResultSet::GetIterator( )
+      {
+        gemfire::SelectResultsIterator* nativeptr =
+          new gemfire::SelectResultsIterator( NativePtr->getIterator( ) );
+
+        return SelectResultsIterator::Create( nativeptr );
+      }
+
+      System::Collections::Generic::IEnumerator<IGFSerializable^>^
+        ResultSet::GetEnumerator( )
+      {
+        return GetIterator( );
+      }
+
+      System::Collections::IEnumerator^ ResultSet::GetIEnumerator( )
+      {
+        return GetIterator( );
+      }
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/ResultSetM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/ResultSetM.hpp b/geode-client-native/src/clicache/ResultSetM.hpp
new file mode 100644
index 0000000..5f31659
--- /dev/null
+++ b/geode-client-native/src/clicache/ResultSetM.hpp
@@ -0,0 +1,111 @@
+/*=========================================================================
+ * 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/ResultSet.hpp"
+#include "impl/NativeWrapper.hpp"
+#include "ISelectResults.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      ref class SelectResultsIterator;
+      interface class IGFSerializable;
+
+      /// <summary>
+      /// Encapsulates a query result set.
+      /// It specifies the interface for the resultset obtained from the
+      /// Gemfire cache server
+      /// </summary>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class ResultSet sealed
+        : public Internal::SBWrap<gemfire::ResultSet>, public ISelectResults
+      {
+      public:
+
+        /// <summary>
+        /// True if this <c>ResultSet</c> is modifiable.
+        /// </summary>
+        virtual property bool IsModifiable
+        {
+          virtual bool get( );
+        }
+
+        /// <summary>
+        /// The size of the <c>ResultSet</c>.
+        /// </summary>
+        virtual property int32_t Size
+        {
+          virtual int32_t get( );
+        }
+
+        /// <summary>
+        /// Get an object at the given index.
+        /// </summary>
+        virtual property IGFSerializable^ GFINDEXER( size_t )
+        {
+          virtual IGFSerializable^ get( size_t index );
+        }
+
+        /// <summary>
+        /// Get an iterator for the result set.
+        /// </summary>
+        virtual SelectResultsIterator^ GetIterator( );
+
+        /// <summary>
+        /// Returns an enumerator that iterates through the collection.
+        /// </summary>
+        /// <returns>
+        /// A <c>System.Collections.Generic.IEnumerator</c> that
+        /// can be used to iterate through the <c>ResultSet</c>.
+        /// </returns>
+        virtual System::Collections::Generic::IEnumerator<IGFSerializable^>^
+          GetEnumerator( );
+
+
+      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 ResultSet^ Create(gemfire::ResultSet* nativeptr)
+        {
+          return (nativeptr != nullptr ? gcnew ResultSet(nativeptr) : nullptr);
+        }
+
+
+      private:
+
+        virtual System::Collections::IEnumerator^ GetIEnumerator( ) sealed
+          = System::Collections::IEnumerable::GetEnumerator;
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline ResultSet(gemfire::ResultSet* nativeptr)
+          : SBWrap(nativeptr) { }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/ScopeTypeM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/ScopeTypeM.hpp b/geode-client-native/src/clicache/ScopeTypeM.hpp
new file mode 100644
index 0000000..b1c3500
--- /dev/null
+++ b/geode-client-native/src/clicache/ScopeTypeM.hpp
@@ -0,0 +1,134 @@
+/*=========================================================================
+ * 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/ScopeType.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      /// <summary>
+      /// Enumerated type for region distribution scope.
+      /// Contains values for setting <c>Scope</c>.
+      /// Local scope is invalid (it is a non-native client local region), and
+      /// DistributedAck and DistributedNoAck have the same behavior.
+      /// </summary>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public enum class ScopeType
+      {
+        /// <summary>No distribution.</summary>
+        Local = 0,
+
+        /// <summary>
+        /// Distribute without waiting for acknowledgement.
+        /// </summary>
+        DistributedNoAck,
+
+        /// <summary>
+        /// Distribute and wait for all peers to acknowledge.
+        /// </summary>
+        DistributedAck,
+
+        /// <summary>
+        /// Distribute with full interprocess synchronization
+        /// -- NOT IMPLEMENTED.
+        /// </summary>
+        Global,
+
+        /// <summary>Invalid scope.</summary>
+        Invalid
+      };
+
+
+      /// <summary>
+      /// Static class containing convenience methods for <c>ScopeType</c>.
+      /// </summary>
+      /// <seealso cref="RegionAttributes.Scope" />
+      /// <seealso cref="AttributesFactory.SetScope" />
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]        
+      public ref class Scope STATICCLASS
+      {
+      public:
+
+        /// <summary>
+        /// True if the given scope is local.
+        /// </summary>
+        /// <param name="type">scope</param>
+        /// <returns>true if <c>Local</c></returns>
+        inline static bool IsLocal( ScopeType type )
+        {
+          return (type == ScopeType::Local);
+        }
+
+        /// <summary>
+        /// True if the given scope is one of the distributed scopes.
+        /// </summary>
+        /// <param name="type">scope</param>
+        /// <returns>
+        /// true if other than <c>Local</c>; could be <c>Invalid</c>
+        /// </returns>
+        inline static bool IsDistributed( ScopeType type ) 
+        {
+          return (type != ScopeType::Local);
+        }
+
+        /// <summary>
+        /// True if the given scope is distributed-no-ack.
+        /// </summary>
+        /// <param name="type">scope</param>
+        /// <returns>true if <c>DistributedNoAck</c></returns>
+        inline static bool IsDistributedNoAck( ScopeType type ) 
+        {
+          return (type == ScopeType::DistributedNoAck);
+        }
+
+        /// <summary>
+        /// True if the given scope is distributed-ack.
+        /// </summary>
+        /// <param name="type">scope</param>
+        /// <returns>true if <c>DistributedAck</c></returns>
+        inline static bool IsDistributedAck( ScopeType type ) 
+        {
+          return (type == ScopeType::DistributedAck);
+        }
+
+        ///// <summary>
+        ///// True if the given scope is global.
+        ///// </summary>
+        ///// <param name="type">scope</param>
+        ///// <returns>true if <c>Global</c></returns>
+        //inline static bool IsGlobal( ScopeType type ) 
+        //{
+        //  return (type == ScopeType::Global);
+        //}
+
+        /// <summary>
+        /// True if acknowledgements are required for the given scope.
+        /// </summary>
+        /// <param name="type">scope</param>
+        /// <returns>
+        /// true if <c>DistributedAck</c>, false otherwise
+        /// </returns>
+        inline static bool IsAck( ScopeType type )
+        {
+          return (type == ScopeType::DistributedAck);
+        }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/SelectResultsIteratorM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/SelectResultsIteratorM.cpp b/geode-client-native/src/clicache/SelectResultsIteratorM.cpp
new file mode 100644
index 0000000..fdd4899
--- /dev/null
+++ b/geode-client-native/src/clicache/SelectResultsIteratorM.cpp
@@ -0,0 +1,50 @@
+/*=========================================================================
+ * 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 "SelectResultsIteratorM.hpp"
+#include "impl/SafeConvert.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      IGFSerializable^ SelectResultsIterator::Current::get( )
+      {
+        return SafeUMSerializableConvert( NativePtr->current( ).ptr( ) );
+      }
+
+      bool SelectResultsIterator::MoveNext( )
+      {
+        return NativePtr->moveNext( );
+      }
+
+      void SelectResultsIterator::Reset( )
+      {
+        NativePtr->reset( );
+      }
+
+      IGFSerializable^ SelectResultsIterator::Next( )
+      {
+        return SafeUMSerializableConvert( NativePtr->next( ).ptr( ) );
+      }
+
+      bool SelectResultsIterator::HasNext::get( )
+      {
+        return NativePtr->hasNext( );
+      }
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/SelectResultsIteratorM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/SelectResultsIteratorM.hpp b/geode-client-native/src/clicache/SelectResultsIteratorM.hpp
new file mode 100644
index 0000000..ec40a51
--- /dev/null
+++ b/geode-client-native/src/clicache/SelectResultsIteratorM.hpp
@@ -0,0 +1,120 @@
+/*=========================================================================
+ * 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/SelectResultsIterator.hpp"
+#include "impl/NativeWrapper.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      interface class IGFSerializable;
+
+      /// <summary>
+      /// Iterator for a query result.
+      /// </summary>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class SelectResultsIterator sealed
+        : public Internal::UMWrap<gemfire::SelectResultsIterator>,
+        public System::Collections::Generic::IEnumerator<IGFSerializable^>
+      {
+      public:
+
+        /// <summary>
+        /// Gets the element in the collection at the current
+        /// position of the enumerator.
+        /// </summary>
+        /// <returns>
+        /// The element in the collection at the current position
+        /// of the enumerator.
+        /// </returns>
+        virtual property IGFSerializable^ Current
+        {
+          virtual IGFSerializable^ get( );
+        }
+
+        /// <summary>
+        /// Advances the enumerator to the next element of the collection.
+        /// </summary>
+        /// <returns>
+        /// true if the enumerator was successfully advanced to the next
+        /// element; false if the enumerator has passed the end of
+        /// the collection.
+        /// </returns>
+        virtual bool MoveNext( );
+
+        /// <summary>
+        /// Sets the enumerator to its initial position, which is before
+        /// the first element in the collection.
+        /// </summary>
+        virtual void Reset( );
+
+        /// <summary>
+        /// Get the current element and move to the next one.
+        /// </summary>
+        IGFSerializable^ Next( );
+
+        /// <summary>
+        /// Check if there is a next element.
+        /// </summary>
+        property bool HasNext
+        {
+          bool 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 SelectResultsIterator^ Create(
+          gemfire::SelectResultsIterator* nativeptr )
+        {
+          return ( nativeptr != nullptr ?
+            gcnew SelectResultsIterator( nativeptr ) : nullptr );
+        }
+
+
+      private:
+
+        virtual property Object^ ICurrent
+        {
+          virtual Object^ get( ) sealed
+            = System::Collections::IEnumerator::Current::get
+          {
+            return Current;
+          }
+        }
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline SelectResultsIterator(
+          gemfire::SelectResultsIterator* nativeptr )
+          : UMWrap( nativeptr, true ) { }
+      };
+
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/SerializableM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/SerializableM.cpp b/geode-client-native/src/clicache/SerializableM.cpp
new file mode 100644
index 0000000..bee2e06
--- /dev/null
+++ b/geode-client-native/src/clicache/SerializableM.cpp
@@ -0,0 +1,279 @@
+/*=========================================================================
+ * 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 "cppcache/impl/SerializationRegistry.hpp"
+
+#include "gf_includes.hpp"
+#include "SerializableM.hpp"
+#include "impl/DelegateWrapper.hpp"
+#include "com/vmware/impl/DelegateWrapperN.hpp"
+#include "DataOutputM.hpp"
+#include "DataInputM.hpp"
+#include "CacheableStringM.hpp"
+#include "CacheableStringArrayM.hpp"
+
+#include "LogM.hpp"
+
+#include "CacheableBuiltinsM.hpp"
+#include "ExceptionTypesM.hpp"
+#include "impl/SafeConvert.hpp"
+#include <cppcache/impl/GemfireTypeIdsImpl.hpp>
+#include "com/vmware/CacheableHashMapMN.hpp"
+#include "com/vmware/CacheableHashTableMN.hpp"
+#include "CacheableArrayListM.hpp" 
+#include "PropertiesM.hpp"
+
+using namespace System;
+//using namespace System::Collections::Generic;
+
+using namespace gemfire;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+      void GemStone::GemFire::Cache::Serializable::ToData(GemStone::GemFire::Cache::DataOutput^ output)
+      {
+        gemfire::DataOutput* nativeOutput =
+          GetNativePtr<gemfire::DataOutput>(output);
+        NativePtr->toData(*nativeOutput);        
+      }
+      GemStone::GemFire::Cache::IGFSerializable^ GemStone::GemFire::Cache::Serializable::FromData(GemStone::GemFire::Cache::DataInput^ input)
+      {
+        gemfire::DataInput* nativeInput =
+          GetNativePtr<gemfire::DataInput>(input);
+        AssignSP(NativePtr->fromData(*nativeInput));
+        return this;
+      }
+
+      uint32_t GemStone::GemFire::Cache::Serializable::ObjectSize::get()
+      {
+        return NativePtr->objectSize();
+      }
+
+      uint32_t GemStone::GemFire::Cache::Serializable::ClassId::get()
+      {
+        int8_t typeId = NativePtr->typeId();
+        if (typeId == gemfire::GemfireTypeIdsImpl::CacheableUserData ||
+             typeId == gemfire::GemfireTypeIdsImpl::CacheableUserData2 ||
+             typeId == gemfire::GemfireTypeIdsImpl::CacheableUserData4) {
+          return NativePtr->classId();
+        } else {
+          return typeId + 0x80000000 + (0x20000000 * NativePtr->DSFID());
+        }
+      }
+
+      String^ GemStone::GemFire::Cache::Serializable::ToString()
+      {
+        gemfire::CacheableStringPtr& cStr = NativePtr->toString();
+        if (cStr->isWideString()) {
+          return ManagedString::Get(cStr->asWChar());
+        } else {
+          return ManagedString::Get(cStr->asChar());
+        }
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (Byte value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^) GemStone::GemFire::Cache::CacheableByte::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (bool value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableBoolean::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<bool>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::BooleanArray::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<Byte>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableBytes::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (Char value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)CacheableCharacter::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<Char>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CharArray::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (Double value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableDouble::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<Double>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableDoubleArray::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (Single value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableFloat::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<Single>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableFloatArray::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (int16_t value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableInt16::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<int16_t>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableInt16Array::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (int32_t value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)CacheableInt32::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<int32_t>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableInt32Array::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (int64_t value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableInt64::Create(value);
+      }
+
+      /*GemStone::GemFire::Cache::*/Serializable::operator /*GemStone::GemFire::Cache::*/Serializable^ (array<int64_t>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableInt64Array::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (String^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableString::Create(value);
+      }
+
+      GemStone::GemFire::Cache::Serializable::operator GemStone::GemFire::Cache::Serializable^ (array<String^>^ value)
+      {
+        return (GemStone::GemFire::Cache::Serializable^)GemStone::GemFire::Cache::CacheableStringArray::Create(value);
+      }
+
+      void GemStone::GemFire::Cache::Serializable::RegisterType(TypeFactoryMethod^ creationMethod)
+      {
+        if (creationMethod == nullptr) {
+          throw gcnew IllegalArgumentException("Serializable.RegisterType(): "
+            "null TypeFactoryMethod delegate passed");
+        }
+
+        //--------------------------------------------------------------
+        
+        //adding user type as well in global builtin hashmap
+        int64_t classId = ((int64_t)creationMethod()->ClassId);
+        if (!ManagedDelegates->ContainsKey(classId))
+          ManagedDelegates->Add(classId, creationMethod);
+
+        DelegateWrapper^ delegateObj = gcnew DelegateWrapper(creationMethod);
+        TypeFactoryNativeMethod^ nativeDelegate =
+          gcnew TypeFactoryNativeMethod(delegateObj,
+          &DelegateWrapper::NativeDelegate);
+
+        // this is avoid object being Gced
+        NativeDelegates->Add(nativeDelegate);
+        
+        // register the type in the DelegateMap, this is pure c# for create domain object 
+        IGFSerializable^ tmp = creationMethod();
+        Log::Fine("Registering serializable class ID " + tmp->ClassId +
+          ", AppDomain ID " + System::Threading::Thread::GetDomainID());
+        DelegateMap[tmp->ClassId] = creationMethod;
+
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::Serializable::registerType((gemfire::TypeFactoryMethod)
+            System::Runtime::InteropServices::Marshal::
+            GetFunctionPointerForDelegate(nativeDelegate).ToPointer());
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      void GemStone::GemFire::Cache::Serializable::RegisterType(Byte typeId,
+        TypeFactoryMethod^ creationMethod)
+      {
+        if (creationMethod == nullptr) {
+          throw gcnew IllegalArgumentException("Serializable.RegisterType(): "
+            "null TypeFactoryMethod delegate passed");
+        }
+        DelegateWrapper^ delegateObj = gcnew DelegateWrapper(creationMethod);
+        TypeFactoryNativeMethod^ nativeDelegate =
+          gcnew TypeFactoryNativeMethod(delegateObj,
+          &DelegateWrapper::NativeDelegate);
+
+        BuiltInDelegates[typeId] = nativeDelegate;
+
+          //This is hashmap for manged builtin objects
+        if (!ManagedDelegates->ContainsKey(typeId + 0x80000000))
+          ManagedDelegates->Add(typeId + 0x80000000, creationMethod);
+
+        // register the type in the DelegateMap
+        IGFSerializable^ tmp = creationMethod();
+        Log::Finer("Registering(,) serializable class ID " + tmp->ClassId +
+          ", AppDomain ID " + System::Threading::Thread::GetDomainID());
+        DelegateMap[tmp->ClassId] = creationMethod;
+
+        try
+        {
+          gemfire::SerializationRegistry::addType(typeId,
+            (gemfire::TypeFactoryMethod)System::Runtime::InteropServices::
+            Marshal::GetFunctionPointerForDelegate(
+            nativeDelegate).ToPointer());
+
+        }catch(gemfire::IllegalStateException&)
+        {
+          //ignore it as this is internal only
+        }
+      }
+
+      void GemStone::GemFire::Cache::Serializable::UnregisterType(Byte typeId)
+      {
+        BuiltInDelegates->Remove(typeId);
+        _GF_MG_EXCEPTION_TRY
+
+          gemfire::SerializationRegistry::removeType(typeId);
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      void GemStone::GemFire::Cache::Serializable::RegisterWrapper(WrapperDelegate^ wrapperMethod,
+        Byte typeId)
+      {
+        if (typeId < 0 || typeId > WrapperEnd)
+        {
+          throw gcnew GemFireException("The TypeID (" + typeId + ") being "
+            "registered is beyond acceptable range of 0-" + WrapperEnd);
+        }
+        NativeWrappers[typeId] = wrapperMethod;
+      }
+
+      void GemStone::GemFire::Cache::Serializable::UnregisterNatives()
+      {
+        BuiltInDelegates->Clear();
+        for (Byte typeId = 0; typeId <= WrapperEnd; ++typeId) {
+          NativeWrappers[typeId] = nullptr;
+        }
+         //TODO::Hitesh unregister from managed hashmap as well.
+      //  ManagedDelegates->Clear();
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/SerializableM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/SerializableM.hpp b/geode-client-native/src/clicache/SerializableM.hpp
new file mode 100644
index 0000000..885cf9a
--- /dev/null
+++ b/geode-client-native/src/clicache/SerializableM.hpp
@@ -0,0 +1,631 @@
+/*=========================================================================
+ * 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/CacheableKey.hpp"
+#include "cppcache/CacheableBuiltins.hpp"
+#include "IGFSerializable.hpp"
+#include "IGFDelta.hpp"
+#include "impl/ManagedString.hpp"
+#include "impl/NativeWrapper.hpp"
+#include "LogM.hpp"
+#include <vcclr.h>
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+      /// <summary>
+      /// Signature of native function delegates passed to native
+      /// <c>gemfire::Serializable::registerType</c>.
+      /// Such functions should return an empty instance of the type they
+      /// represent. The instance will typically be initialized immediately
+      /// after creation by a call to native
+      /// <c>gemfire::Serializable::fromData</c>.
+      /// </summary>
+      delegate gemfire::Serializable* TypeFactoryNativeMethod();
+
+      /// <summary>
+      /// Signature of function delegates passed to
+      /// <see cref="Serializable.RegisterType" />. Such functions should
+      /// return an empty instance of the type they represent.
+      /// The delegate shall be stored in the internal <c>DelegateWrapper</c>
+      /// class and an instance will be initialized in the
+      /// <c>DelegateWrapper.NativeDelegate</c> method by a call to
+      /// <see cref="IGFSerializable.FromData" />.
+      /// </summary>
+      public delegate GemStone::GemFire::Cache::IGFSerializable^ TypeFactoryMethod();
+      /// <summary>
+      /// Delegate to wrap a native <c>gemfire::Serializable</c> type.
+      /// </summary>
+      /// <remarks>
+      /// This delegate should return an object of type <c>IGFSerializable</c>
+      /// given a native object.
+      /// </remarks>
+      delegate GemStone::GemFire::Cache::IGFSerializable^ WrapperDelegate(gemfire::Serializable* obj);
+
+      /// <summary>
+      /// This class wraps the native C++ <c>gemfire::Serializable</c> objects
+      /// as managed <see cref="IGFSerializable" /> objects.
+      /// </summary>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class Serializable
+        : public Internal::SBWrap<gemfire::Serializable>,
+        public /*GemStone::GemFire::Cache::*/IGFSerializable
+      {
+      public:
+        /// <summary>
+        /// Serializes this native (C++) object.
+        /// </summary>
+        /// <param name="output">
+        /// the DataOutput object to use for serializing the object
+        /// </param>
+        virtual void ToData(GemStone::GemFire::Cache::DataOutput^ output);
+
+        /// <summary>
+        /// Deserializes the native (C++) object -- returns an instance of the
+        /// <c>Serializable</c> class with the native object wrapped inside.
+        /// </summary>
+        /// <param name="input">
+        /// the DataInput stream to use for reading the object data
+        /// </param>
+        /// <returns>the deserialized object</returns>
+        virtual GemStone::GemFire::Cache::IGFSerializable^ FromData(GemStone::GemFire::Cache::DataInput^ input);
+        
+        /// <summary>
+        /// return the size of this object in bytes
+        /// </summary>
+        virtual property uint32_t ObjectSize
+        {
+          virtual uint32_t get(); 
+        }
+
+        /// <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();
+        }
+
+        /// <summary>
+        /// Return a string representation of the object.
+        /// It simply returns the string representation of the underlying
+        /// native object by calling its <c>toString()</c> function.
+        /// </summary>
+        virtual String^ ToString() override;
+
+        // Static conversion function from primitive types string, integer
+        // and byte array.
+
+        /// <summary>
+        /// Implicit conversion operator from a boolean
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (bool value);
+
+        /// <summary>
+        /// Implicit conversion operator from a byte
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (Byte value);
+
+        /// <summary>
+        /// Implicit conversion operator from an array of bytes
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<Byte>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from an boolean array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<bool>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a double
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (Double value);
+
+        /// <summary>
+        /// Implicit conversion operator from a double array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<Double>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a float
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (Single value);
+
+        /// <summary>
+        /// Implicit conversion operator from a float array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<Single>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a 16-bit integer
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (int16_t value);
+
+        /// <summary>
+        /// Implicit conversion operator from a character
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (Char value);
+
+        /// <summary>
+        /// Implicit conversion operator from a character array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<Char>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a 16-bit integer array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<int16_t>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a 32-bit integer
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (int32_t value);
+
+        /// <summary>
+        /// Implicit conversion operator from a 32-bit integer array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<int32_t>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a 64-bit integer
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator /*GemStone::GemFire::Cache::*/Serializable^ (int64_t value);
+
+        /// <summary>
+        /// Implicit conversion operator from a 64-bit integer array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<int64_t>^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a string
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (String^ value);
+
+        /// <summary>
+        /// Implicit conversion operator from a string array
+        /// to a <c>Serializable</c>.
+        /// </summary>
+        static operator GemStone::GemFire::Cache::Serializable^ (array<String^>^ value);
+
+        /// <summary>
+        /// Register an instance factory method for a given type.
+        /// This should be used when registering types that implement
+        /// IGFSerializable.
+        /// </summary>
+        /// <param name="creationMethod">
+        /// the creation function to register
+        /// </param>
+        /// <exception cref="IllegalArgumentException">
+        /// if the method is null
+        /// </exception>
+        /// <exception cref="IllegalStateException">
+        /// if the typeId has already been registered, or there is an error
+        /// in registering the type; check <c>Utils::LastError</c> for more
+        /// information in the latter case.
+        /// </exception>
+        static void RegisterType(TypeFactoryMethod^ creationMethod);
+
+      internal:
+
+        // These are the new static methods to get/put data from c++
+
+        //byte
+        static Byte getByte(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableByte* ci = static_cast<gemfire::CacheableByte*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableByte(Byte val)
+        {
+          return gemfire::CacheableByte::create(val);
+        }
+
+        //boolean
+        static bool getBoolean(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableBoolean* ci = static_cast<gemfire::CacheableBoolean*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableBoolean(bool val)
+        {
+          return gemfire::CacheableBoolean::create(val);
+        }
+
+        //widechar
+        static Char getChar(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableWideChar* ci = static_cast<gemfire::CacheableWideChar*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableWideChar(Char val)
+        {
+          return gemfire::CacheableWideChar::create(val);
+        }
+
+        //double
+        static double getDouble(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableDouble* ci = static_cast<gemfire::CacheableDouble*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableDouble(double val)
+        {
+          return gemfire::CacheableDouble::create(val);
+        }
+
+        //float
+        static float getFloat(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableFloat* ci = static_cast<gemfire::CacheableFloat*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableFloat(float val)
+        {
+          return gemfire::CacheableFloat::create(val);
+        }
+
+        //int16
+        static int16 getInt16(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableInt16* ci = static_cast<gemfire::CacheableInt16*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableInt16(int val)
+        {
+          return gemfire::CacheableInt16::create(val);
+        }
+
+        //int32
+        static int32 getInt32(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableInt32* ci = static_cast<gemfire::CacheableInt32*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableInt32(int32 val)
+        {
+          return gemfire::CacheableInt32::create(val);
+        }
+
+        //int64
+        static int64 getInt64(gemfire::SerializablePtr nativeptr)
+        {
+          gemfire::CacheableInt64* ci = static_cast<gemfire::CacheableInt64*>(nativeptr.ptr());
+          return ci->value();
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableInt64(int64 val)
+        {
+          return gemfire::CacheableInt64::create(val);
+        }
+
+        //cacheable ascii string
+        static String^ getASCIIString(gemfire::SerializablePtr nativeptr)
+        {
+          //gemfire::CacheableString* ci = static_cast<gemfire::CacheableString*>(nativeptr.ptr());          
+          //return GetString(ci);
+          return GetString(nativeptr->toString());
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableASCIIString(String^ val)
+        {
+          return GetCacheableString(val);
+        }
+
+        //cacheable ascii string huge
+        static String^ getASCIIStringHuge(gemfire::SerializablePtr nativeptr)
+        {
+          //gemfire::CacheableString* ci = static_cast<gemfire::CacheableString*>(nativeptr.ptr());          
+          //return GetString(ci);
+          return GetString(nativeptr->toString());
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableASCIIStringHuge(String^ val)
+        {
+          return GetCacheableString(val);
+        }
+
+        //cacheable string
+        static String^ getUTFString(gemfire::SerializablePtr nativeptr)
+        {
+          //gemfire::CacheableString* ci = static_cast<gemfire::CacheableString*>(nativeptr.ptr());          
+          //return GetString(ci);
+          return GetString(nativeptr->toString());
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableUTFString(String^ val)
+        {
+          return GetCacheableString(val);
+        }
+
+        //cacheable string huge
+        static String^ getUTFStringHuge(gemfire::SerializablePtr nativeptr)
+        {
+          //gemfire::CacheableString* ci = static_cast<gemfire::CacheableString*>(nativeptr.ptr());
+          //return GetString(ci);
+          return GetString(nativeptr->toString());
+        }
+
+        static gemfire::CacheableKeyPtr getCacheableUTFStringHuge(String^ val)
+        {
+          return GetCacheableString(val);
+        }
+
+       static gemfire::CacheableStringPtr GetCacheableString(String^ value)
+       {
+          gemfire::CacheableStringPtr cStr;
+          size_t len = 0;
+          if (value != nullptr) {
+            len = value->Length;
+            pin_ptr<const wchar_t> pin_value = PtrToStringChars(value);
+            cStr = gemfire::CacheableString::create(pin_value, static_cast<int32_t> (len));
+          }
+          else {
+            cStr = (gemfire::CacheableString*)
+              gemfire::CacheableString::createDeserializable();
+          }
+
+          return cStr;
+        }
+
+        static String^ GetString(gemfire::CacheableStringPtr cStr)//gemfire::CacheableString*
+        {
+          if (cStr == NULLPTR) {
+            return nullptr;
+          }
+          else if (cStr->isWideString()) {
+            return ManagedString::Get(cStr->asWChar());
+          }
+          else {
+            return ManagedString::Get(cStr->asChar());
+          }
+        }
+
+        static array<Byte>^ getSByteArray(array<SByte>^ sArray)
+        {
+          array<Byte>^ dArray = gcnew array<Byte>(sArray->Length);
+          for (int index = 0; index < dArray->Length; index++) 
+          {
+            dArray[index] = sArray[index];
+          }          
+          return dArray;
+        }
+
+        static array<int16_t>^ getInt16Array(array<uint16_t>^ sArray)
+        {
+          array<int16_t>^ dArray = gcnew array<int16_t>(sArray->Length);
+          for (int index = 0; index < dArray->Length; index++) 
+          {
+            dArray[index] = sArray[index];
+          }          
+          return dArray;
+        }
+
+        static array<int32_t>^ getInt32Array(array<uint32_t>^ sArray)
+        {
+          array<int32_t>^ dArray = gcnew array<int32_t>(sArray->Length);
+          for (int index = 0; index < dArray->Length; index++) 
+          {
+            dArray[index] = sArray[index];
+          }          
+          return dArray;
+        }
+
+        static array<int64_t>^ getInt64Array(array<uint64_t>^ sArray)
+        {
+          array<int64_t>^ dArray = gcnew array<int64_t>(sArray->Length);
+          for (int index = 0; index < dArray->Length; index++) 
+          {
+            dArray[index] = sArray[index];
+          }          
+          return dArray;
+        }
+
+        /// <summary>
+        /// Default constructor.
+        /// </summary>
+        inline GemStone::GemFire::Cache::Serializable()
+          : SBWrap() { }
+
+        /// <summary>
+        /// Internal constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline GemStone::GemFire::Cache::Serializable(gemfire::Serializable* nativeptr)
+          : SBWrap(nativeptr) { }
+
+        /// <summary>
+        /// Register an instance factory method for a given type and typeId.
+        /// This should be used when registering types that implement
+        /// IGFSerializable.
+        /// </summary>
+        /// <param name="typeId">typeId of the type being registered.</param>
+        /// <param name="creationMethod">
+        /// the creation function to register
+        /// </param>
+        /// <exception cref="IllegalArgumentException">
+        /// if the method is null
+        /// </exception>
+        static void RegisterType(Byte typeId,
+          TypeFactoryMethod^ creationMethod);
+
+        /// <summary>
+        /// Unregister the type with the given typeId
+        /// </summary>
+        /// <param name="typeId">typeId of the type to unregister.</param>
+        static void UnregisterType(Byte typeId);
+
+        /// <summary>
+        /// Used to assign the native Serializable pointer to a new object.
+        /// </summary>
+        /// <remarks>
+        /// Note the order of preserveSB() and releaseSB(). This handles the
+        /// corner case when <c>m_nativeptr</c> is same as <c>nativeptr</c>.
+        /// </remarks>
+        inline void AssignSP(gemfire::Serializable* nativeptr)
+        {
+          AssignPtr(nativeptr);
+        }
+
+        /// <summary>
+        /// Used to assign the native Serializable pointer to a new object.
+        /// </summary>
+        inline void SetSP(gemfire::Serializable* nativeptr)
+        {
+          if (nativeptr != nullptr) {
+            nativeptr->preserveSB();
+          }
+          _SetNativePtr(nativeptr);
+        }
+
+        /// <summary>
+        /// Static list of <c>TypeFactoryNativeMethod</c> delegates created
+        /// from registered managed <c>TypeFactoryMethod</c> delegates.
+        /// This is so that the underlying managed objects do not get GCed.
+        /// </summary>
+        static List<TypeFactoryNativeMethod^>^ NativeDelegates =
+          gcnew List<TypeFactoryNativeMethod^>();
+
+        /// <summary>
+        /// Static map of <c>TypeFactoryMethod</c> delegates created
+        /// from registered managed <c>TypeFactoryMethod</c> delegates.
+        /// This is for cross AppDomain object creations.
+        /// </summary>
+        static Dictionary<UInt32, TypeFactoryMethod^>^ DelegateMap =
+          gcnew Dictionary<UInt32, TypeFactoryMethod^>();
+
+        static Dictionary<UInt32, TypeFactoryMethod^>^ InternalDelegateMap =
+          gcnew Dictionary<UInt32, TypeFactoryMethod^>();
+
+        static TypeFactoryMethod^ GetTypeFactoryMethod(UInt32 classid)
+        {
+          Log::Fine("TypeFactoryMethod type id " + classid + " domainid :" + System::Threading::Thread::GetDomainID() );
+          if(DelegateMap->ContainsKey(classid) )
+            return DelegateMap[classid];
+          else
+            return InternalDelegateMap[classid];//builtin types
+        }
+
+        /// <summary>
+        /// Static map of <c>TypeFactoryNativeMethod</c> delegates created
+        /// for builtin managed <c>TypeFactoryMethod</c> delegates.
+        /// This is so that the underlying managed objects do not get GCed.
+        /// </summary>
+        static Dictionary<Byte, TypeFactoryNativeMethod^>^ BuiltInDelegates =
+          gcnew Dictionary<Byte, TypeFactoryNativeMethod^>();
+
+        /// <summary>
+        /// Static map of <c>TypeFactoryMethod</c> delegates created
+        /// for managed <c>TypeFactoryMethod</c> delegates.
+        /// </summary>
+        static Dictionary<int64_t, TypeFactoryMethod^>^ ManagedDelegates =
+          gcnew Dictionary<int64_t, TypeFactoryMethod^>();
+
+        /// <summary>
+        /// This is to get manged delegates.
+        /// </summary>
+        static TypeFactoryMethod^ GetManagedDelegate(int64_t typeId)
+        {
+          if (ManagedDelegates->ContainsKey(typeId))
+            return (TypeFactoryMethod^)ManagedDelegates[typeId];
+          else
+            return nullptr;
+        }
+
+        /// <summary>
+        /// Static array of managed <c>WrapperDelegate</c> delegates that
+        /// maintains a mapping of built-in native typeIds to their corresponding
+        /// wrapper type delegates.
+        /// </summary>
+        /// <remarks>
+        /// This is as an array to make lookup as fast as possible, taking
+        /// advantage of the fact that the range of wrapped built-in typeIds is
+        /// small. <b>IMPORTANT:</b> If the built-in native typeIds encompass a
+        /// greater range then change <c>WrapperEnd</c> in this accordingly
+        /// or move to using a Dictionary instead.
+        /// </remarks>
+        static array<WrapperDelegate^>^ NativeWrappers =
+          gcnew array<WrapperDelegate^>(WrapperEnd + 1);
+        literal Byte WrapperEnd = 128;
+
+        /// <summary>
+        /// Static method to register a managed wrapper for a native
+        /// <c>gemfire::Serializable</c> type.
+        /// </summary>
+        /// <param name="wrapperMethod">
+        /// A factory delegate of the managed wrapper class that returns the
+        /// managed object given the native object.
+        /// </param>
+        /// <param name="typeId">The typeId of the native type.</param>
+        /// <seealso cref="NativeWrappers" />
+        static void RegisterWrapper(WrapperDelegate^ wrapperMethod,
+          Byte typeId);
+
+        /// <summary>
+        /// Internal static method to remove managed artifacts created by
+        /// RegisterType and RegisterWrapper methods when
+        /// <see cref="DistributedSystem.Disconnect" /> is called.
+        /// </summary>
+        static void UnregisterNatives();
+
+        /// <summary>
+        /// Static method to lookup the wrapper delegate for a given typeId.
+        /// </summary>
+        /// <param name="typeId">
+        /// The typeId of the native <c>gemfire::Serializable</c> type.
+        /// </param>
+        /// <returns>
+        /// If a managed wrapper is registered for the given typeId then the
+        /// wrapper delegate is returned, else this returns null.
+        /// </returns>
+        inline static WrapperDelegate^ GetWrapper(Byte typeId)
+        {
+          if (typeId >= 0 && typeId <= WrapperEnd) {
+            return NativeWrappers[typeId];
+          }
+          return nullptr;
+        }
+      };
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/StatisticDescriptorM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/StatisticDescriptorM.cpp b/geode-client-native/src/clicache/StatisticDescriptorM.cpp
new file mode 100644
index 0000000..7ec4182
--- /dev/null
+++ b/geode-client-native/src/clicache/StatisticDescriptorM.cpp
@@ -0,0 +1,51 @@
+/*=========================================================================
+ * 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 "StatisticDescriptorM.hpp"
+#include "impl/ManagedString.hpp"
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+
+      int32_t StatisticDescriptor::ID::get( )
+      {
+        return  NativePtr->getId();
+      }
+
+      String^ StatisticDescriptor::Name::get( )
+      {
+        return ManagedString::Get( NativePtr->getName() );
+      }
+
+      String^ StatisticDescriptor::Description::get( )
+      {
+        return ManagedString::Get( NativePtr->getDescription() );
+      }
+
+      int8_t StatisticDescriptor::IsCounter::get( )
+      {
+        return NativePtr->isCounter();
+      }
+
+      int8_t StatisticDescriptor::IsLargerBetter::get( )
+      {
+        return NativePtr->isLargerBetter();
+      }
+
+      String^ StatisticDescriptor::Unit::get( )
+      {
+        return ManagedString::Get( NativePtr->getUnit() );
+      }
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/StatisticDescriptorM.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/StatisticDescriptorM.hpp b/geode-client-native/src/clicache/StatisticDescriptorM.hpp
new file mode 100644
index 0000000..8b747f0
--- /dev/null
+++ b/geode-client-native/src/clicache/StatisticDescriptorM.hpp
@@ -0,0 +1,116 @@
+/*=========================================================================
+ * 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 "impl/NativeWrapper.hpp"
+#include "cppcache/statistics/StatisticDescriptor.hpp"
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+      /// <summary>
+      /// A class that describes an individual statistic whose value is updated by an
+      /// application and may be archived by GemFire. These descriptions are gathered
+      /// together in a <see cref="StatisticsType" /> class.
+      /// </summary>
+      /// <para>
+      /// To get an instance of this interface use an instance of
+      /// <see cref="StatisticsFactory" /> class.
+      /// </para>
+      /// <para>
+      /// StatisticDescriptors are naturally ordered by their name.
+      /// </para>
+      [Obsolete("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
+      public ref class StatisticDescriptor sealed
+        : public Internal::UMWrap<gemfire_statistics::StatisticDescriptor>
+       {
+         public:
+           /// <summary>
+           /// Returns the id of this statistic in a <see cref="StatisticsType" /> class.
+           /// The id is initialized when its statistics
+           /// type is created.
+           /// </summary>
+           virtual property int32_t ID
+           {
+             virtual int32_t get( );
+           }
+
+           /// <summary>
+           /// Returns the name of this statistic
+           /// </summary>
+           virtual property String^ Name
+           {
+             virtual String^ get( );
+           }
+
+           /// <summary>
+           /// Returns the description of this statistic
+           /// </summary>
+           virtual property String^ Description
+           {
+             virtual String^ get( );
+           }
+
+           /// <summary>
+           /// Returns true if this statistic is a counter; false if its a gauge.
+           /// Counter statistics have values that always increase.
+           /// Gauge statistics have unconstrained values.
+           /// </summary>
+           virtual property int8_t IsCounter
+           {
+             virtual int8_t get( );
+           }
+
+           /// <summary>
+           /// Returns true if a larger statistic value indicates better performance.
+           /// </summary>
+           virtual property int8_t IsLargerBetter
+           {
+             virtual int8_t get( );
+           }
+
+           /// <summary>
+           /// Returns the unit in which this statistic is measured.
+           /// </summary>
+           virtual property String^ Unit
+           {
+             virtual 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">native object pointer</param>
+           /// <returns>
+           /// the managed wrapper object, or null if the native pointer is null.
+           /// </returns>
+           inline static StatisticDescriptor^ Create(
+           gemfire_statistics::StatisticDescriptor* nativeptr )
+           {
+             return ( nativeptr != nullptr ?
+             gcnew StatisticDescriptor( nativeptr ) : nullptr );
+           }
+           
+           private:
+           /// <summary>
+           /// Private constructor to wrap a native object pointer
+           /// </summary>
+           /// <param name="nativeptr">The native object pointer</param>
+           inline StatisticDescriptor( gemfire_statistics::StatisticDescriptor* nativeptr )
+           : UMWrap( nativeptr, false ) { }
+       };      
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/StatisticsFactoryM.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/StatisticsFactoryM.cpp b/geode-client-native/src/clicache/StatisticsFactoryM.cpp
new file mode 100644
index 0000000..0352d4e
--- /dev/null
+++ b/geode-client-native/src/clicache/StatisticsFactoryM.cpp
@@ -0,0 +1,240 @@
+/*=========================================================================
+ * 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 "StatisticsFactoryM.hpp"
+#include "StatisticsTypeM.hpp"
+#include "StatisticDescriptorM.hpp"
+#include "StatisticsM.hpp"
+#include "impl/SafeConvert.hpp"
+#include "ExceptionTypesM.hpp"
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache
+    {
+      StatisticsFactory^ StatisticsFactory::GetExistingInstance()
+      {
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticsFactory::Create(gemfire_statistics::StatisticsFactory::getExistingInstance());
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateIntCounter( String^ name, String^ description,String^ units )
+      {
+        return CreateIntCounter(name,description,units,true);
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateIntCounter(String^ name, String^ description,String^ units, int8_t largerBetter)
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        ManagedString mg_units( units );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticDescriptor::Create(NativePtr->createIntCounter(mg_name.CharPtr, mg_description.CharPtr, mg_units.CharPtr, largerBetter));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateLongCounter( String^ name, String^ description,String^ units )
+      {
+        return CreateLongCounter(name,description,units,true);
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateLongCounter( String^ name, String^ description,String^ units, int8_t largerBetter )
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        ManagedString mg_units( units );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticDescriptor::Create(NativePtr->createLongCounter(mg_name.CharPtr, mg_description.CharPtr, mg_units.CharPtr, largerBetter));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }      
+        
+      StatisticDescriptor^ StatisticsFactory::CreateDoubleCounter( String^ name, String^ description, String^ units )
+      {
+        return CreateDoubleCounter(name,description,units,true);
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateDoubleCounter( String^ name, String^ description, String^ units, int8_t largerBetter )
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        ManagedString mg_units( units );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticDescriptor::Create(NativePtr->createDoubleCounter(mg_name.CharPtr, mg_description.CharPtr, mg_units.CharPtr, largerBetter));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      
+      StatisticDescriptor^ StatisticsFactory::CreateIntGauge( String^ name, String^ description, String^ units )
+      {
+        return CreateIntGauge(name,description,units,false);
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateIntGauge( String^ name, String^ description, String^ units, int8_t largerBetter )
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        ManagedString mg_units( units );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticDescriptor::Create(NativePtr->createIntGauge(mg_name.CharPtr, mg_description.CharPtr, mg_units.CharPtr, largerBetter));
+
+        _GF_MG_EXCEPTION_CATCH_ALL      
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateLongGauge( String^ name, String^ description, String^ units )
+      {
+        return CreateLongGauge(name,description,units,false);
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateLongGauge( String^ name, String^ description, String^ units, int8_t largerBetter )
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        ManagedString mg_units( units );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticDescriptor::Create(NativePtr->createLongGauge(mg_name.CharPtr, mg_description.CharPtr, mg_units.CharPtr, largerBetter));
+
+        _GF_MG_EXCEPTION_CATCH_ALL      
+      }
+      
+      StatisticDescriptor^ StatisticsFactory::CreateDoubleGauge( String^ name, String^ description, String^ units )
+      {
+        return CreateDoubleGauge(name,description,units,false);
+      }
+
+      StatisticDescriptor^ StatisticsFactory::CreateDoubleGauge( String^ name, String^ description, String^ units,int8_t largerBetter )
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        ManagedString mg_units( units );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticDescriptor::Create(NativePtr->createDoubleGauge(mg_name.CharPtr, mg_description.CharPtr, mg_units.CharPtr, largerBetter));
+
+        _GF_MG_EXCEPTION_CATCH_ALL      
+      }
+
+      StatisticsType^ StatisticsFactory::CreateType( String^ name, String^ description,
+                                   array<StatisticDescriptor^>^ stats, int32 statsLength)
+      {
+        ManagedString mg_name( name );
+        ManagedString mg_description( description );
+        _GF_MG_EXCEPTION_TRY
+                
+          gemfire_statistics::StatisticDescriptor ** nativedescriptors = new gemfire_statistics::StatisticDescriptor*[statsLength];
+          for (int32_t index = 0; index < statsLength; index++)
+          {
+            nativedescriptors[index] = GetNativePtr<gemfire_statistics::StatisticDescriptor>(stats[index]);
+          }
+          return GemStone::GemFire::Cache::StatisticsType::Create(NativePtr->createType(mg_name.CharPtr, mg_description.CharPtr, nativedescriptors, statsLength));
+          
+        _GF_MG_EXCEPTION_CATCH_ALL     
+      }
+
+      StatisticsType^ StatisticsFactory::FindType(String^ name)
+      {
+        ManagedString mg_name( name );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::StatisticsType::Create(NativePtr->findType(mg_name.CharPtr));
+
+        _GF_MG_EXCEPTION_CATCH_ALL     
+      }
+
+      Statistics^ StatisticsFactory::CreateStatistics(StatisticsType^ type)
+      {
+        _GF_MG_EXCEPTION_TRY
+         
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->createStatistics(GetNativePtr<gemfire_statistics::StatisticsType>(type)));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Statistics^ StatisticsFactory::CreateStatistics(StatisticsType^ type, String^ textId)
+      {
+        ManagedString mg_text( textId );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->createStatistics(GetNativePtr<gemfire_statistics::StatisticsType>(type),(char*)mg_text.CharPtr));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Statistics^ StatisticsFactory::CreateStatistics(StatisticsType^ type, String^ textId, int64_t numericId)
+      {
+        ManagedString mg_text( textId );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->createStatistics(GetNativePtr<gemfire_statistics::StatisticsType>(type),(char*)mg_text.CharPtr, numericId));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Statistics^ StatisticsFactory::CreateAtomicStatistics(StatisticsType^ type)
+      {
+        _GF_MG_EXCEPTION_TRY
+         
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->createAtomicStatistics(GetNativePtr<gemfire_statistics::StatisticsType>(type)));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Statistics^ StatisticsFactory::CreateAtomicStatistics(StatisticsType^ type, String^ textId)
+      {
+        ManagedString mg_text( textId );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->createAtomicStatistics(GetNativePtr<gemfire_statistics::StatisticsType>(type),(char*)mg_text.CharPtr));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      Statistics^ StatisticsFactory::CreateAtomicStatistics(StatisticsType^ type, String^ textId, int64_t numericId)
+      {
+        ManagedString mg_text( textId );
+        _GF_MG_EXCEPTION_TRY
+
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->createAtomicStatistics(GetNativePtr<gemfire_statistics::StatisticsType>(type),(char*)mg_text.CharPtr, numericId));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+      Statistics^ StatisticsFactory::FindFirstStatisticsByType( StatisticsType^ type )
+      {
+        _GF_MG_EXCEPTION_TRY
+         
+          return GemStone::GemFire::Cache::Statistics::Create(NativePtr->findFirstStatisticsByType(GetNativePtr<gemfire_statistics::StatisticsType>(type)));
+
+        _GF_MG_EXCEPTION_CATCH_ALL
+      }
+
+      String^ StatisticsFactory::Name::get( )
+      {
+        return ManagedString::Get( NativePtr->getName() );
+      }
+
+      int64_t StatisticsFactory::ID::get( )
+      {
+        return  NativePtr->getId();
+      }
+    }
+  }
+}
+


Mime
View raw message