You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rv...@apache.org on 2016/05/19 15:14:10 UTC

[03/51] [partial] incubator-geode git commit: Add source for geode c++ and .net clients

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CacheableVectorMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CacheableVectorMN.hpp b/geode-client-native/src/clicache/com/vmware/CacheableVectorMN.hpp
new file mode 100644
index 0000000..c0d3cad
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CacheableVectorMN.hpp
@@ -0,0 +1,126 @@
+/*=========================================================================
+ * 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 "IGFSerializableN.hpp"
+#include "GemFireClassIdsMN.hpp"
+
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+      /// <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>
+      ref class CacheableVector
+        : public IGFSerializable
+      {
+      public:
+        /// <summary>
+        /// Allocates a new empty instance.
+        /// </summary>
+        inline CacheableVector(System::Collections::IList^ arrayList)          
+        { 
+          m_arrayList = arrayList;
+        }
+
+        
+        /// <summary>
+        /// Static function to create a new empty instance.
+        /// </summary>
+        inline static CacheableVector^ Create()
+        {
+          return gcnew CacheableVector(gcnew System::Collections::ArrayList());
+        }
+
+        /// <summary>
+        /// Static function to create a new empty instance.
+        /// </summary>
+        inline static CacheableVector^ Create(System::Collections::IList^ list)
+        {
+          return gcnew CacheableVector(list);
+        }
+
+        
+        // Region: IGFSerializable Members
+
+        /// <summary>
+        /// Serializes this object.
+        /// </summary>
+        /// <param name="output">
+        /// the DataOutput object to use for serializing the object
+        /// </param>
+        virtual void ToData(DataOutput^ output);
+
+        /// <summary>
+        /// Deserialize this object, typical implementation should return
+        /// the 'this' pointer.
+        /// </summary>
+        /// <param name="input">
+        /// the DataInput stream to use for reading the object data
+        /// </param>
+        /// <returns>the deserialized object</returns>
+        virtual IGFSerializable^ FromData(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()
+          {
+            return GemFireClassIds::CacheableVector;
+          }
+        }
+
+        virtual property System::Collections::IList^ Value
+        {
+          virtual System::Collections::IList^ get()
+          {
+            return m_arrayList;
+          }
+        }
+
+        // End Region: IGFSerializable Members
+
+        /// <summary>
+        /// Factory function to register this class.
+        /// </summary>
+        static IGFSerializable^ CreateDeserializable()
+        {
+          return gcnew CacheableVector(gcnew System::Collections::ArrayList());
+        }
+
+        private:
+          System::Collections::IList^ m_arrayList; 
+      };
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.cpp b/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.cpp
new file mode 100644
index 0000000..06f0cf0
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.cpp
@@ -0,0 +1,133 @@
+/*=========================================================================
+* 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_includesN.hpp"
+#include "CqAttributesFactoryMN.hpp"
+#include "impl/ManagedCqListenerN.hpp"
+#include "ICqListenerN.hpp"
+#include "impl/ManagedCqStatusListenerN.hpp"
+#include "ICqStatusListenerN.hpp"
+#include "CqAttributesMutatorMN.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+      generic<class TKey, class TResult>
+      void CqAttributesFactory<TKey, TResult>::AddCqListener(Generic::ICqListener<TKey, TResult>^ cqListener )
+      {
+        gemfire::CqListenerPtr listenerptr;
+        if ( cqListener != nullptr ) {
+          ICqStatusListener<TKey, TResult>^ cqStatusListener = 
+            dynamic_cast<ICqStatusListener<TKey, TResult>^>(cqListener);
+          if (cqStatusListener != nullptr) {
+            CqStatusListenerGeneric<TKey, TResult>^ sLstr = gcnew CqStatusListenerGeneric<TKey, TResult>();
+            sLstr->AddCqListener(cqListener);
+            listenerptr = new gemfire::ManagedCqStatusListenerGeneric(cqListener);
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey( cqListener) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[cqListener] = (IntPtr)listenerptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(cqListener, (IntPtr)listenerptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqStatusListenerGeneric*)listenerptr.ptr())->setptr(sLstr);
+          }
+          else {
+            //TODO::split
+            CqListenerGeneric<TKey, TResult>^ cqlg = gcnew CqListenerGeneric<TKey, TResult>();
+            cqlg->AddCqListener(cqListener);
+            //listenerptr = new gemfire::ManagedCqListenerGeneric((ICqListener<Object^, Object^>^)cqListener );
+            listenerptr = new gemfire::ManagedCqListenerGeneric( /*clg,*/ cqListener );
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey( cqListener) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[cqListener] = (IntPtr)listenerptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(cqListener, (IntPtr)listenerptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqListenerGeneric*)listenerptr.ptr())->setptr(cqlg);
+          }
+        }
+
+        NativePtr->addCqListener( listenerptr );
+      }
+
+      generic<class TKey, class TResult>
+      void CqAttributesFactory<TKey, TResult>::InitCqListeners(array<Generic::ICqListener<TKey, TResult>^>^ cqListeners)
+      {
+        gemfire::VectorOfCqListener vrr;
+        for( int i = 0; i < cqListeners->Length; i++ )
+        {
+          ICqStatusListener<TKey, TResult>^ lister = dynamic_cast<ICqStatusListener<TKey, TResult>^>(cqListeners[i]);
+          if (lister != nullptr) {
+            gemfire::CqStatusListenerPtr cptr(new gemfire::ManagedCqStatusListenerGeneric(
+              (ICqStatusListener<TKey, TResult>^)lister ));
+            vrr.push_back(cptr);
+            CqStatusListenerGeneric<TKey, TResult>^ cqlg = gcnew CqStatusListenerGeneric<TKey, TResult>();
+            cqlg->AddCqListener(cqListeners[i]);
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey( cqListeners[i]) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[cqListeners[i]] = (IntPtr)cptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(cqListeners[i], (IntPtr)cptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqStatusListenerGeneric*)vrr[i].ptr())->setptr(cqlg);
+          }
+          else {
+            ICqListener<TKey, TResult>^ lister = cqListeners[i];
+            gemfire::CqListenerPtr cptr(new gemfire::ManagedCqListenerGeneric(
+              (ICqListener<TKey, TResult>^)lister ));
+            vrr.push_back(cptr);
+            CqListenerGeneric<TKey, TResult>^ cqlg = gcnew CqListenerGeneric<TKey, TResult>();
+            cqlg->AddCqListener(cqListeners[i]);
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey( cqListeners[i]) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[cqListeners[i]] = (IntPtr)cptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(cqListeners[i], (IntPtr)cptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqListenerGeneric*)vrr[i].ptr())->setptr(cqlg);
+          }
+        }
+
+        NativePtr->initCqListeners( vrr );
+      }
+
+      generic<class TKey, class TResult>
+      Generic::CqAttributes<TKey, TResult>^ CqAttributesFactory<TKey, TResult>::Create( )
+      {
+        return Generic::CqAttributes<TKey, TResult>::Create(NativePtr->create().ptr());
+      }
+
+    }
+    }
+  }
+} //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.hpp b/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.hpp
new file mode 100644
index 0000000..0321ab9
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqAttributesFactoryMN.hpp
@@ -0,0 +1,80 @@
+/*=========================================================================
+ * 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/CqAttributesFactory.hpp>
+//#include "impl/NativeWrapperN.hpp"
+#include "impl/SafeConvertN.hpp"
+
+#include "CqAttributesMN.hpp"
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      /*
+      generic<class TKey, class TValue>
+      ref class CqAttributes;
+      */
+      generic<class TKey, class TResult>
+      interface class ICqListener;
+
+      /// <summary>
+      /// Creates instances of <c>CqAttributes</c>.
+      /// </summary>
+      /// <seealso cref="CqAttributes" />
+      generic<class TKey, class TResult>
+      public ref class CqAttributesFactory sealed
+        : public Internal::UMWrap<gemfire::CqAttributesFactory>
+      {
+      public:
+
+        /// <summary>
+        /// Creates a new instance of <c>CqAttributesFactory</c> ready
+        /// to create a <c>CqAttributes</c> with default settings.
+        /// </summary>
+        inline CqAttributesFactory( )
+          : UMWrap( new gemfire::CqAttributesFactory( ), true )
+        { }
+
+        inline CqAttributesFactory(Generic::CqAttributes<TKey, TResult>^ cqAttributes )
+          : UMWrap( new gemfire::CqAttributesFactory(gemfire::CqAttributesPtr(GetNativePtrFromSBWrapGeneric<gemfire::CqAttributes>(cqAttributes ))), true )
+        { }
+
+        // ATTRIBUTES
+
+        /// <summary>
+        /// add a cqListener 
+        /// </summary>
+        void AddCqListener(Generic::ICqListener<TKey, TResult>^ cqListener);
+
+        /// <summary>
+        /// Initialize with an array of listeners
+        /// </summary>
+        void InitCqListeners( array<Generic::ICqListener<TKey, TResult>^>^ cqListeners );
+
+        // FACTORY METHOD
+
+        /// <summary>
+        /// Creates a <c>CqAttributes</c> with the current settings.
+        /// </summary>
+        Generic::CqAttributes<TKey, TResult>^ Create( );
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqAttributesMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqAttributesMN.cpp b/geode-client-native/src/clicache/com/vmware/CqAttributesMN.cpp
new file mode 100644
index 0000000..db8bd21
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqAttributesMN.cpp
@@ -0,0 +1,57 @@
+/*=========================================================================
+* 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_includesN.hpp"
+#include "CqAttributesMN.hpp"
+#include "impl/ManagedCqListenerN.hpp"
+#include "ICqListenerN.hpp"
+#include "impl/ManagedCqStatusListenerN.hpp"
+#include "ICqStatusListenerN.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+      generic<class TKey, class TResult>
+      array<ICqListener<TKey, TResult>^>^ CqAttributes<TKey, TResult>::getCqListeners( )
+      {
+        gemfire::VectorOfCqListener vrr;
+        NativePtr->getCqListeners( vrr );
+        array<ICqListener<TKey, TResult>^>^ listners = gcnew array<ICqListener<TKey, TResult>^>( vrr.size( ) );
+
+        for( int32_t index = 0; index < vrr.size( ); index++ )
+        {
+          gemfire::CqListenerPtr& nativeptr( vrr[ index ] );
+          gemfire::ManagedCqListenerGeneric* mg_listener =
+            dynamic_cast<gemfire::ManagedCqListenerGeneric*>( nativeptr.ptr( ) );
+          if (mg_listener != nullptr)
+          {
+            listners[ index ] =  (ICqListener<TKey, TResult>^) mg_listener->userptr( );
+          }else 
+          {
+            gemfire::ManagedCqStatusListenerGeneric* mg_statuslistener =
+              dynamic_cast<gemfire::ManagedCqStatusListenerGeneric*>( nativeptr.ptr( ) );
+            if (mg_statuslistener != nullptr) {
+              listners[ index ] =  (ICqStatusListener<TKey, TResult>^) mg_statuslistener->userptr( );
+            }
+            else {
+              listners[ index ] =  nullptr;
+            }
+          }
+        }
+        return listners;
+      }
+
+    }
+    }
+  }
+} //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqAttributesMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqAttributesMN.hpp b/geode-client-native/src/clicache/com/vmware/CqAttributesMN.hpp
new file mode 100644
index 0000000..e121759
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqAttributesMN.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/CqAttributes.hpp>
+#include "../../impl/NativeWrapper.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+      generic<class TKey, class TResult>
+      interface class ICqListener;
+
+      /// <summary>
+      /// Defines attributes for configuring a cq.
+      /// </summary>
+      generic<class TKey, class TResult>
+      public ref class CqAttributes sealed
+        : public Internal::SBWrap<gemfire::CqAttributes>
+      {
+      public:
+
+        /// <summary>
+        /// get all listeners in this attributes
+        /// </summary>
+        virtual array<Generic::ICqListener<TKey, TResult>^>^ getCqListeners();
+
+      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 CqAttributes<TKey, TResult>^ Create( gemfire::CqAttributes* nativeptr )
+        {
+          if (nativeptr == nullptr)
+          {
+            return nullptr;
+          }
+          return gcnew CqAttributes( nativeptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqAttributes( gemfire::CqAttributes* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.cpp b/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.cpp
new file mode 100644
index 0000000..3247a09
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.cpp
@@ -0,0 +1,166 @@
+/*=========================================================================
+* 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_includesN.hpp"
+#include "CqAttributesMutatorMN.hpp"
+#include "impl/ManagedCqListenerN.hpp"
+#include "impl/ManagedCqStatusListenerN.hpp"
+
+using namespace System;
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      generic<class TKey, class TResult>
+      void CqAttributesMutator<TKey, TResult>::AddCqListener( Generic::ICqListener<TKey, TResult>^ cqListener )
+      {
+        gemfire::CqListenerPtr listenerptr;
+        if ( cqListener != nullptr ) {
+          ICqStatusListener<TKey, TResult>^ cqStatusListener = 
+            dynamic_cast<ICqStatusListener<TKey, TResult>^>(cqListener);
+          if (cqStatusListener != nullptr) {
+            CqStatusListenerGeneric<TKey, TResult>^ sLstr = gcnew CqStatusListenerGeneric<TKey, TResult>();
+            sLstr->AddCqListener(cqListener);
+            listenerptr = new gemfire::ManagedCqStatusListenerGeneric(cqListener);
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey(cqListener) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[cqListener] = (IntPtr)listenerptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(cqListener, (IntPtr)listenerptr.ptr());
+              }
+            }
+            finally {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqStatusListenerGeneric*)listenerptr.ptr())->setptr(sLstr);
+          }
+          else {
+            //TODO::split
+            CqListenerGeneric<TKey, TResult>^ cqlg = gcnew CqListenerGeneric<TKey, TResult>();
+            cqlg->AddCqListener(cqListener);
+            //listenerptr = new gemfire::ManagedCqListenerGeneric((ICqListener<Object^, Object^>^)cqListener );
+            listenerptr = new gemfire::ManagedCqListenerGeneric( /*clg,*/ cqListener );
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey(cqListener) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[cqListener] = (IntPtr)listenerptr.ptr(); 
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(cqListener, (IntPtr)listenerptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqListenerGeneric*)listenerptr.ptr())->setptr(cqlg);            
+          }
+        }
+        NativePtr->addCqListener( listenerptr );
+      }
+
+      generic<class TKey, class TResult>
+      void CqAttributesMutator<TKey, TResult>::RemoveCqListener( Generic::ICqListener<TKey, TResult>^ cqListener )
+      {
+        Generic::ICqStatusListener<TKey, TResult>^ lister = dynamic_cast<Generic::ICqStatusListener<TKey, TResult>^>(cqListener);
+        if (lister != nullptr) {
+          CqStatusListenerGeneric<TKey, TResult>^ cqlg = gcnew CqStatusListenerGeneric<TKey, TResult>();
+          cqlg->AddCqListener(cqListener);
+          gemfire::CqStatusListenerPtr lptr(new gemfire::ManagedCqStatusListenerGeneric(
+          (Generic::ICqStatusListener<TKey, TResult>^) lister ));
+          ((gemfire::ManagedCqStatusListenerGeneric*)lptr.ptr())->setptr(cqlg);
+          try {
+            IntPtr value;
+            CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+            if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->TryGetValue(cqListener, value) ) {
+              gemfire::CqStatusListenerPtr lptr((gemfire::CqStatusListener*)value.ToPointer());
+              NativePtr->removeCqListener(lptr);
+            }
+          } finally {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+          }
+        }
+        else {
+          CqListenerGeneric<TKey, TResult>^ cqlg = gcnew CqListenerGeneric<TKey, TResult>();
+          cqlg->AddCqListener(cqListener);
+          gemfire::CqListenerPtr lptr(new gemfire::ManagedCqListenerGeneric(
+            (Generic::ICqListener<TKey, TResult>^) cqListener ));
+          ((gemfire::ManagedCqListenerGeneric*)lptr.ptr())->setptr(cqlg);
+          try {
+            IntPtr value;
+            CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+            if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->TryGetValue(cqListener, value) ) {
+              gemfire::CqListenerPtr lptr((gemfire::CqListener*)value.ToPointer());
+              NativePtr->removeCqListener(lptr);
+            } 
+          } finally {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();            
+          }
+        }
+      }
+
+      generic<class TKey, class TResult>
+      void CqAttributesMutator<TKey, TResult>::SetCqListeners(array<Generic::ICqListener<TKey, TResult>^>^ newListeners)
+      {
+        gemfire::VectorOfCqListener vrr;
+        for( int i = 0; i < newListeners->Length; i++ )
+        {
+          Generic::ICqStatusListener<TKey, TResult>^ lister = dynamic_cast<Generic::ICqStatusListener<TKey, TResult>^>(newListeners[i]);
+          if (lister != nullptr) {
+            gemfire::CqStatusListenerPtr cptr(new gemfire::ManagedCqStatusListenerGeneric(
+              (ICqStatusListener<TKey, TResult>^)lister ));
+            vrr.push_back(cptr);
+            CqStatusListenerGeneric<TKey, TResult>^ cqlg = gcnew CqStatusListenerGeneric<TKey, TResult>();
+            cqlg->AddCqListener(newListeners[i]);
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey( newListeners[i]) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[newListeners[i]] = (IntPtr)cptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(newListeners[i], (IntPtr)cptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqStatusListenerGeneric*)vrr[i].ptr())->setptr(cqlg);
+          }
+          else {
+            Generic::ICqListener<TKey, TResult>^ lister = newListeners[i];
+            gemfire::CqListenerPtr cptr(new gemfire::ManagedCqListenerGeneric(
+              (ICqListener<TKey, TResult>^)lister ));
+            vrr.push_back(cptr);
+            CqListenerGeneric<TKey, TResult>^ cqlg = gcnew CqListenerGeneric<TKey, TResult>();
+            cqlg->AddCqListener(newListeners[i]);
+            try {
+              CqListenerHelper<TKey, TResult>::g_readerWriterLock->AcquireWriterLock(-1);
+              if ( CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->ContainsKey( newListeners[i]) ) {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict[newListeners[i]] = (IntPtr)cptr.ptr();
+              }
+              else {
+                CqListenerHelper<TKey, TResult>::m_ManagedVsUnManagedCqLstrDict->Add(newListeners[i], (IntPtr)cptr.ptr());
+              }
+            } finally {
+                CqListenerHelper<TKey, TResult>::g_readerWriterLock->ReleaseWriterLock();
+            }
+            ((gemfire::ManagedCqListenerGeneric*)vrr[i].ptr())->setptr(cqlg);
+          }
+        }
+
+        NativePtr->setCqListeners( vrr );
+      }
+
+    }
+    }
+  }
+} //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.hpp b/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.hpp
new file mode 100644
index 0000000..0edeeea
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqAttributesMutatorMN.hpp
@@ -0,0 +1,104 @@
+/*=========================================================================
+ * 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/CqAttributesMutator.hpp>
+#include "impl/NativeWrapperN.hpp"
+
+
+using namespace System;
+using namespace System::Collections::Generic;
+using namespace System::Threading;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      generic<class TKey, class TResult>
+	  interface class ICqListener;
+
+      generic<class TKey, class TResult>
+      private ref class CqListenerHelper sealed{
+        public:
+        static IDictionary<Generic::ICqListener<TKey, TResult>^, IntPtr>^
+          m_ManagedVsUnManagedCqLstrDict = gcnew 
+          Dictionary<Generic::ICqListener<TKey, TResult>^, IntPtr>();
+
+        static ReaderWriterLock^ g_readerWriterLock = gcnew ReaderWriterLock();
+      };
+
+      /// <summary>
+      /// Supports modification of certain cq attributes after the cq
+      /// has been created.
+      /// </summary>
+      generic<class TKey, class TResult>
+      public ref class CqAttributesMutator sealed
+        : public Internal::SBWrap<gemfire::CqAttributesMutator>
+      {
+      public:
+
+        /// <summary>
+        /// Adds the CqListener for the cq.
+        /// </summary>
+        /// <param name="cqListener">
+        /// user-defined cq listener, or null for no cache listener
+        /// </param>
+        void AddCqListener( Generic::ICqListener<TKey, TResult>^ cqListener );
+
+        /// <summary>
+        /// Remove a CqListener for the cq.
+        /// </summary>
+        
+        void RemoveCqListener(Generic::ICqListener<TKey, TResult>^ aListener);
+
+
+        /// <summary>
+	/// Initialize with an array of listeners
+        /// </summary>
+        
+        void SetCqListeners(array<Generic::ICqListener<TKey, TResult>^>^ newListeners);
+
+
+      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 Generic::CqAttributesMutator<TKey, TResult>^ Create( gemfire::CqAttributesMutator* nativeptr )
+        {
+          if (nativeptr == nullptr)
+          {
+            return nullptr;
+          }
+          return gcnew Generic::CqAttributesMutator<TKey, TResult>( nativeptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqAttributesMutator<TKey, TResult>( gemfire::CqAttributesMutator* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqEventMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqEventMN.cpp b/geode-client-native/src/clicache/com/vmware/CqEventMN.cpp
new file mode 100644
index 0000000..674415a
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqEventMN.cpp
@@ -0,0 +1,68 @@
+/*=========================================================================
+ * 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_includesN.hpp"
+#include "CqEventMN.hpp"
+#include "LogMN.hpp"
+#include "impl/SafeConvertN.hpp"
+#include "CacheableBuiltinsMN.hpp"
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      generic<class TKey, class TResult>
+      CqQuery<TKey, TResult>^ CqEvent<TKey, TResult>::getCq( )
+      {
+        gemfire::CqQueryPtr& cQueryptr( NativePtr->getCq( ) );
+        return CqQuery<TKey, TResult>::Create( cQueryptr.ptr( ) );
+      }
+
+      generic<class TKey, class TResult>
+      CqOperationType CqEvent<TKey, TResult>::getBaseOperation( )
+      {
+		  return CqOperation::ConvertFromNative(NativePtr->getBaseOperation());
+      }
+
+      generic<class TKey, class TResult>
+      CqOperationType CqEvent<TKey, TResult>::getQueryOperation( )
+      {
+        return CqOperation::ConvertFromNative(NativePtr->getQueryOperation());
+      }
+
+      generic<class TKey, class TResult>
+      TKey CqEvent<TKey, TResult>::getKey( )
+      {
+        gemfire::CacheableKeyPtr& keyptr( NativePtr->getKey( ) );
+        return Serializable::GetManagedValueGeneric<TKey>(keyptr);
+      }
+
+      generic<class TKey, class TResult>
+      TResult CqEvent<TKey, TResult>::getNewValue( )
+      {
+        gemfire::CacheablePtr& valptr( NativePtr->getNewValue( ) );
+        return Serializable::GetManagedValueGeneric<TResult>(valptr);
+      }
+
+      generic<class TKey, class TResult>
+      array< Byte >^ CqEvent<TKey, TResult>::getDeltaValue( )
+      {
+        gemfire::CacheableBytesPtr deltaBytes = NativePtr->getDeltaValue( );
+        CacheableBytes^ managedDeltaBytes = ( CacheableBytes^ ) CacheableBytes::Create( deltaBytes.ptr( ) );
+        return ( array< Byte >^ ) managedDeltaBytes;
+      }
+
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqEventMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqEventMN.hpp b/geode-client-native/src/clicache/com/vmware/CqEventMN.hpp
new file mode 100644
index 0000000..c98e006
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqEventMN.hpp
@@ -0,0 +1,86 @@
+/*=========================================================================
+ * 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/CqEvent.hpp>
+#include "CqQueryMN.hpp"
+#include "CqOperationMN.hpp"
+//#include "impl/NativeWrapperN.hpp"
+
+#include "ICqEventN.hpp"
+#include "ICacheableKeyN.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache {      
+    namespace Generic
+    {
+			interface class IGFSerializable;
+      //interface class ICqEvent;
+      //interface class ICacheableKey;
+
+      /// <summary>
+      /// This class encapsulates events that occur for cq.
+      /// </summary>
+      generic<class TKey, class TResult>
+      public ref class CqEvent sealed
+        : public Internal::UMWrap<gemfire::CqEvent>
+      {
+      public:
+
+
+        /// <summary>
+        /// Return the cqquery this event occurred in.
+        /// </summary>
+	      CqQuery<TKey, TResult>^ getCq();
+
+        /// <summary>
+        /// Get the operation on the base operation that triggered this event.
+        /// </summary>
+       CqOperationType getBaseOperation();
+
+        /// <summary>
+        /// Get the operation on the query operation that triggered this event.
+        /// </summary>
+       CqOperationType getQueryOperation();
+
+        /// <summary>
+        /// Get the key relating to the event.
+        /// In case of REGION_CLEAR and REGION_INVALIDATE operation, the key will be null.
+        /// </summary>
+        TKey /*Generic::ICacheableKey^*/ getKey( );
+
+        /// <summary>
+        /// Get the new value of the modification.
+        /// If there is no new value returns null, this will happen during delete
+        /// operation.
+        /// </summary>
+        /*Object^*/ TResult getNewValue( );
+
+        array< Byte >^ getDeltaValue( );
+
+      internal:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqEvent( const gemfire::CqEvent* nativeptr )
+          : UMWrap( const_cast<gemfire::CqEvent*>( nativeptr ), false ) { }
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqListenerMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqListenerMN.hpp b/geode-client-native/src/clicache/com/vmware/CqListenerMN.hpp
new file mode 100644
index 0000000..2ef26c4
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqListenerMN.hpp
@@ -0,0 +1,103 @@
+/*=========================================================================
+ * 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 "ICqListenerN.hpp"
+//#include "impl/NativeWrapperN.hpp"
+
+
+using namespace System;
+using namespace System::Collections::Generic;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+  generic<class TKey, class TResult>
+	ref class CqEvent;
+	//interface class ICqListener;
+
+      /// <summary>
+      /// This class wraps the native C++ <c>gemfire::Serializable</c> objects
+      /// as managed <see cref="../../IGFSerializable" /> objects.
+      /// </summary>
+      generic<class TKey, class TResult>    
+      public ref class CqListener
+        : public Internal::SBWrap<gemfire::CqListener>, public ICqListener<TKey, TResult>
+      {
+      public:
+
+        /// <summary>
+        /// Invoke on an event
+        /// </summary>
+	virtual void OnEvent( CqEvent<TKey, TResult>^ ev) 
+	{
+	}
+
+        /// <summary>
+        /// Invoke on an error
+        /// </summary>
+	virtual void OnError( CqEvent<TKey, TResult>^ ev) 
+	{
+	}
+
+        /// <summary>
+        /// Invoke on close
+        /// </summary>
+	virtual void Close()
+	{
+	}
+
+      internal:
+
+        /// <summary>
+        /// Default constructor.
+        /// </summary>
+        inline CqListener<TKey, TResult>( )
+          : SBWrap( ) { }
+
+        /// <summary>
+        /// Internal constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqListener<TKey, TResult>( gemfire::CqListener* 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::CqListener* nativeptr )
+        {
+          AssignPtr( nativeptr );
+        }
+
+        /// <summary>
+        /// Used to assign the native CqListener pointer to a new object.
+        /// </summary>
+        inline void SetSP( gemfire::CqListener* nativeptr )
+        {
+          if ( nativeptr != nullptr ) {
+            nativeptr->preserveSB( );
+          }
+          _SetNativePtr( nativeptr );
+        }
+
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqOperationMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqOperationMN.hpp b/geode-client-native/src/clicache/com/vmware/CqOperationMN.hpp
new file mode 100644
index 0000000..028ccf8
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqOperationMN.hpp
@@ -0,0 +1,78 @@
+/*=========================================================================
+ * 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/CqOperation.hpp>
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      /// <summary>
+      /// Enumerated type for CqOperationType
+      /// </summary>
+      public enum class CqOperationType
+      {
+	OP_TYPE_INVALID = -1,
+        OP_TYPE_CREATE = 0,
+        OP_TYPE_UPDATE = 2,
+        OP_TYPE_INVALIDATE = 4,
+        OP_TYPE_REGION_CLEAR = 8,
+        OP_TYPE_DESTROY = 16,
+        OP_TYPE_MARKER = 32
+      };
+	public ref class CqOperation sealed
+        : public Internal::UMWrap<gemfire::CqOperation>
+      {
+      public:
+
+      /// <summary>
+      /// conenience function for convertin from c++ 
+      /// gemfire::CqOperation::CqOperationType to
+      /// CqOperationType here.
+      /// </summary>
+	  inline static CqOperationType ConvertFromNative(gemfire::CqOperation::CqOperationType tp)
+	  {
+		  if(tp==gemfire::CqOperation::OP_TYPE_CREATE)
+			  return CqOperationType::OP_TYPE_CREATE;
+  		  if(tp==gemfire::CqOperation::OP_TYPE_UPDATE)
+			  return CqOperationType::OP_TYPE_UPDATE;
+		  if(tp==gemfire::CqOperation::OP_TYPE_INVALIDATE)
+			  return CqOperationType::OP_TYPE_INVALIDATE;
+		  if(tp==gemfire::CqOperation::OP_TYPE_REGION_CLEAR)
+			  return CqOperationType::OP_TYPE_REGION_CLEAR;
+  		  if(tp==gemfire::CqOperation::OP_TYPE_DESTROY)
+			  return CqOperationType::OP_TYPE_DESTROY;
+  		  if(tp==gemfire::CqOperation::OP_TYPE_MARKER)
+			  return CqOperationType::OP_TYPE_MARKER;
+		  return CqOperationType::OP_TYPE_INVALID;
+	  }
+	        internal:
+
+        /// <summary>
+        /// Internal constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqOperation( gemfire::CqOperation* nativeptr )
+		            : UMWrap( nativeptr, false ) { }
+	  };
+    }
+  }
+}
+ } //namespace 
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqQueryMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqQueryMN.cpp b/geode-client-native/src/clicache/com/vmware/CqQueryMN.cpp
new file mode 100644
index 0000000..2c82d2a
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqQueryMN.cpp
@@ -0,0 +1,196 @@
+/*=========================================================================
+ * 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_includesN.hpp"
+#include "CqQueryMN.hpp"
+#include "QueryMN.hpp"
+#include "CqAttributesMN.hpp"
+#include "CqAttributesMutatorMN.hpp"
+#include "CqStatisticsMN.hpp"
+#include "ISelectResultsN.hpp"
+#include "ResultSetMN.hpp"
+#include "StructSetMN.hpp"
+#include "ExceptionTypesMN.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      generic<class TKey, class TResult>
+      ICqResults<TResult>^ CqQuery<TKey, TResult>::ExecuteWithInitialResults()
+      {
+        return ExecuteWithInitialResults(DEFAULT_QUERY_RESPONSE_TIMEOUT);
+      }
+
+      generic<class TKey, class TResult>
+      ICqResults<TResult>^ CqQuery<TKey, TResult>::ExecuteWithInitialResults(uint32_t timeout)
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          gemfire::CqResultsPtr& nativeptr =
+            NativePtr->executeWithInitialResults(timeout);
+          if (nativeptr.ptr() == NULL) return nullptr;
+
+          gemfire::ResultSet* resultptr = dynamic_cast<gemfire::ResultSet*>(
+            nativeptr.ptr( ) );
+          if ( resultptr == NULL )
+          {
+            gemfire::StructSet* structptr = dynamic_cast<gemfire::StructSet*>(
+              nativeptr.ptr( ) );
+            if ( structptr == NULL )
+            {
+              return nullptr;
+            }
+            return StructSet<TResult>::Create(structptr);
+          }
+          /*else
+          {
+            return ResultSet::Create(resultptr);
+          }*/
+
+          return nullptr;
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+      generic<class TKey, class TResult>
+      void CqQuery<TKey, TResult>::Execute()
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          NativePtr->execute();
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+      generic<class TKey, class TResult>
+      String^ CqQuery<TKey, TResult>::QueryString::get( )
+      {
+        return ManagedString::Get( NativePtr->getQueryString( ) );
+      }
+
+      generic<class TKey, class TResult>
+      String^ CqQuery<TKey, TResult>::Name::get( )
+      {
+        return ManagedString::Get( NativePtr->getName( ) );
+      }
+
+      generic<class TKey, class TResult>
+      Query<TResult>^ CqQuery<TKey, TResult>::GetQuery( )
+      {
+        return Query<TResult>::Create(NativePtr->getQuery().ptr());
+      }
+
+      generic<class TKey, class TResult>
+      CqAttributes<TKey, TResult>^ CqQuery<TKey, TResult>::GetCqAttributes( )
+      {
+        return CqAttributes<TKey, TResult>::Create(NativePtr->getCqAttributes( ).ptr());
+      }
+
+      generic<class TKey, class TResult>
+      CqAttributesMutator<TKey, TResult>^ CqQuery<TKey, TResult>::GetCqAttributesMutator( )
+      {
+        return CqAttributesMutator<TKey, TResult>::Create(NativePtr->getCqAttributesMutator().ptr());
+      }
+
+      generic<class TKey, class TResult>
+      CqStatistics^ CqQuery<TKey, TResult>::GetStatistics( )
+      {
+        return CqStatistics::Create(NativePtr->getStatistics().ptr());
+      }
+
+      generic<class TKey, class TResult>
+      CqStateType CqQuery<TKey, TResult>::GetState( )
+      {
+        gemfire::CqState::StateType st =  NativePtr->getState( );
+        CqStateType state;
+        switch (st)
+        {
+          case gemfire::CqState::STOPPED: {
+            state = CqStateType::STOPPED;
+            break;
+          }
+          case gemfire::CqState::RUNNING: {
+            state = CqStateType::RUNNING;
+            break;
+          }
+          case gemfire::CqState::CLOSED: {
+            state = CqStateType::CLOSED;
+            break;
+          }
+          case gemfire::CqState::CLOSING: {
+            state = CqStateType::CLOSING;
+            break;
+          }
+          default: {
+            state = CqStateType::INVALID;
+            break;
+          }
+        }
+        return state;
+      }
+
+      generic<class TKey, class TResult>
+      void CqQuery<TKey, TResult>::Stop( )
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          NativePtr->stop( );
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+      generic<class TKey, class TResult>
+      void CqQuery<TKey, TResult>::Close( )
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          NativePtr->close( );
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+      generic<class TKey, class TResult>
+      bool CqQuery<TKey, TResult>::IsRunning( )
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          return NativePtr->isRunning( );
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+      generic<class TKey, class TResult>
+      bool CqQuery<TKey, TResult>::IsStopped( )
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          return NativePtr->isStopped( );
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+      generic<class TKey, class TResult>
+      bool CqQuery<TKey, TResult>::IsClosed( )
+      {
+        _GF_MG_EXCEPTION_TRY2/* due to auto replace */
+
+          return NativePtr->isClosed( );
+
+        _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */
+      }
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqQueryMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqQueryMN.hpp b/geode-client-native/src/clicache/com/vmware/CqQueryMN.hpp
new file mode 100644
index 0000000..6382cf3
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqQueryMN.hpp
@@ -0,0 +1,182 @@
+/*=========================================================================
+ * 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 "CqStateMN.hpp"
+#include <cppcache/CqQuery.hpp>
+//#include "impl/NativeWrapperN.hpp"
+
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+      generic<class TResult>
+      interface class ICqResults;
+
+      generic<class TKey, class TResult>
+      ref class CqAttributes;
+
+      ref class CqStatistics;
+
+      generic<class TKey, class TResult>
+      ref class CqAttributesMutator;
+
+      generic<class TResult>
+      ref class Query;
+
+      /// <summary>
+      /// Class to encapsulate a continuous query (CQ).
+      /// </summary>
+      /// <remarks>
+      /// A CqQuery is obtained from a QueryService which in turn is obtained
+      /// from the Cache.
+      /// This can be executed to return SelectResults which can be either
+      /// a ResultSet or a StructSet, or it can be just registered on the
+      /// java server without returning results immediately rather only
+      /// the incremental results.
+      ///
+      /// This class is intentionally not thread-safe. So multiple threads
+      /// should not operate on the same <c>CqQuery</c> object concurrently
+      /// rather should have their own <c>CqQuery</c> objects.
+      /// </remarks>
+      generic<class TKey, class TResult>
+      public ref class CqQuery sealed
+        : public Internal::SBWrap<gemfire::CqQuery>
+      {
+      public:
+
+        /// <summary>
+        /// Executes the Cq  Query on the cache server
+        /// </summary>
+        void Execute( );
+
+        /// <summary>
+        /// Executes the Cq Query on the cache server
+        /// and returns the Cqresults.
+        /// </summary>
+        ICqResults<TResult>^ ExecuteWithInitialResults();
+
+        /// <summary>
+        /// Executes the Cq Query on the cache server
+        /// with the specified timeout and returns the results.
+        /// </summary>
+        /// <param name="timeout">The time (in seconds) to wait for query response.
+        /// This should be less than or equal to 2^31/1000 i.e. 2147483.
+        /// </param>
+        /// <exception cref="IllegalArgumentException">
+        /// if timeout parameter is greater than 2^31/1000.
+        /// </exception>
+        ICqResults<TResult>^ ExecuteWithInitialResults(uint32_t timeout);
+
+        /// <summary>
+        /// Get the string for this cq query.
+        /// </summary>
+        property String^ QueryString
+        {
+          String^ get( );
+        }
+
+        /// <summary>
+        /// Get the name for this cq query.
+        /// </summary>
+        property String^ Name
+        {
+          String^ get( );
+        }
+
+        /// <summary>
+        /// Get the Attributes for this cq query.
+        /// </summary>
+        CqAttributes<TKey, TResult>^ GetCqAttributes();
+
+        /// <summary>
+        /// Get the Attributes Mutator for this cq query.
+        /// </summary>
+        CqAttributesMutator<TKey, TResult>^ GetCqAttributesMutator();
+
+        /// <summary>
+        /// Get the stats for this cq query.
+        /// </summary>
+        CqStatistics^ GetStatistics();
+
+        /// <summary>
+        /// Get the Query for this cq query.
+        /// </summary>
+        Query<TResult>^ GetQuery();
+
+        /// <summary>
+        /// stop the cq query
+        /// </summary>
+        void Stop( );
+
+        /// <summary>
+        /// stop the cq query
+        /// </summary>
+        void Close( );
+
+        /// <summary>
+        /// get the state of this cq query
+        /// </summary>
+        CqStateType GetState();
+
+        /// <summary>
+        /// Is this Cq in running state?
+        /// </summary>
+        bool IsRunning();
+
+        /// <summary>
+        /// Is this Cq in stopped state?
+        /// </summary>
+        bool IsStopped();
+
+        /// <summary>
+        /// Is this Cq in closed state?
+        /// </summary>
+        bool IsClosed();
+
+      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 CqQuery<TKey, TResult>^ Create( gemfire::CqQuery* nativeptr )
+        {
+          if (nativeptr == nullptr)
+          {
+            return nullptr;
+          }
+          return gcnew CqQuery<TKey, TResult>( nativeptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqQuery( gemfire::CqQuery* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.cpp b/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.cpp
new file mode 100644
index 0000000..5c0483d
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.cpp
@@ -0,0 +1,42 @@
+/*=========================================================================
+ * 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_includesN.hpp"
+#include "CqServiceStatisticsMN.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+	uint32_t CqServiceStatistics::numCqsActive( )
+	{
+	  return NativePtr->numCqsActive( );
+	}
+    uint32_t CqServiceStatistics::numCqsCreated( )
+	{
+	  return NativePtr->numCqsCreated( );
+	}
+    uint32_t CqServiceStatistics::numCqsClosed( )
+	{
+	  return NativePtr->numCqsClosed( );
+	}
+    uint32_t CqServiceStatistics::numCqsStopped( )
+	{
+	  return NativePtr->numCqsStopped( );
+	}
+    uint32_t CqServiceStatistics::numCqsOnClient( )
+	{
+	  return NativePtr->numCqsOnClient( );
+	}
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.hpp b/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.hpp
new file mode 100644
index 0000000..6f4ec38
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqServiceStatisticsMN.hpp
@@ -0,0 +1,92 @@
+/*=========================================================================
+ * 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/CqServiceStatistics.hpp>
+#include "impl/NativeWrapperN.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      /// <summary>
+      /// Defines common statistical information for cqservice 
+      /// </summary>
+      public ref class CqServiceStatistics sealed
+        : public Internal::SBWrap<gemfire::CqServiceStatistics>
+      {
+      public:
+
+        /// <summary>
+        ///Get the number of CQs currently active. 
+        ///Active CQs are those which are executing (in running state).
+        /// </summary>
+          uint32_t numCqsActive( );
+
+        /// <summary>
+        ///Get the total number of CQs created. This is a cumulative number.
+        /// </summary>
+          uint32_t numCqsCreated( );
+
+        /// <summary>
+        ///Get the total number of closed CQs. This is a cumulative number.
+        /// </summary>
+          uint32_t numCqsClosed( );
+
+        /// <summary>
+        ///Get the number of stopped CQs currently.
+        /// </summary>
+          uint32_t numCqsStopped( );
+
+        /// <summary>
+        ///Get number of CQs that are currently active or stopped. 
+        ///The CQs included in this number are either running or stopped (suspended).
+        ///Closed CQs are not included.
+        /// </summary>
+          uint32_t numCqsOnClient( );
+
+      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 CqServiceStatistics^ Create( gemfire::CqServiceStatistics* nativeptr )
+        {
+          if (nativeptr == nullptr)
+          {
+            return nullptr;
+          }
+          return gcnew CqServiceStatistics( nativeptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqServiceStatistics( gemfire::CqServiceStatistics* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqStateMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqStateMN.cpp b/geode-client-native/src/clicache/com/vmware/CqStateMN.cpp
new file mode 100644
index 0000000..617b8d9
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqStateMN.cpp
@@ -0,0 +1,84 @@
+/*=========================================================================
+ * 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_includesN.hpp"
+#include "CqStateMN.hpp"
+#include <vcclr.h>
+
+#include "impl/ManagedStringN.hpp"
+using namespace System;
+using namespace System::Runtime::InteropServices;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      String^ CqState::ToString()
+      {
+		  return ManagedString::Get(NativePtr->toString());
+      }
+
+      bool CqState::IsRunning()
+      {
+        return NativePtr->isRunning();
+      }
+
+      bool CqState::IsStopped()
+      {
+        return NativePtr->isStopped();
+      }
+
+      bool CqState::IsClosed()
+      {
+	return NativePtr->isClosed();
+      }
+
+      bool CqState::IsClosing()
+      {
+	return NativePtr->isClosing();
+      }
+
+      void CqState::SetState( CqStateType state )
+      {
+		  gemfire::CqState::StateType st =gemfire::CqState::INVALID;
+		  if(state == CqStateType::STOPPED)
+			  st = gemfire::CqState::STOPPED;
+		  else if(state == CqStateType::RUNNING)
+			  st = gemfire::CqState::RUNNING;
+		  else if(state == CqStateType::CLOSED)
+			  st = gemfire::CqState::CLOSED;
+		  else if(state == CqStateType::CLOSING)
+			  st = gemfire::CqState::CLOSING;
+
+		  NativePtr->setState( st );
+      }
+
+      CqStateType CqState::GetState( )
+      {
+		gemfire::CqState::StateType st =  NativePtr->getState( );
+        CqStateType state;
+		if(st==gemfire::CqState::STOPPED)
+			state = CqStateType::STOPPED;
+		else if(st==gemfire::CqState::RUNNING)
+			state = CqStateType::RUNNING;
+		else if(st==gemfire::CqState::CLOSED)
+			state = CqStateType::CLOSED;
+		else if(st==gemfire::CqState::CLOSING)
+			state = CqStateType::CLOSING;
+		else
+			state = CqStateType::INVALID;
+		return state;
+      }
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqStateMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqStateMN.hpp b/geode-client-native/src/clicache/com/vmware/CqStateMN.hpp
new file mode 100644
index 0000000..06c5635
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqStateMN.hpp
@@ -0,0 +1,89 @@
+/*=========================================================================
+ * 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/CqState.hpp>
+#include "impl/NativeWrapperN.hpp"
+
+using namespace System;
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      /// <summary>
+      /// Enumerated type for cq state
+      /// @nativeclient
+      /// For Native Clients:
+      /// @endnativeclient      
+      /// </summary>
+      public enum class CqStateType
+      {
+        STOPPED = 0,
+        RUNNING,
+        CLOSED,
+        CLOSING,
+        INVALID
+      };
+
+
+      /// <summary>
+      /// Static class containing convenience methods for <c>CqState</c>.
+      /// </summary>
+      public ref class CqState sealed
+        : public Internal::UMWrap<gemfire::CqState>
+      {
+      public:
+
+        /// <summary>
+        /// Returns the state in string form.
+        /// </summary>
+        virtual String^ ToString( ) override;
+
+        /// <summary>
+        /// Returns true if the CQ is in Running state.
+        /// </summary>
+        bool IsRunning(); 
+
+        /// <summary>
+        /// Returns true if the CQ is in Stopped state.
+	/// </summary>
+        bool IsStopped();
+
+        /// <summary>
+        /// Returns true if the CQ is in Closed state.
+        /// </summary>
+        bool IsClosed(); 
+
+        /// <summary>
+        /// Returns true if the CQ is in Closing state.
+	/// </summary>
+        bool IsClosing();
+	void SetState(CqStateType state);
+	CqStateType GetState();
+
+        internal:
+
+        /// <summary>
+        /// Internal constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqState( gemfire::CqState* nativeptr )
+		            : UMWrap( nativeptr, false ) { }
+
+      };
+
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.cpp b/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.cpp
new file mode 100644
index 0000000..0a7f0d8
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.cpp
@@ -0,0 +1,38 @@
+/*=========================================================================
+ * 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_includesN.hpp"
+#include "CqStatisticsMN.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+		uint32_t CqStatistics::numInserts( )
+	{
+	  return NativePtr->numInserts( );
+	}
+    uint32_t CqStatistics::numDeletes( )
+	{
+	  return NativePtr->numDeletes( );
+	}
+    uint32_t CqStatistics::numUpdates( )
+	{
+	  return NativePtr->numUpdates( );
+	}
+    uint32_t CqStatistics::numEvents( )
+	{
+	  return NativePtr->numEvents( );
+	}
+    }
+  }
+}
+ } //namespace 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.hpp b/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.hpp
new file mode 100644
index 0000000..c7664ac
--- /dev/null
+++ b/geode-client-native/src/clicache/com/vmware/CqStatisticsMN.hpp
@@ -0,0 +1,84 @@
+/*=========================================================================
+ * 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/CqStatistics.hpp>
+#include "impl/NativeWrapperN.hpp"
+
+
+namespace GemStone
+{
+  namespace GemFire
+  {
+    namespace Cache { namespace Generic
+    {
+
+      /// <summary>
+      /// Defines common statistical information for a cq.
+      /// </summary>
+      public ref class CqStatistics sealed
+        : public Internal::SBWrap<gemfire::CqStatistics>
+      {
+      public:
+
+        /// <summary>
+        /// get number of inserts qualified by this Cq
+        /// </summary>
+          uint32_t numInserts( );
+
+        /// <summary>
+        /// get number of deletes qualified by this Cq
+        /// </summary>
+          uint32_t numDeletes( );
+
+        /// <summary>
+        /// get number of updates qualified by this Cq
+        /// </summary>
+          uint32_t numUpdates( );
+
+        /// <summary>
+        /// get number of events qualified by this Cq
+        /// </summary>
+          uint32_t numEvents( );
+
+      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 CqStatistics^ Create( gemfire::CqStatistics* nativeptr )
+        {
+          if (nativeptr == nullptr)
+          {
+            return nullptr;
+          }
+          return gcnew CqStatistics( nativeptr );
+        }
+
+
+      private:
+
+        /// <summary>
+        /// Private constructor to wrap a native object pointer
+        /// </summary>
+        /// <param name="nativeptr">The native object pointer</param>
+        inline CqStatistics( gemfire::CqStatistics* nativeptr )
+          : SBWrap( nativeptr ) { }
+      };
+
+    }
+  }
+}
+ } //namespace