geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [32/51] [partial] incubator-geode git commit: Add source for geode c++ and .net clients
Date Thu, 19 May 2016 15:14:39 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/GNUmakefile.execs
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/GNUmakefile.execs b/geode-client-native/quickstart/cpp/GNUmakefile.execs
new file mode 100644
index 0000000..46e7a58
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/GNUmakefile.execs
@@ -0,0 +1,61 @@
+default: all
+
+
+SRC = $(wildcard *.cpp)
+EXECS = $(patsubst %.cpp,%,$(SRC))
+
+.PHONY: all clean
+all: $(EXECS)
+
+clean:
+	rm -rf $(EXECS)
+	rm -f *.o plugins/*.o queryobjects/*.o
+	rm -f *.d
+
+LoaderListenerWriter: LoaderListenerWriter.o \
+                      plugins/SimpleCacheLoader.o \
+                      plugins/SimpleCacheListener.o \
+                      plugins/SimpleCacheWriter.o
+
+DataExpiration: DataExpiration.o \
+                plugins/SimpleCacheListener.o
+
+DurableClient: DurableClient.o \
+               plugins/DurableCacheListener.o
+
+RemoteQuery: RemoteQuery.o \
+             queryobjects/Portfolio.o \
+             queryobjects/Position.o
+
+PoolRemoteQuery: PoolRemoteQuery.o \
+                 queryobjects/Portfolio.o \
+                 queryobjects/Position.o 
+
+CqQuery: CqQuery.o \
+         queryobjects/Portfolio.o \
+         queryobjects/Position.o
+
+PoolCqQuery: PoolCqQuery.o \
+             queryobjects/Portfolio.o \
+             queryobjects/Position.o
+
+PoolCqQuery: PoolCqQuery.o \
+             queryobjects/Portfolio.o \
+             queryobjects/Position.o
+
+PdxRemoteQuery: PdxRemoteQuery.o \
+                queryobjects/PortfolioPdx.o \
+                queryobjects/PositionPdx.o
+
+PdxAutoSerializer: PdxAutoSerializer.o \
+                   queryobjects/PortfolioPdxAuto.o \
+                   queryobjects/PositionPdxAuto.o  \
+                   queryobjects/testobject_PortfolioPdxAutoSerializable.o \
+                   queryobjects/testobject_PositionPdxAutoSerializable.o
+
+$(EXECS) : % : %.o
+	$(CXX) $(CXXLDFLAGS) $(CXXLIBS) -o $@ $^
+	
+-include $(SRC:.cpp=.d)
+
+include ../GNUmakefile.common

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/HACache.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/HACache.cpp b/geode-client-native/quickstart/cpp/HACache.cpp
new file mode 100644
index 0000000..df776f9
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/HACache.cpp
@@ -0,0 +1,100 @@
+/*
+ * The HA QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache with redundancy level = 1.
+ * 2. Get the example Region from the Cache.
+ * 3. Call registerKeys() on the Region.
+ * 4. Call registerRegex() on the Region.
+ * 5. Put two keys in the Region.
+ * 6. Verify that the keys are destroyed via expiration in server.
+ * 7. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The HA QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    LOGINFO("Connected to the GemFire Distributed System");
+
+    // Create a GemFire Cache with the "clientHACache.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientHACache.xml")
+                  ->addServer("localhost", 40404)
+                  ->addServer("localhost", 40405)
+                  ->setSubscriptionRedundancy(1)
+                  ->setSubscriptionEnabled(true)
+                  ->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("exampleRegion");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Register and Unregister Interest on Region for Some Keys.
+    VectorOfCacheableKey keys;
+    CacheableKeyPtr key1 = CacheableInt32::create(123);
+    CacheableKeyPtr key2 = CacheableString::create("Key-123");
+    keys.push_back( key1 );
+    keys.push_back( key2 );
+    regionPtr->registerKeys(keys);
+    regionPtr->registerRegex("Key.*");
+
+    LOGINFO("Called registerKeys() and registerKeysRegex()");
+
+    regionPtr->put(key1, 1);
+    regionPtr->put(key2, 2);
+
+    LOGINFO("Called put() on Region");
+
+    LOGINFO("Waiting for updates on keys");
+    millisleep(10000);
+
+    int count=0;
+
+    if (regionPtr->get(key1) == NULLPTR) {
+      LOGINFO("Verified that key1 has been destroyed");
+      count++;
+    }
+
+    if (regionPtr->get(key2) == NULLPTR) {
+      LOGINFO("Verified that key2 has been destroyed");
+      count++;
+    }
+
+    if (count == 2) {
+      LOGINFO("Verified all updates");
+    }
+    else {
+      LOGINFO("Could not verify all updates");
+    }
+
+    regionPtr->unregisterKeys(keys);
+    regionPtr->unregisterRegex("Key.*");
+
+    LOGINFO("Unregistered keys");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("HACache GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/LoaderListenerWriter.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/LoaderListenerWriter.cpp b/geode-client-native/quickstart/cpp/LoaderListenerWriter.cpp
new file mode 100644
index 0000000..298059d
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/LoaderListenerWriter.cpp
@@ -0,0 +1,88 @@
+/*
+ * The LoaderListenerWriter QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ *  1. Create a GemFire Cache.
+ *  2. Get the example Region from the Cache.
+ *  3. Set the SimpleCacheLoader, SimpleCacheListener and SimpleCacheWriter plugins on the Region.
+ *  4. Put 3 Entries into the Region.
+ *  5. Update an Entry in the Region.
+ *  6. Destroy an Entry in the Region.
+ *  7. Invalidate an Entry in the Region.
+ *  8. Get a new Entry from the Region.
+ *  9. Get the destroyed Entry from the Region.
+ * 10. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Include the SimpleCacheLoader, SimpleCacheListener and SimpleCacheWriter plugins.
+#include "plugins/SimpleCacheLoader.hpp"
+#include "plugins/SimpleCacheListener.hpp"
+#include "plugins/SimpleCacheWriter.hpp"
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The LoaderListenerWriter QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    // Create a GemFire Cache with the "clientLoaderListenerWriter.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientLoaderListenerWriter.xml")->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr =cachePtr->getRegion("exampleRegion");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Plugin the SimpleCacheLoader, SimpleCacheListener and SimpleCacheWrite to the Region.
+    AttributesMutatorPtr attrMutatorPtr = regionPtr->getAttributesMutator();
+    attrMutatorPtr->setCacheLoader(CacheLoaderPtr(new SimpleCacheLoader()));
+    attrMutatorPtr->setCacheListener(CacheListenerPtr(new SimpleCacheListener()));
+    attrMutatorPtr->setCacheWriter(CacheWriterPtr(new SimpleCacheWriter()));
+
+    LOGINFO("Attached the simple plugins on the Region");
+
+    // The following operations should cause the plugins to print the events.
+
+    // Put 3 Entries into the Region.
+    regionPtr->put("Key1", "Value1");
+    regionPtr->put("Key2", "Value2");
+    regionPtr->put("Key3", "Value3");
+
+    // Update Key3.
+    regionPtr->put("Key3", "Value3-updated");
+
+    // Destroy Key3.
+    regionPtr->destroy("Key3");
+
+    // Invalidate Key2.
+    regionPtr->invalidate("Key2");
+
+    // Get a new Key.
+    regionPtr->get("Key4");
+
+    // Get a destroyed Key.
+    regionPtr->get("Key3");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("LoaderListenerWriter GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/MultiuserSecurity.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/MultiuserSecurity.cpp b/geode-client-native/quickstart/cpp/MultiuserSecurity.cpp
new file mode 100755
index 0000000..f69cb8d
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/MultiuserSecurity.cpp
@@ -0,0 +1,185 @@
+/*
+ * The MultiuserSecurityExample QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache with multiuser enabled.
+ * 2. Creates userCache using user "root". Who is authorized to do get and put operations.
+ * 3. Creates userCache using user "writer2". Who is authorized to do only put operation. It tries to do get operation and gets NotAuthorizedException.
+ * 4.  Close the Cache.
+ *
+ */
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+char* getFuncIName = (char*)"MultiGetFunctionI";
+
+void runWithUserRoot(CachePtr cachePtr)
+{
+  //user root's credential who is authorized to do put/get operations
+  PropertiesPtr credentials = Properties::create();
+
+  credentials->insert("security-username", "root");
+  credentials->insert("security-password", "root");
+  
+  // Create user cache by passing credentials
+  RegionServicePtr userCache1 = cachePtr->createAuthenticatedView( credentials );
+
+  // Create region using usercache
+  RegionPtr regionPtr1 = userCache1->getRegion("partition_region");
+
+  LOGINFO("Obtained the Region from the Cache");
+  
+  CacheableKeyPtr key = CacheableKey::create("Key1");
+  
+  //doing operation on behalf of user "writer2"
+  regionPtr1->put(key, "Value1");
+  
+  LOGINFO("Entry created in the Region"); 
+
+  // Get Entries back out of the Region.
+  CacheablePtr result1Ptr = regionPtr1->get(key);
+
+  //to execute function on server
+  bool getResult = true;
+  CacheableVectorPtr routingObj = CacheableVector::create();
+  
+  routingObj->push_back(key);
+    
+  //test data independant function with result on one server
+  LOGINFO("test data independant function with result on one server");
+  CacheablePtr args = routingObj;
+  char buf[128];
+ 
+ ExecutionPtr exc = FunctionService::onServer(userCache1);
+  
+  CacheableVectorPtr executeFunctionResult = 
+         exc->withArgs(args)->execute(getFuncIName, getResult)->getResult();
+  CacheableVectorPtr resultList = CacheableVector::create();
+  if(executeFunctionResult==NULLPTR)
+  {
+    LOGINFO("get executeFunctionResult is NULL");
+  } 
+  else 
+  {      
+    for (int item=0; item < executeFunctionResult->size(); item++)
+    {
+      CacheableArrayListPtr arrayList = dynCast<CacheableArrayListPtr>(executeFunctionResult->operator[](item));
+      for (int pos=0; pos < arrayList->size(); pos++)
+      {
+        resultList->push_back(arrayList->operator[](pos));
+      }
+    }
+    sprintf(buf, "get: result count = %d", resultList->size());
+    LOGINFO(buf);
+    
+    for(int i=0; i < resultList->size(); i++)
+    {
+       sprintf(buf, "get result[%d]=%s", i, dynCast<CacheableStringPtr>(resultList->operator[](i))->asChar());
+       LOGINFO(buf);
+    }
+  }
+  //test for Query
+  
+  // Execute a Query which returns a ResultSet.
+  QueryServicePtr qrySvcPtr = userCache1->getQueryService();
+  QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /partition_region");
+  SelectResultsPtr resultsPtr = qryPtr->execute();
+
+  LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+  //close the user cache
+  userCache1->close();
+  
+  LOGINFO("User root done put/get ops successfully");
+}
+
+void runWithUserWriter(CachePtr cachePtr)
+{
+    //user writer2's credentials who is authorixed to do only put operation
+  PropertiesPtr credentials = Properties::create();
+
+  credentials->insert("security-username", "writer2");
+  credentials->insert("security-password", "writer2");
+
+  // Create user cache by passing credentials
+  RegionServicePtr userCache2 = cachePtr->createAuthenticatedView( credentials );
+
+  // Create region using usercache
+  RegionPtr regionPtr2 = userCache2->getRegion("partition_region");
+
+  LOGINFO("Entry created in the Region");
+
+  bool gotException = false;
+  try {    
+    // Get Entries back out of the Region.
+    CacheablePtr result1Ptr = regionPtr2->get("Key1");
+     
+    //collect NotAuthorized exception
+  } catch (const gemfire::NotAuthorizedException& expected) {
+    gotException = true;
+    LOGINFO("Got expected authorization failure while obtaining the Entry: %s", expected.getMessage());    
+  }
+  
+  //close the user cache
+  userCache2->close();
+  
+  if (gotException)
+  {
+    LOGINFO("Got expected authorization exception while user writer2 was doing get operation.");
+  }
+  else
+  {
+    LOGINFO("Failed:  Didn't get expected authorization exception while user writer2 was doing get operation.");
+  }
+}
+
+// The MultiuserSecurityExample QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    PropertiesPtr secProp = Properties::create();
+    
+    //By setting this property client will send credential in encrypted form.
+    //to do this one need to setup OpenSSL.
+    //secProp->insert("security-client-dhalgo", "Blowfish:128");
+      
+    // Connect to the GemFire Distributed System using the settings from the gfcpp.properties file by default, programatically
+    // overriding secProp properties.
+    
+    // Create a GemFire Cache.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory(secProp);
+    
+    CachePtr cachePtr = cacheFactory->setMultiuserAuthentication(true)->create();       
+    
+    LOGINFO("Created the Gemfire Cache with multiuser enable.");
+    
+    RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(PROXY);
+    
+    LOGINFO("Created the RegionFactory");
+    
+    // Create the example Region Programmatically.
+    RegionPtr regionPtr = regionFactory->create("partition_region");    
+    
+    runWithUserRoot(cachePtr);
+    
+    runWithUserWriter(cachePtr);
+    
+    // Close the GemFire Cache.
+    cachePtr->close();
+    
+    LOGINFO("Closed the GemFire Cache");    
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("FAILED:MultiuserSecurityExample GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PdxAutoSerializer.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PdxAutoSerializer.cpp b/geode-client-native/quickstart/cpp/PdxAutoSerializer.cpp
new file mode 100644
index 0000000..2f3c92f
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PdxAutoSerializer.cpp
@@ -0,0 +1,123 @@
+/*
+ * The PoolRemoteQuery QuickStart Example.
+ * This examples creates pool using locator.
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache.
+ * 2. Get the example Region from the Pool.
+ * 3. Populate some Pdx Type query objects on the Region.
+ * 4. Get the pool, get the Query Service from Cache. Pool is define in clientPdxRemoteQuery.xml. Pool has locator to get the server. Apart from that pool is bind to server group "ServerGroup1".
+ * 5. Execute a query that returns a Result Set.
+ * 6. Execute a query that returns a Struct Set.
+ * 7. Execute the region shortcut/convenience query methods.
+ * 8. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Include our Query objects, viz. PortfolioPdx and PositionPdx.
+#include "queryobjects/PortfolioPdxAuto.hpp"
+#include "queryobjects/PositionPdxAuto.hpp"
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// Use the "testobject" namespace for the query objects.
+using namespace testobject;
+
+// The PdxRemoteQuery QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    // Create a GemFire Cache with the "clientPdxRemoteQuery.xml" Cache XML file.
+    //CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientPdxAutoSerializer.xml")->create();
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientPdxAutoSerializer.xml")->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("Portfolios");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Register our Serializable/Cacheable Query objects, viz. PortfolioPdx and PositionPdx.
+    Serializable::registerPdxType( PortfolioPdxAuto::createDeserializable);
+    Serializable::registerPdxType( PositionPdxAuto::createDeserializable);
+
+    LOGINFO("Registered PDX Type Query Objects");
+
+    // Populate the Region with some Pdx Type objects, i.e PortfolioPdx objects.
+    PortfolioPdxPtr port1Ptr(new PortfolioPdxAuto(1 /*ID*/, 10 /*size*/));
+    PortfolioPdxPtr port2Ptr(new PortfolioPdxAuto(2 /*ID*/, 20 /*size*/));
+    PortfolioPdxPtr port3Ptr(new PortfolioPdxAuto(3 /*ID*/, 30 /*size*/));
+    regionPtr->put("Key1", port1Ptr);
+    regionPtr->put("Key2", port2Ptr);
+    regionPtr->put("Key3", port3Ptr);
+
+    LOGINFO("Populated some PortfolioPdx Objects");
+
+    // Get the QueryService from the Cache.
+    QueryServicePtr qrySvcPtr = cachePtr->getQueryService("examplePool");
+
+    LOGINFO("Got the QueryService from the Cache");
+
+    PortfolioPdxPtr port4Ptr = regionPtr->get("Key1");
+
+    // Execute a Query which returns a ResultSet.
+    QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /Portfolios");
+    SelectResultsPtr resultsPtr = qryPtr->execute();
+
+    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+    // Execute a Query which returns a StructSet.
+    qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT id, status FROM /Portfolios WHERE id > 1");
+    resultsPtr = qryPtr->execute();
+
+    LOGINFO("StructSet Query returned %d rows", resultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    int rowCount = 0;
+    SelectResultsIterator iter = resultsPtr->getIterator();
+    while (iter.hasNext())
+    {
+      rowCount++;
+      Struct * psi = dynamic_cast<Struct*>( iter.next().ptr() );
+      LOGINFO("Row %d Column 1 is named %s, value is %s", rowCount, psi->getFieldName(0), (*psi)[0]->toString()->asChar());
+      LOGINFO("Row %d Column 2 is named %s, value is %S", rowCount, psi->getFieldName(1), (*psi)[1]->toString()->asWChar());
+    }
+
+    // Execute a Region Shortcut Query (convenience method).
+    resultsPtr = regionPtr->query("id = 2");
+
+    LOGINFO("Region Query returned %d rows", resultsPtr->size());
+
+    // Execute the Region selectValue() API.
+    SerializablePtr resultPtr = regionPtr->selectValue("id = 3");
+    PortfolioPdxPtr portPtr = dynCast<PortfolioPdxPtr>(resultPtr);
+
+    LOGINFO("Region selectValue() returned an item:\n %s", portPtr->toString()->asChar());
+
+    // Execute the Region existsValue() API.
+    bool existsValue = regionPtr->existsValue("id = 4");
+
+    LOGINFO("Region existsValue() returned %s", existsValue ? "true" : "false");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("PdxAutoSerializer GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PdxInstance.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PdxInstance.cpp b/geode-client-native/quickstart/cpp/PdxInstance.cpp
new file mode 100644
index 0000000..501a7c9
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PdxInstance.cpp
@@ -0,0 +1,125 @@
+/*
+* The PdxInstance QuickStart Example.
+* This example takes the following steps:
+*
+* This example shows PdxInstanceFactory and PdxInstance usage. 
+*
+* 1. Create a GemFire Cache.
+* 2. Creates the PdxInstanceFactory for Person class.
+* 3. Then creates instance of PdxInstance
+* 4. It does put.
+* 5. Then it does get and access it fields.
+* 6. Close the Cache.
+*
+*/
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+class Person
+{
+private:
+  char* m_name;
+  int m_id;
+  int m_age;
+
+public:
+  Person() { }
+
+  Person(char* name, int id, int age)
+  {
+    m_name = name;
+    m_id = id;
+    m_age = age;
+  }
+
+  char* getName() const
+  {
+    return m_name;
+  }
+  int getID()
+  {
+    return m_id;
+  }
+  int getAge()
+  {
+    return m_age;
+  }
+};
+
+// The PdxInstance QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create a GemFire Cache.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientPdxInstance.xml")->create();          
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("Person");       
+
+    LOGINFO("Obtained the Region from the Cache.");
+ 
+    Person* p = new Person("Jack", 7, 21);
+
+    //PdxInstanceFactory for Person class
+    PdxInstanceFactoryPtr pif = cachePtr->createPdxInstanceFactory("Person");
+    LOGINFO("Created PdxInstanceFactory for Person class");
+
+    pif->writeString("m_name", p->getName());
+    pif->writeInt("m_id", p->getID());
+    pif->markIdentityField("m_id");
+    pif->writeInt("m_age", p->getAge());
+
+    PdxInstancePtr pdxInstance = pif->create();
+
+    LOGINFO("Created PdxInstance for Person class");
+
+    regionPtr->put("Key1", pdxInstance);    
+
+    LOGINFO("Populated PdxInstance Object");
+
+    PdxInstancePtr retPdxInstance = regionPtr->get("Key1");
+
+    LOGINFO("Got PdxInstance Object");
+
+    int id = 0;
+    retPdxInstance->getField("m_id", id);
+
+    int age = 0;
+    retPdxInstance->getField("m_age", age);
+
+    char* name = NULL;
+    retPdxInstance->getField("m_name", &name);
+
+    if(id == p->getID()&& age == p->getAge() && strcmp(name, p->getName()) == 0
+        && retPdxInstance->isIdentityField("m_id")) {
+      LOGINFO("PdxInstance returns all fields value expected");
+    }
+    else {
+      LOGINFO("PdxInstance doesn't returns all fields value expected");
+    }
+
+    delete p;
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("PdxInstance GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PdxRemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PdxRemoteQuery.cpp b/geode-client-native/quickstart/cpp/PdxRemoteQuery.cpp
new file mode 100644
index 0000000..c9ebeca
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PdxRemoteQuery.cpp
@@ -0,0 +1,120 @@
+/*
+ * The PoolRemoteQuery QuickStart Example.
+ * This examples creates pool using locator.
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache.
+ * 2. Get the example Region from the Pool.
+ * 3. Populate some Pdx Type query objects on the Region.
+ * 4. Get the pool, get the Query Service from Cache. Pool is define in clientPdxRemoteQuery.xml. Pool has locator to get the server. Apart from that pool is bind to server group "ServerGroup1".
+ * 5. Execute a query that returns a Result Set.
+ * 6. Execute a query that returns a Struct Set.
+ * 7. Execute the region shortcut/convenience query methods.
+ * 8. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Include our Query objects, viz. PortfolioPdx and PositionPdx.
+#include "queryobjects/PortfolioPdx.hpp"
+#include "queryobjects/PositionPdx.hpp"
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// Use the "testobject" namespace for the query objects.
+using namespace testobject;
+
+// The PdxRemoteQuery QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    // Create a GemFire Cache with the "clientPdxRemoteQuery.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientPdxRemoteQuery.xml")->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("Portfolios");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Register our Serializable/Cacheable Query objects, viz. PortfolioPdx and PositionPdx.
+    Serializable::registerPdxType( PortfolioPdx::createDeserializable);
+    Serializable::registerPdxType( PositionPdx::createDeserializable);
+
+    LOGINFO("Registered PDX Type Query Objects");
+
+    // Populate the Region with some Pdx Type objects, i.e PortfolioPdx objects.
+    PortfolioPdxPtr port1Ptr(new PortfolioPdx(1 /*ID*/, 10 /*size*/));
+    PortfolioPdxPtr port2Ptr(new PortfolioPdx(2 /*ID*/, 20 /*size*/));
+    PortfolioPdxPtr port3Ptr(new PortfolioPdx(3 /*ID*/, 30 /*size*/));
+    regionPtr->put("Key1", port1Ptr);
+    regionPtr->put("Key2", port2Ptr);
+    regionPtr->put("Key3", port3Ptr);
+
+    LOGINFO("Populated some PortfolioPdx Objects");
+
+    // Get the QueryService from the Cache.
+    QueryServicePtr qrySvcPtr = cachePtr->getQueryService("examplePool");
+
+    LOGINFO("Got the QueryService from the Cache");
+
+    // Execute a Query which returns a ResultSet.
+    QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /Portfolios");
+    SelectResultsPtr resultsPtr = qryPtr->execute();
+
+    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+    // Execute a Query which returns a StructSet.
+    qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT ID, status FROM /Portfolios WHERE ID > 1");
+    resultsPtr = qryPtr->execute();
+
+    LOGINFO("StructSet Query returned %d rows", resultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    int rowCount = 0;
+    SelectResultsIterator iter = resultsPtr->getIterator();
+    while (iter.hasNext())
+    {
+      rowCount++;
+      Struct * psi = dynamic_cast<Struct*>( iter.next().ptr() );
+      LOGINFO("Row %d Column 1 is named %s, value is %s", rowCount, psi->getFieldName(0), (*psi)[0]->toString()->asChar());
+      LOGINFO("Row %d Column 2 is named %s, value is %S", rowCount, psi->getFieldName(1), (*psi)[1]->toString()->asWChar());
+    }
+
+    // Execute a Region Shortcut Query (convenience method).
+    resultsPtr = regionPtr->query("ID = 2");
+
+    LOGINFO("Region Query returned %d rows", resultsPtr->size());
+
+    // Execute the Region selectValue() API.
+    SerializablePtr resultPtr = regionPtr->selectValue("ID = 3");
+    PortfolioPdxPtr portPtr = dynCast<PortfolioPdxPtr>(resultPtr);
+
+    LOGINFO("Region selectValue() returned an item:\n %s", portPtr->toString()->asChar());
+
+    // Execute the Region existsValue() API.
+    bool existsValue = regionPtr->existsValue("ID = 4");
+
+    LOGINFO("Region existsValue() returned %s", existsValue ? "true" : "false");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("PdxRemoteQuery GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PdxSerializer.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PdxSerializer.cpp b/geode-client-native/quickstart/cpp/PdxSerializer.cpp
new file mode 100644
index 0000000..8f5ce06
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PdxSerializer.cpp
@@ -0,0 +1,254 @@
+/*
+* The PdxSerializer QuickStart Example.
+* This example takes the following steps:
+*
+* This example shows PdxSerializer usage. 
+*
+* 1. Create a GemFire Cache.
+* 2. Get the Person from the Cache.
+* 3. Populate some query Person objects on the Region.
+* 4. Get the pool, get the Query Service from Pool. Pool is define in clientPdxSerializer.xml. 
+* 5. Execute a query that returns a Result Set.
+* 6. Execute a query that returns a Struct Set.
+* 7. Execute the region shortcut/convenience query methods.
+* 8. Close the Cache.
+*
+*/
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+static const char * CLASSNAME = "com.example.Person";
+
+//This demonstrates Person domain class
+class Person
+{
+private:
+  char* m_name;    
+  int m_id;
+  int m_age;
+
+public:
+  Person() { }
+
+  Person(char* name, int id, int age)
+  {
+    m_name = name;
+    m_id = id;
+    m_age = age;
+  }
+
+  char* getName() const
+  {
+    return m_name;
+  }
+  int getID()
+  {
+    return m_id;
+  }
+  int getAge()
+  {
+    return m_age;
+  }
+  void setName(char* name)
+  {
+    m_name = name;
+  }
+  void setID(int id)
+  {
+    m_id = id;
+  }
+  void setAge(int age)
+  {
+    m_age = age;
+  }
+};
+
+//This demonstrates, how to extend PdxSerializer without modifying Person domain object, necessary for serialization/desrialization to PDX format.
+class PersonPdxSerializer : public PdxSerializer
+{
+public:
+
+  static void deallocate(void * testObject, const char * className)
+  {    
+    LOGINFO("PersonPdxSerializer::deallocate called");
+    if (strcmp(className, CLASSNAME) == 0) {
+      Person* per = reinterpret_cast<Person*>(testObject);
+      delete per;
+    }
+  }
+
+  static uint32_t objectSize(void * testObject, const char * className)
+  {    
+    LOGINFO("PersonPdxSerializer::objectSize called");
+    if (strcmp(className, CLASSNAME) == 0) {
+      Person* per = reinterpret_cast<Person*>(testObject);
+      uint32_t size = 0;
+      size += sizeof(Person);
+      if (per->getName() != NULL) {
+        size += strlen(per->getName());
+      }
+      return size;
+    }
+    return 0;
+  }
+
+  UserDeallocator getDeallocator(const char * className)
+  {    
+    if (strcmp(className, CLASSNAME) == 0) {
+      return deallocate;
+    }
+    return NULL;
+  }
+
+  UserObjectSizer getObjectSizer(const char * className)
+  {   
+    if (strcmp(className, CLASSNAME) == 0) {
+      return objectSize;
+    }
+    return NULL;
+  }
+
+  void * fromData(const char * className, PdxReaderPtr pr)
+  { 
+    if (strcmp(className, CLASSNAME) == 0) {
+      Person* per = new Person();
+
+      try
+      {
+        per->setID(pr->readInt("m_id"));
+        per->setAge(pr->readInt("m_age"));
+        per->setName(pr->readString("m_name"));
+      }
+      catch (...)
+      {
+        return NULL;
+      }
+      return (void*) per;
+    }
+    return NULL;    
+  }  
+
+  bool toData(void * testObject, const char * className, PdxWriterPtr pw)
+  {
+    if (strcmp(className, CLASSNAME) == 0) {
+
+      Person* per = reinterpret_cast<Person*>(testObject);
+
+      try
+      {
+        pw->writeInt("m_id" ,per->getID());
+        pw->writeInt("m_age" ,per->getAge());
+        pw->writeString("m_name" ,per->getName());
+      }
+      catch (...)
+      {
+        return false;
+      }
+      return true;
+    }    
+    return false;
+  }
+};
+
+// This PdxSerializer QuickStart example demonstrartes query on .NET objects without having corresponding java classes at server.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create a GemFire Cache.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    // Create a GemFire Cache with the "clientPdxSerializer.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientPdxSerializer.xml")->create();          
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("Person");       
+
+    LOGINFO("Obtained the Region from the Cache.");
+
+    // Register PersonPdxSerializer to serialize the domain types(Person class) as pdx format
+    Serializable::registerPdxSerializer(PdxSerializerPtr(new PersonPdxSerializer));    
+    LOGINFO("Registered Person Query Objects");
+
+    // Populate the Region with some Person objects.
+    Person* p1 = new Person("John", 1 /*ID*/, 23 /*age*/);
+    PdxWrapperPtr pdxobj1(new PdxWrapper(p1, CLASSNAME));
+    regionPtr->put("Key1", pdxobj1);
+
+    Person* p2 = new Person("Jack", 2 /*ID*/, 20 /*age*/);
+    PdxWrapperPtr pdxobj2(new PdxWrapper(p2, CLASSNAME));
+    regionPtr->put("Key2", pdxobj2);
+
+    Person* p3 = new Person("Tony", 3 /*ID*/, 35 /*age*/);
+    PdxWrapperPtr pdxobj3(new PdxWrapper(p3, CLASSNAME));
+    regionPtr->put("Key3", pdxobj3);
+
+    LOGINFO("Populated some Person Objects through PdxWrapper");
+
+    //find the pool
+    PoolPtr poolPtr = PoolManager::find("examplePool");
+
+    // Get the QueryService from the Pool.
+    QueryServicePtr qrySvcPtr = poolPtr->getQueryService();
+
+    LOGINFO("Got the QueryService from the Pool");
+
+    // Execute a Query which returns a ResultSet.    
+    QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /Person");
+    SelectResultsPtr resultsPtr = qryPtr->execute();
+
+    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+    // Execute a Query which returns a StructSet.
+    qryPtr = qrySvcPtr->newQuery("SELECT m_name, m_age FROM /Person WHERE m_id = 1");
+    resultsPtr = qryPtr->execute();
+
+    LOGINFO("StructSet Query returned %d rows", resultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    int rowCount = 0;
+    SelectResultsIterator iter = resultsPtr->getIterator();
+    while (iter.hasNext())
+    {
+      rowCount++;
+      Struct * psi = dynamic_cast<Struct*>( iter.next().ptr() );
+      LOGINFO("Row %d Column 1 is named %s, value is %S", rowCount, psi->getFieldName(0), (*psi)[0]->toString()->asWChar());
+      LOGINFO("Row %d Column 2 is named %s, value is %s", rowCount, psi->getFieldName(1), (*psi)[1]->toString()->asChar());
+    }
+
+    // Execute a Region Shortcut Query (convenience method).
+    resultsPtr = regionPtr->query("m_id = 2");
+
+    LOGINFO("Region Query returned %d rows", resultsPtr->size()); 
+
+    // Execute the Region selectValue() API.
+    PdxWrapperPtr pdxWrapperPtr = regionPtr->selectValue("m_id = 3");
+    Person* per = reinterpret_cast<Person*>(pdxWrapperPtr->getObject());
+
+    LOGINFO("Region selectValue() returned an item:\n Person Name = %s and Person Age = %d", per->getName(), per->getAge());
+
+    // Execute the Region existsValue() API.
+    bool existsValue = regionPtr->existsValue("m_id = 4");
+
+    LOGINFO("Region existsValue() returned %s", existsValue ? "true" : "false");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("PdxSerializer GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PoolCqQuery.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PoolCqQuery.cpp b/geode-client-native/quickstart/cpp/PoolCqQuery.cpp
new file mode 100755
index 0000000..137d8cf
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PoolCqQuery.cpp
@@ -0,0 +1,183 @@
+/*
+ * The Pool Continuous Query QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create CacheFactory using the user specified properties or from the gfcpp.properties file by default.
+ * 2. Create a GemFire Cache.
+ * 3. Get the Portfolios Region from the Pool.
+ * 4. Populate some query objects on the Region.
+ * 5. Get the Query Service from cache.
+ * 6. Register a cqQuery listener
+ * 7. Execute a cqQuery with initial Results
+ * 8. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Include our Query objects, viz. Portfolio and Position.
+#include "queryobjects/Portfolio.hpp"
+#include "queryobjects/Position.hpp"
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// Use the "testobject" namespace for the query objects.
+using namespace testobject;
+
+class MyCqListener : public CqListener {
+  public:
+  void onEvent(const CqEvent& cqe){
+    char* opStr = (char*)"Default";
+    PortfolioPtr portfolio( dynamic_cast<Portfolio*> (cqe.getNewValue().ptr() ));
+    CacheableStringPtr key( dynamic_cast<CacheableString*> (cqe.getKey().ptr() ));
+    switch (cqe.getQueryOperation())
+      {
+        case CqOperation::OP_TYPE_CREATE:
+	  {
+            opStr = (char*)"CREATE";
+            break;
+	  }
+        case CqOperation::OP_TYPE_UPDATE:
+	  {
+            opStr = (char*)"UPDATE";
+            break;
+	  }
+        case CqOperation::OP_TYPE_DESTROY:
+	  {
+            opStr = (char*)"UPDATE";
+            break;
+	  }
+        default:
+          break;
+       }
+     LOGINFO("MyCqListener::OnEvent called with %s, key[%s], value=(%ld,%s)",
+	 opStr, key->asChar(), portfolio->getID(), portfolio->getPkid()->asChar());
+  }
+
+  void onError(const CqEvent& cqe){
+    LOGINFO("MyCqListener::OnError called");
+  }
+
+  void close(){
+    LOGINFO("MyCqListener::close called");
+  }
+};
+
+// The PoolCqQuery QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create CacheFactory using the user specified properties or from the gfcpp.properties file by default.
+    PropertiesPtr prp = Properties::create();
+    prp->insert("cache-xml-file", "XMLs/clientPoolCqQuery.xml");
+
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory(prp);
+
+    LOGINFO("Created CacheFactory");
+
+    // Create a GemFire Cache with the "clientPoolCqQuery.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the Portfolios Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("Portfolios");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
+    Serializable::registerType( Portfolio::createDeserializable);
+    Serializable::registerType( Position::createDeserializable);
+
+    LOGINFO("Registered Serializable Query Objects");
+
+    // Populate the Region with some Portfolio objects.
+    PortfolioPtr port1Ptr(new Portfolio(1 /*ID*/, 10 /*size*/));
+    PortfolioPtr port2Ptr(new Portfolio(2 /*ID*/, 20 /*size*/));
+    PortfolioPtr port3Ptr(new Portfolio(3 /*ID*/, 30 /*size*/));
+
+    regionPtr->put("Key1", port1Ptr);
+    regionPtr->put("Key2", port2Ptr);
+    regionPtr->put("Key3", port3Ptr);
+
+    LOGINFO("Populated some Portfolio Objects");
+
+    // Get the QueryService from the Cache.
+    QueryServicePtr qrySvcPtr = cachePtr->getQueryService("examplePool");
+
+    LOGINFO("Got the QueryService from the Cache");
+
+    //Create CqAttributes and Install Listener
+    CqAttributesFactory cqFac;
+    CqListenerPtr cqLstner (new MyCqListener());
+    cqFac.addCqListener(cqLstner);
+    CqAttributesPtr cqAttr = cqFac.create();
+
+    //create a new Cq Query
+    const char* qryStr = "select * from /Portfolios p where p.ID < 5";
+    CqQueryPtr qry = qrySvcPtr->newCq((char*)"MyCq", qryStr, cqAttr);
+
+    //execute Cq Query with initial Results
+    CqResultsPtr resultsPtr  = qry->executeWithInitialResults();
+
+    //make change to generate cq events
+    regionPtr->put("Key3", port1Ptr);
+    regionPtr->put("Key2", port2Ptr);
+    regionPtr->put("Key1", port3Ptr);
+
+    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    SelectResultsIterator iter = resultsPtr->getIterator();
+    while (iter.hasNext())
+    {
+      SerializablePtr ser = iter.next();
+      if( ser != NULLPTR )
+      {
+        LOGINFO (" query pulled object %s\n", ser->toString()->asChar() );
+        StructPtr stPtr(dynamic_cast<Struct*>  (ser.ptr() ));
+        if (stPtr != NULLPTR)
+        {
+          LOGINFO(" got struct ptr ");
+          SerializablePtr serKey = (*(stPtr.ptr()))["key"];
+          if (serKey != NULLPTR)
+          {
+            LOGINFO("got struct key %s\n", serKey->toString()->asChar());
+          }
+
+          SerializablePtr serVal = (*(stPtr.ptr()))["value"];
+
+          if (serVal != NULLPTR)
+          {
+            LOGINFO("  got struct value %s\n", serVal->toString()->asChar());
+          }
+        }
+      }
+      else{
+      	LOGINFO("   query pulled bad object\n");
+      }
+    }
+
+    // Stop the GemFire Continuous query.
+    qry->stop();
+
+    // Close the GemFire Continuous query.
+    qry->close();
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("PoolCqQuery GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PoolRemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PoolRemoteQuery.cpp b/geode-client-native/quickstart/cpp/PoolRemoteQuery.cpp
new file mode 100755
index 0000000..66087ea
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PoolRemoteQuery.cpp
@@ -0,0 +1,120 @@
+/*
+ * The PoolRemoteQuery QuickStart Example.
+ * This examples creates pool using locator.
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache.
+ * 2. Get the example Region from the Pool.
+ * 3. Populate some query objects on the Region.
+ * 4. Get the pool, get the Query Service from Cache. Pool is define in clientRemoteQueryWithPool.xml. Pool has locator to get the server. Apart from that pool is bind to server group "ServerGroup1".
+ * 5. Execute a query that returns a Result Set.
+ * 6. Execute a query that returns a Struct Set.
+ * 7. Execute the region shortcut/convenience query methods.
+ * 8. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Include our Query objects, viz. Portfolio and Position.
+#include "queryobjects/Portfolio.hpp"
+#include "queryobjects/Position.hpp"
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// Use the "testobject" namespace for the query objects.
+using namespace testobject;
+
+// The PoolRemoteQuery QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    // Create a GemFire Cache with the "clientRemoteQueryWithPool.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->set("cache-xml-file", "XMLs/clientPoolRemoteQuery.xml")->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("Portfolios");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
+    Serializable::registerType( Portfolio::createDeserializable);
+    Serializable::registerType( Position::createDeserializable);
+
+    LOGINFO("Registered Serializable Query Objects");
+
+    // Populate the Region with some Portfolio objects.
+    PortfolioPtr port1Ptr(new Portfolio(1 /*ID*/, 10 /*size*/));
+    PortfolioPtr port2Ptr(new Portfolio(2 /*ID*/, 20 /*size*/));
+    PortfolioPtr port3Ptr(new Portfolio(3 /*ID*/, 30 /*size*/));
+    regionPtr->put("Key1", port1Ptr);
+    regionPtr->put("Key2", port2Ptr);
+    regionPtr->put("Key3", port3Ptr);
+
+    LOGINFO("Populated some Portfolio Objects");
+
+    // Get the QueryService from the Cache.
+    QueryServicePtr qrySvcPtr = cachePtr->getQueryService("examplePool");
+
+    LOGINFO("Got the QueryService from the Cache");
+
+    // Execute a Query which returns a ResultSet.
+    QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /Portfolios");
+    SelectResultsPtr resultsPtr = qryPtr->execute();
+
+    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+    // Execute a Query which returns a StructSet.
+    qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT ID, status FROM /Portfolios WHERE ID > 1");
+    resultsPtr = qryPtr->execute();
+
+    LOGINFO("StructSet Query returned %d rows", resultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    int rowCount = 0;
+    SelectResultsIterator iter = resultsPtr->getIterator();
+    while (iter.hasNext())
+    {
+      rowCount++;
+      Struct * psi = dynamic_cast<Struct*>( iter.next().ptr() );
+      LOGINFO("Row %d Column 1 is named %s, value is %s", rowCount, psi->getFieldName(0), (*psi)[0]->toString()->asChar());
+      LOGINFO("Row %d Column 2 is named %s, value is %s", rowCount, psi->getFieldName(1), (*psi)[1]->toString()->asChar());
+    }
+
+    // Execute a Region Shortcut Query (convenience method).
+    resultsPtr = regionPtr->query("ID = 2");
+
+    LOGINFO("Region Query returned %d rows", resultsPtr->size());
+
+    // Execute the Region selectValue() API.
+    SerializablePtr resultPtr = regionPtr->selectValue("ID = 3");
+    PortfolioPtr portPtr = dynCast<PortfolioPtr>(resultPtr);
+
+    LOGINFO("Region selectValue() returned an item:\n %s", portPtr->toString()->asChar());
+
+    // Execute the Region existsValue() API.
+    bool existsValue = regionPtr->existsValue("ID = 4");
+
+    LOGINFO("Region existsValue() returned %s", existsValue ? "true" : "false");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("PoolRemoteQuery GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PoolWithEndpoints.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PoolWithEndpoints.cpp b/geode-client-native/quickstart/cpp/PoolWithEndpoints.cpp
new file mode 100755
index 0000000..6f3bd1a
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PoolWithEndpoints.cpp
@@ -0,0 +1,97 @@
+/*
+ * The PoolWithEndpoints QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create CacheFactory using the settings from the gfcpp.properties file by default.
+ * 2. Create a GemFire Cache.
+ * 3. Create Poolfactory with endpoint and then create pool using poolfactory.
+ * 4. Create a Example Region programmatically.
+ * 5. Put Entries (Key and Value pairs) into the Region.
+ * 6. Get Entries from the Region.
+ * 7. Invalidate an Entry in the Region.
+ * 8. Destroy an Entry in the Region.
+ * 9. Close the Cache.
+ *
+ */
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The PoolWithEndpoints QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create CacheFactory using the settings from the gfcpp.properties file by default.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    LOGINFO("Created CacheFactory");
+    
+    // Create a GemFire Cache.
+    CachePtr cachePtr = cacheFactory->setSubscriptionEnabled(true)->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    //Create Poolfactory with endpoint and then create pool using poolfactory.
+    PoolFactoryPtr pfact = PoolManager::createFactory();
+    pfact->addServer("localhost", 40404);
+    PoolPtr pptr = pfact->create("examplePool");
+
+    RegionFactoryPtr  regionFactory = cachePtr->createRegionFactory(CACHING_PROXY);
+
+    LOGINFO("Created the RegionFactory");
+    
+    // Create the example Region programmatically.
+    RegionPtr regionPtr = regionFactory->setPoolName("examplePool")->create("exampleRegion");
+
+    LOGINFO("Created the Region Programmatically");
+
+    // Put an Entry (Key and Value pair) into the Region using the direct/shortcut method.
+    regionPtr->put("Key1", "Value1");
+    
+    LOGINFO("Put the first Entry into the Region");
+    
+    // Put an Entry into the Region by manually creating a Key and a Value pair.
+    CacheableKeyPtr keyPtr = CacheableInt32::create(123);
+    CacheablePtr valuePtr = CacheableString::create("123");
+    regionPtr->put(keyPtr, valuePtr);
+    
+    LOGINFO("Put the second Entry into the Region");
+    
+    // Get Entries back out of the Region.
+    CacheablePtr result1Ptr = regionPtr->get("Key1");
+    
+    LOGINFO("Obtained the first Entry from the Region");
+    
+    CacheablePtr result2Ptr = regionPtr->get(keyPtr);
+    
+    LOGINFO("Obtained the second Entry from the Region");
+    
+    // Invalidate an Entry in the Region.
+    regionPtr->invalidate("Key1");
+    
+    LOGINFO("Invalidated the first Entry in the Region");
+    
+    // Destroy an Entry in the Region.
+    regionPtr->destroy(keyPtr);
+    
+    LOGINFO("Destroyed the second Entry in the Region");
+    
+    // Close the GemFire Cache.
+    cachePtr->close();
+    
+    LOGINFO("Closed the GemFire Cache");
+    
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("PoolWithEndpoints GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/PutAllGetAllOperations.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/PutAllGetAllOperations.cpp b/geode-client-native/quickstart/cpp/PutAllGetAllOperations.cpp
new file mode 100644
index 0000000..57d666e
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/PutAllGetAllOperations.cpp
@@ -0,0 +1,76 @@
+/*
+ * The PutAllGetAllOperations QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache using CacheFactory. By default it will connect to "localhost" at port 40404".
+ * 2. Create a Example Region.
+ * 3. PutAll Entries (Key and Value pairs) into the Region.
+ * 4. GetAll Entries from the Region.
+ * 5. Close the Cache.
+ *
+ */
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The PutAllGetAllOperations QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    //Create a GemFire Cache using CacheFactory. By default it will connect to "localhost" at port 40404".
+    CachePtr cachePtr  = CacheFactory::createCacheFactory()->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    //Set Attributes for the region.
+    RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(CACHING_PROXY);
+
+    //Create exampleRegion.
+    RegionPtr regionPtr = regionFactory->create( "exampleRegion" );
+
+    LOGINFO("Created the Region");
+
+    // Put bulk Entries (Key and Value pairs) into the Region.
+    HashMapOfCacheable entryMap;
+    char key[2048];
+    char value[2048];
+    for (int32_t item = 0; item < 100; item++) {
+      sprintf(key, "key-%d", item);
+      sprintf(value, "%d", item);
+      entryMap.insert(CacheableKey::create(key), CacheableString::create(value));
+    }
+    regionPtr->putAll(entryMap);
+
+
+    LOGINFO("PutAll 100 entries into the Region");
+
+    //GetAll Entries back out of the Region
+    VectorOfCacheableKey keys;
+    for (int32_t item = 0; item < 100; item++) {
+      sprintf(key, "key-%d", item);
+      keys.push_back(CacheableKey::create(key));
+    }
+
+    HashMapOfCacheablePtr values(new HashMapOfCacheable());
+    regionPtr->getAll(keys, values, NULLPTR, true);
+
+    LOGINFO("Obtained 100 entries from the Region");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("PutAllGetAllOperations GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/RefIDExample.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/RefIDExample.cpp b/geode-client-native/quickstart/cpp/RefIDExample.cpp
new file mode 100644
index 0000000..78936a8
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/RefIDExample.cpp
@@ -0,0 +1,105 @@
+/*
+ * The RefIDExample QuickStart Example.
+ * This example creates two pools through XML and sets region attributes using refid.
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache.
+ * 2. Now it creates 2 Pools with the names poolName1, poolName2 respectively.
+ * 3. Sets the region attribute using refid.
+ * 4. Gets the region "root1" with poolName1, and region "root2" with poolName2.
+ * 5. Check for the region attribute set through refid.
+ * 6. Put Entries (Key and Value pairs) into both the Regions.
+ * 7. Get Entries from the Regions.
+ * 8. Invalidate an Entry in both the Regions.
+ * 9. Destroy an Entry in both the Regions.
+ * 10. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+
+// The RefIDExample QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create a GemFire Cache using XMLs/clientRefIDExample.xml.
+    PropertiesPtr prptr = Properties::create();
+    prptr->insert("cache-xml-file", "XMLs/clientRefIDExample.xml");
+
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory(prptr);
+   
+    CachePtr cachePtr = cacheFactory->create();       
+
+    LOGINFO("Created the GemFire Cache");
+
+    // get the root1 Region.
+    RegionPtr regionPtr1 = cachePtr->getRegion("root1");
+
+    LOGINFO("Obtained the root1 Region from the Cache");
+
+    // get the root2 Region.
+    RegionPtr regionPtr2 = cachePtr->getRegion("root2");
+
+    LOGINFO("Obtained the root2 Region from the Cache");
+
+    RegionAttributesPtr rAttPtr1 = regionPtr1->getAttributes();
+    RegionAttributesPtr rAttPtr2 = regionPtr2->getAttributes();
+
+    bool isCacheEnabled1 = rAttPtr1->getCachingEnabled();
+    LOGINFO("For region root1 cachingEnabled is %s ", isCacheEnabled1 ? "true" : "false");
+
+    bool isCacheEnabled2 = rAttPtr2->getCachingEnabled();
+    LOGINFO("For region root2 cachingEnabled is %s ", isCacheEnabled2 ? "true" : "false");
+    
+    // Put an Entry (Key and Value pair) into the Region using the direct/shortcut method.
+    regionPtr1->put("Key1", "Value1");
+    regionPtr2->put("Key1", "Value1");
+    
+    LOGINFO("Put the first Entries into both the Regions");
+    
+    // Put an Entry into the Region by manually creating a Key and a Value pair.
+    CacheableKeyPtr keyPtr = CacheableInt32::create(123);
+    CacheablePtr valuePtr = CacheableString::create("123");
+    regionPtr1->put(keyPtr, valuePtr);
+    regionPtr2->put(keyPtr, valuePtr);
+    
+    LOGINFO("Put the second Entries into both the Regions.");
+    
+    // Get Entries back out of the Region.
+    CacheablePtr resultPtr1 = regionPtr1->get("Key1");
+    CacheablePtr resultPtr2 = regionPtr2->get("Key1");
+    LOGINFO("Obtained the first Entry from both the Regions");
+
+    resultPtr1 = regionPtr1->get(keyPtr);
+    resultPtr2 = regionPtr2->get(keyPtr);    
+    LOGINFO("Obtained the second Entry from both the Regions");
+    
+    // Invalidate an Entry in the Region.
+    regionPtr1->invalidate("Key1");
+    regionPtr2->invalidate("Key1");
+    
+    LOGINFO("Invalidated the first Entry in both the Regions.");
+    
+    // Destroy an Entry in the Region.
+    regionPtr1->destroy(keyPtr);
+    regionPtr2->destroy(keyPtr);
+    
+    LOGINFO("Destroyed the second Entry in both the Regions");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+    
+    LOGINFO("Closed the GemFire Cache");
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("RefIDExample GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/RegisterInterest.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/RegisterInterest.cpp b/geode-client-native/quickstart/cpp/RegisterInterest.cpp
new file mode 100644
index 0000000..5d8a884
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/RegisterInterest.cpp
@@ -0,0 +1,99 @@
+/*
+ * The RegisterInterest QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create CacheFactory using the user specified properties or from the gfcpp.properties file by default.
+ * 2. Create a GemFire Cache.
+ * 3. Get the example Region from the Cache.
+ * 4. Call registerAllKeys() and unregisterAllKeys() on the Region.
+ * 5. Call registerKeys() and unregisterKeys() on the Region.
+ * 6. Call registerRegex() and unregisterRegex() on the Region.
+ * 7. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The RegisterInterest QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create CacheFactory using the user specified properties or from the gfcpp.properties file by default.
+    PropertiesPtr prp = Properties::create();
+    prp->insert("cache-xml-file", "XMLs/clientRegisterInterest.xml");
+
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory(prp);
+
+    LOGINFO("Created CacheFactory");
+
+    // Create a GemFire Cache with the "clientRegisterInterest.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->create();
+
+    LOGINFO("Created the GemFire Cache");
+
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("exampleRegion");
+
+    LOGINFO("Obtained the Region from the Cache");
+
+    // Register and Unregister Interest on Region for All Keys.
+    regionPtr->registerAllKeys();
+    regionPtr->unregisterAllKeys();
+
+    LOGINFO("Called registerAllKeys() and unregisterAllKeys()");
+
+    // Register and Unregister Interest on Region for Some Keys.
+    VectorOfCacheableKey keys;
+    keys.push_back( CacheableInt32::create(123) );
+    keys.push_back( CacheableString::create("Key-123") );
+    regionPtr->registerKeys(keys);
+    regionPtr->unregisterKeys(keys);
+
+    LOGINFO("Called registerKeys() and unregisterKeys()");
+
+    // Register and Unregister Interest on Region for Keys matching a Regular Expression.
+    regionPtr->registerRegex("Keys-*");
+    regionPtr->unregisterRegex("Keys-*");
+
+    LOGINFO("Called registerRegex() and unregisterRegex()");
+
+    //Register Interest on Region for All Keys with getInitialValues to populate the cache with values of all keys from the server.
+    regionPtr->registerAllKeys(false, NULLPTR, true); // Where the 3rd argument is getInitialValues.
+    //Unregister Interest on Region for All Keys.
+    regionPtr->unregisterAllKeys();
+
+    LOGINFO("Called registerAllKeys() and unregisterAllKeys() with getInitialValues argument");
+
+    //Register Interest on Region for Some Keys with getInitialValues.
+    keys.push_back( CacheableInt32::create(123) );
+    keys.push_back( CacheableString::create("Key-123") );
+    regionPtr->registerKeys(keys, false, true); // Where the 3rd argument is getInitialValues.
+
+    LOGINFO("Called registerKeys() and unregisterKeys() with getInitialValues argument");
+    //Unregister Interest on Region for Some Keys.
+    regionPtr->unregisterKeys(keys);
+
+    //Register and Unregister Interest on Region for Keys matching a Regular Expression with getInitialValues.
+    regionPtr->registerRegex("Keys-*", false, NULLPTR, true);
+    regionPtr->unregisterRegex("Keys-*");
+
+    LOGINFO("Called registerRegex() and unregisterRegex() with getInitialValues argument");
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+ }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("RegisterInterest GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/RemoteQuery.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/RemoteQuery.cpp b/geode-client-native/quickstart/cpp/RemoteQuery.cpp
new file mode 100644
index 0000000..5cd6a6a
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/RemoteQuery.cpp
@@ -0,0 +1,144 @@
+/*
+ * The RemoteQuery QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache Programmatically.
+ * 2. Create the example Region Programmatically.
+ * 3. Populate some query objects on the Region.
+ * 4. Execute a query that returns a Result Set.
+ * 5. Execute a query that returns a Struct Set.
+ * 6. Execute the region shortcut/convenience query methods.
+ * 7. Close the Cache.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Include our Query objects, viz. Portfolio and Position.
+#include "queryobjects/Portfolio.hpp"
+#include "queryobjects/Position.hpp"
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// Use the "testobject" namespace for the query objects.
+using namespace testobject;
+
+// The RemoteQuery QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create a GemFire Cache Programmatically.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+    CachePtr cachePtr = cacheFactory->setSubscriptionEnabled(true)->create();
+    
+    LOGINFO("Created the GemFire Cache");
+
+    RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(CACHING_PROXY);
+    
+    LOGINFO("Created the RegionFactory");
+    
+    // Create the example Region programmatically.
+    RegionPtr regionPtr = regionFactory->create("Portfolios");
+
+    LOGINFO("Created the Region.");
+
+    // Register our Serializable/Cacheable Query objects, viz. Portfolio and Position.
+    Serializable::registerType( Portfolio::createDeserializable);
+    Serializable::registerType( Position::createDeserializable);
+
+    LOGINFO("Registered Serializable Query Objects");
+
+    // Populate the Region with some Portfolio objects.
+    PortfolioPtr port1Ptr(new Portfolio(1 /*ID*/, 10 /*size*/));
+    PortfolioPtr port2Ptr(new Portfolio(2 /*ID*/, 20 /*size*/));
+    PortfolioPtr port3Ptr(new Portfolio(3 /*ID*/, 30 /*size*/));
+    regionPtr->put("Key1", port1Ptr);
+    regionPtr->put("Key2", port2Ptr);
+    regionPtr->put("Key3", port3Ptr);
+
+    LOGINFO("Populated some Portfolio Objects");
+
+    // Get the QueryService from the Cache.
+    QueryServicePtr qrySvcPtr = cachePtr->getQueryService();
+
+    LOGINFO("Got the QueryService from the Cache");
+
+    // Execute a Query which returns a ResultSet.
+    QueryPtr qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT * FROM /Portfolios");
+    SelectResultsPtr resultsPtr = qryPtr->execute();
+
+    LOGINFO("ResultSet Query returned %d rows", resultsPtr->size());
+
+    // Execute a Query which returns a StructSet.
+    qryPtr = qrySvcPtr->newQuery("SELECT DISTINCT ID, status FROM /Portfolios WHERE ID > 1");
+    resultsPtr = qryPtr->execute();
+
+    LOGINFO("StructSet Query returned %d rows", resultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    int rowCount = 0;
+    SelectResultsIterator iter = resultsPtr->getIterator();
+    while (iter.hasNext())
+    {
+      rowCount++;
+      Struct * psi = dynamic_cast<Struct*>( iter.next().ptr() );
+      LOGINFO("Row %d Column 1 is named %s, value is %s", rowCount, psi->getFieldName(0), (*psi)[0]->toString()->asChar());
+      LOGINFO("Row %d Column 2 is named %s, value is %s", rowCount, psi->getFieldName(1), (*psi)[1]->toString()->asChar());
+    }
+
+    // Execute a Region Shortcut Query (convenience method).
+    resultsPtr = regionPtr->query("ID = 2");
+
+    LOGINFO("Region Query returned %d rows", resultsPtr->size());
+
+    // Execute the Region selectValue() API.
+    SerializablePtr resultPtr = regionPtr->selectValue("ID = 3");
+    PortfolioPtr portPtr = dynCast<PortfolioPtr>(resultPtr);
+
+    LOGINFO("Region selectValue() returned an item:\n %s", portPtr->toString()->asChar());
+
+    // Execute the Region existsValue() API.
+    bool existsValue = regionPtr->existsValue("ID = 4");
+
+    LOGINFO("Region existsValue() returned %s", existsValue ? "true" : "false");
+
+    //Execute the parameterized query
+    //Populate the parameter list (paramList) for the query.
+    QueryPtr pqryPtr = qrySvcPtr->newQuery("SELECT DISTINCT ID, status FROM /Portfolios WHERE ID > $1 and status=$2");
+
+    CacheableVectorPtr paramList = CacheableVector::create();
+    paramList->push_back(Cacheable::create(1)); // Param-1
+    paramList->push_back(Cacheable::create("active")); // Param-2
+
+    SelectResultsPtr pqresultsPtr = pqryPtr->execute(paramList);
+
+    LOGINFO("StructSet Query returned %d rows", pqresultsPtr->size());
+
+    // Iterate through the rows of the query result.
+    rowCount = 0;
+    SelectResultsIterator itr = pqresultsPtr->getIterator();
+    while (itr.hasNext())
+    {
+      rowCount++;
+      Struct * pst = dynamic_cast<Struct*>( itr.next().ptr() );
+      LOGINFO("Row %d Column 1 is named %s, value is %s", rowCount, pst->getFieldName(0), (*pst)[0]->toString()->asChar());
+      LOGINFO("Row %d Column 2 is named %s, value is %s", rowCount, pst->getFieldName(1), (*pst)[1]->toString()->asChar());
+    }
+    
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {
+    LOGERROR("RemoteQuery GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/Security.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/Security.cpp b/geode-client-native/quickstart/cpp/Security.cpp
new file mode 100644
index 0000000..608de5e
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/Security.cpp
@@ -0,0 +1,77 @@
+/*
+ * The Security QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Sets the client security properties.
+ * 2. Put an Entry ( for which it has valid credentials ).
+ * 3. Fail to Get an Entry ( for which user doesn't have permission ).
+ * 4. Close the Cache.
+ *
+ */
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The Security QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create client's Authentication Intializer and Credentials using api ( Same can be set to gfcpp.properties & comment following code ).
+    PropertiesPtr properties = Properties::create();
+    properties->insert("security-client-auth-factory", "createPKCSAuthInitInstance");
+    properties->insert("security-client-auth-library", "securityImpl");
+    properties->insert("security-keystorepath", "keystore/gemfire6.keystore");
+    properties->insert("security-alias", "gemfire6");
+    properties->insert("security-keystorepass", "gemfire");
+    properties->insert("cache-xml-file", "XMLs/clientSecurity.xml");
+
+   // overriding secProp properties.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory(properties);
+    
+    LOGINFO("Connected to the GemFire Distributed System");
+    
+    // Create a GemFire Cache with the "clientSecurity.xml" Cache XML file.
+    CachePtr cachePtr = cacheFactory->create();
+    
+    LOGINFO("Created the GemFire Cache");
+    
+    // Get the example Region from the Cache which is declared in the Cache XML file.
+    RegionPtr regionPtr = cachePtr->getRegion("exampleRegion");
+    
+    LOGINFO("Obtained the Region from the Cache");
+    
+    // Put an Entry (Key and Value pair) into the Region using the direct/shortcut method.
+    regionPtr->put("Key1", "Value1");
+    
+    LOGINFO("Entry created in the Region");
+
+    try {
+    	
+       // Get Entries back out of the Region.
+       CacheablePtr result1Ptr = regionPtr->get("Key1");
+       
+    //collect NotAuthorized exception
+    } catch (const gemfire::NotAuthorizedException& expected) {
+    	
+      LOGINFO("Got expected authorization failure while obtaining the Entry: %s", expected.getMessage());
+      
+    }
+    
+    // Close the GemFire Cache.
+    cachePtr->close();
+    
+    LOGINFO("Closed the GemFire Cache");
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("Security GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/Transactions.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/Transactions.cpp b/geode-client-native/quickstart/cpp/Transactions.cpp
new file mode 100644
index 0000000..5652f83
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/Transactions.cpp
@@ -0,0 +1,110 @@
+/*
+ * The Transaction QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache.
+ * 2. Create the example Region Programmatically.
+ * 3 Begin Transaction
+ * 4. Put Entries (Key and Value pairs) into the Region.
+ * 5. Commit Transaction
+ * 6. Get Entries from the Region.
+ * 7. Begin Transaction
+ * 8. Put Entries (Key and Value pairs) into the Region.
+ * 9. Destroy key
+ * 10. Rollback transaction
+ * 11. Get Entries from the Region.
+ * 12. Close the Cache.
+ *
+ */
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The Transaction QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create a GemFire Cache.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    CachePtr cachePtr = cacheFactory->create();       
+
+    LOGINFO("Created the GemFire Cache");
+
+    RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(CACHING_PROXY);
+
+    LOGINFO("Created the RegionFactory");
+
+    // Create the example Region Programmatically.
+    RegionPtr regionPtr = regionFactory->create("exampleRegion");
+
+    CacheableKeyPtr keyPtr = CacheableInt32::create(123);
+    LOGINFO("Created the Region Programmatically.");
+    CacheTransactionManagerPtr txManager = cachePtr->getCacheTransactionManager();
+    //start a transaction
+    txManager->begin();
+    LOGINFO("Transaction Started");
+
+    regionPtr->put("Key1", "Value1");
+    regionPtr->put("Key2", "Value2");        
+    LOGINFO("Put two entries into the region");
+
+    try{
+      // Commit the transaction
+      txManager->commit();
+      LOGINFO("Transaction Committed");
+    } catch(const CommitConflictException&){
+      LOGINFO("Got CommitConflictException");
+    }
+
+    if(regionPtr->containsKey("Key1")) {
+      LOGINFO("Obtained the first entry from the Region");
+    }
+
+    if(regionPtr->containsKey("Key2")) {
+      LOGINFO("Obtained the second entry from the Region");
+    }
+
+    txManager->begin();
+    LOGINFO("Transaction Started");
+
+    regionPtr->put("Key3", "Value3");
+    LOGINFO("Put the third entry into the Region");
+
+    regionPtr->destroy("Key1");
+    LOGINFO("destroy the first entry");
+
+    txManager->rollback();
+    LOGINFO("Transaction Rollbacked");
+
+    if(regionPtr->containsKey("Key1")) {
+      LOGINFO("Obtained the first entry from the Region");
+    }
+
+    if(regionPtr->containsKey("Key2")) {
+      LOGINFO("Obtained the second entry from the Region");
+    }
+
+    if(regionPtr->containsKey("Key3")) {
+      LOGINFO("ERROR: Obtained the third entry from the Region.");
+    }
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("Transaction GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/TransactionsXA.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/TransactionsXA.cpp b/geode-client-native/quickstart/cpp/TransactionsXA.cpp
new file mode 100755
index 0000000..33ee762
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/TransactionsXA.cpp
@@ -0,0 +1,122 @@
+/*
+ * The XA Transaction QuickStart Example.
+ *
+ * This example takes the following steps:
+ *
+ * 1. Create a GemFire Cache.
+ * 2. Create the example Region Programmatically.
+ * 3. Begin Transaction
+ * 4. Put Entries (Key and Value pairs) into the Region.
+ * 5. 2PC Prepare Transaction
+ * 6. 2PC Commit Transaction
+ * 7. Get Entries from the Region.
+ * 8. Begin Transaction
+ * 9. Put Entries (Key and Value pairs) into the Region.
+ * 10. Destroy key
+ * 11. 2PC Prepare transaction
+ * 12. Rollback transaction
+ * 13. Get Entries from the Region.
+ * 14. Close the Cache.
+ *
+ */
+
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The Transaction QuickStart example.
+int main(int argc, char ** argv)
+{
+  try
+  {
+    // Create a GemFire Cache.
+    CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+
+    CachePtr cachePtr = cacheFactory->create();       
+
+    LOGINFO("Created the GemFire Cache");
+
+    RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(CACHING_PROXY);
+
+    LOGINFO("Created the RegionFactory");
+
+    // Create the example Region Programmatically.
+    RegionPtr regionPtr = regionFactory->create("exampleRegion");
+
+    CacheableKeyPtr keyPtr = CacheableInt32::create(123);
+    LOGINFO("Created the Region Programmatically.");
+
+    InternalCacheTransactionManager2PCPtr txManager =
+    		static_cast<InternalCacheTransactionManager2PCPtr>(cachePtr->getCacheTransactionManager());
+
+    //start a transaction
+    txManager->begin();
+    LOGINFO("Transaction Started");
+
+    regionPtr->put("Key1", "Value1");
+    regionPtr->put("Key2", "Value2");        
+    LOGINFO("Put two entries into the region");
+
+    try{
+      // Prepare the transaction
+      txManager->prepare();
+      LOGINFO("Transaction Prepared");
+
+      // Commit the transaction
+      txManager->commit();
+      LOGINFO("Transaction Committed");
+    } catch(const CommitConflictException&){
+      LOGINFO("Got CommitConflictException");
+    }
+
+    if(regionPtr->containsKey("Key1")) {
+      LOGINFO("Obtained the first entry from the Region");
+    }
+
+    if(regionPtr->containsKey("Key2")) {
+      LOGINFO("Obtained the second entry from the Region");
+    }
+
+    txManager->begin();
+    LOGINFO("Transaction Started");
+
+    regionPtr->put("Key3", "Value3");
+    LOGINFO("Put the third entry into the Region");
+
+    regionPtr->destroy("Key1");
+    LOGINFO("destroy the first entry");
+
+    txManager->prepare();
+    LOGINFO("Transaction Prepared");
+
+    txManager->rollback();
+    LOGINFO("Transaction Rollbacked");
+
+    if(regionPtr->containsKey("Key1")) {
+      LOGINFO("Obtained the first entry from the Region");
+    }
+
+    if(regionPtr->containsKey("Key2")) {
+      LOGINFO("Obtained the second entry from the Region");
+    }
+
+    if(regionPtr->containsKey("Key3")) {
+      LOGINFO("ERROR: Obtained the third entry from the Region.");
+    }
+
+    // Close the GemFire Cache.
+    cachePtr->close();
+
+    LOGINFO("Closed the GemFire Cache");
+
+  }
+  // An exception should not occur
+  catch(const Exception & gemfireExcp)
+  {    
+    LOGERROR("Transaction GemFire Exception: %s", gemfireExcp.getMessage());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/deltaobjects/DeltaExample.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/deltaobjects/DeltaExample.hpp b/geode-client-native/quickstart/cpp/deltaobjects/DeltaExample.hpp
new file mode 100644
index 0000000..ecb539b
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/deltaobjects/DeltaExample.hpp
@@ -0,0 +1,191 @@
+#ifndef __Delta_Example__
+#define __Delta_Example__
+
+#include <gfcpp/GemfireCppCache.hpp>
+
+using namespace gemfire;
+
+class DeltaExample: public Cacheable, public Delta
+{
+
+private:
+
+  // data members
+  int32_t m_field1;
+  int32_t m_field2;
+  int32_t m_field3;
+  
+  // delta indicators
+  mutable bool m_f1set;
+  mutable bool m_f2set;
+  mutable bool m_f3set;
+  
+public:
+
+  DeltaExample(int32_t field1, int32_t field2, int32_t field3) :
+    m_field1(field1), m_field2(field2), m_field3(field3)
+  {
+    reset();
+  }
+  
+  DeltaExample()
+  {
+    reset();
+  }
+  
+  DeltaExample(DeltaExample * copy)
+  {
+    m_field1 = copy->m_field1;
+    m_field2 = copy->m_field2;
+    m_field3 = copy->m_field3;
+    reset();
+  }
+  
+  void reset() const
+  {
+    m_f1set = false;
+    m_f2set = false;
+    m_f3set = false;
+  }
+  
+  int getField1()
+  {
+    return m_field1;
+  }
+  
+  int getField2()
+  {
+    return m_field2;
+  }
+  
+  int getField3()
+  {
+    return m_field3;
+  }
+  
+  void setField1(int val)
+  {
+    lock();
+    m_field1 = val;
+    m_f1set = true;
+    unlock();
+  }
+  
+  void setField2(int val)
+  {
+    lock();
+    m_field2 = val;
+    m_f2set = true;
+    unlock();
+  }
+  
+  void setField3(int val)
+  {
+    lock();
+    m_field3 = val;
+    m_f3set = true;
+    unlock();
+  }
+
+  virtual bool hasDelta()
+  {
+    return m_f1set || m_f2set || m_f3set;
+  }
+  
+  virtual void toDelta(DataOutput& out) const
+  {
+    lock();
+    
+    out.writeBoolean(m_f1set);
+    if (m_f1set)
+    {
+      out.writeInt(m_field1);
+    }
+    out.writeBoolean(m_f2set);
+    if (m_f2set)
+    {
+      out.writeInt(m_field2);
+    }
+    out.writeBoolean(m_f2set);
+    if (m_f2set)
+    {
+      out.writeInt(m_field2);
+    }
+    
+    reset();
+    
+    unlock();
+  }
+
+  virtual void fromDelta(DataInput& in)
+  {
+    lock();
+    
+    in.readBoolean(&m_f1set);
+    if (m_f1set)
+    {
+      in.readInt(&m_field1);
+    }
+    in.readBoolean(&m_f2set);
+    if (m_f2set)
+    {
+      in.readInt(&m_field2);
+    }
+    in.readBoolean(&m_f3set);
+    if (m_f3set)
+    {
+      in.readInt(&m_field3);
+    }
+
+    reset();
+    
+    unlock();
+  }
+  
+  virtual void toData(DataOutput& output) const
+  {
+    lock();
+    output.writeInt(m_field1);
+    output.writeInt(m_field2);
+    output.writeInt(m_field3);
+    unlock();
+  }
+  
+  virtual Serializable* fromData(DataInput& input)
+  {
+    lock();
+    input.readInt(&m_field1);
+    input.readInt(&m_field2);
+    input.readInt(&m_field3);
+    unlock();
+    return this;
+  }
+  
+  virtual int32_t classId() const
+  {
+    return 2;
+  }
+  
+  virtual uint32_t objectSize() const
+  {
+    return 0;
+  }
+  
+  DeltaPtr clone()
+  {
+    return DeltaPtr(new DeltaExample(this));
+  }
+  
+  virtual ~DeltaExample()
+  {
+  }
+  
+  static Serializable* create()
+  {
+    return new DeltaExample();
+  }
+  
+  void lock() const { /* add your platform dependent syncronization code here */ }
+  void unlock() const { /* add your platform dependent syncronization code here */ }
+};
+#endif

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.cpp b/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.cpp
new file mode 100644
index 0000000..44ee750
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.cpp
@@ -0,0 +1,17 @@
+#include "DurableCacheListener.hpp"
+
+void DurableCacheListener::afterRegionLive(const RegionEvent& event)
+{
+    LOGINFO("DurableCacheListener: Got an afterRegionLive event.");
+}
+void DurableCacheListener::afterCreate(const EntryEvent& event)
+{
+  CacheableStringPtr key = dynCast<CacheableStringPtr>(event.getKey());
+  LOGINFO("DurableCacheListener: Got an afterCreate event for key: %s ", key->toString());
+}
+
+void DurableCacheListener::afterUpdate(const EntryEvent& event)
+{
+  CacheableStringPtr key = dynCast<CacheableStringPtr>(event.getKey());
+  LOGINFO("DurableCacheListener: Got an afterUpdate event for key: %s ", key->toString());
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.hpp b/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.hpp
new file mode 100644
index 0000000..d84e83e
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/plugins/DurableCacheListener.hpp
@@ -0,0 +1,24 @@
+/*
+ * DurableClient QuickStart Example.
+ *
+ * This is to use newly added listener callback "afterRegionLive"
+ * It merely prints the events captured from the GemFire Native Client.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+#include <gfcpp/CacheListener.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The SimpleCacheListener class.
+class DurableCacheListener : public CacheListener
+{
+public:
+  // The regionLiveCallback. This get called once all the queued events are recieved by client on reconnect.
+  virtual void afterRegionLive( const RegionEvent& event );
+  virtual void afterCreate( const EntryEvent& event );
+  virtual void afterUpdate( const EntryEvent& event );
+};

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.cpp b/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.cpp
new file mode 100644
index 0000000..c87c216
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.cpp
@@ -0,0 +1,36 @@
+#include "SimpleCacheListener.hpp"
+
+void SimpleCacheListener::afterCreate(const EntryEvent& event)
+{
+  LOGINFO("SimpleCacheListener: Got an afterCreate event.");
+}
+
+void SimpleCacheListener::afterUpdate(const EntryEvent& event)
+{
+  LOGINFO("SimpleCacheListener: Got an afterUpdate event.");
+}
+
+void SimpleCacheListener::afterInvalidate(const EntryEvent& event)
+{
+  LOGINFO("SimpleCacheListener: Got an afterInvalidate event.");
+}
+
+void SimpleCacheListener::afterDestroy(const EntryEvent& event) 
+{
+  LOGINFO("SimpleCacheListener: Got an afterDestroy event.");
+}
+
+void SimpleCacheListener::afterRegionInvalidate(const RegionEvent& event)
+{
+  LOGINFO("SimpleCacheListener: Got an afterRegionInvalidate event.");
+}
+
+void SimpleCacheListener::afterRegionDestroy(const RegionEvent& event)
+{
+  LOGINFO("SimpleCacheListener: Got an afterRegionDestroy event.");
+}
+
+void SimpleCacheListener::close(const RegionPtr& region)
+{
+  LOGINFO("SimpleCacheListener: Got a close event.");
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.hpp b/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.hpp
new file mode 100644
index 0000000..f12e067
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/plugins/SimpleCacheListener.hpp
@@ -0,0 +1,28 @@
+/*
+ * SimpleCacheListener QuickStart Example.
+ *
+ * This is a simple implementation of a Cache Listener
+ * It merely prints the events captured from the GemFire Native Client.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+#include <gfcpp/CacheListener.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The SimpleCacheListener class.
+class SimpleCacheListener : public CacheListener
+{
+public:
+  // The Cache Listener callbacks.
+  virtual void afterCreate( const EntryEvent& event );
+  virtual void afterUpdate( const EntryEvent& event );
+  virtual void afterInvalidate( const EntryEvent& event );
+  virtual void afterDestroy( const EntryEvent& event );
+  virtual void afterRegionInvalidate( const RegionEvent& event );
+  virtual void afterRegionDestroy( const RegionEvent& event );
+  virtual void close(const RegionPtr& region);
+};

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.cpp b/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.cpp
new file mode 100644
index 0000000..6f3ac14
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.cpp
@@ -0,0 +1,20 @@
+#include "SimpleCacheLoader.hpp"
+
+CacheablePtr SimpleCacheLoader::load(
+  const RegionPtr& region, 
+  const CacheableKeyPtr& key, 
+  const UserDataPtr& aCallbackArgument)
+{
+  LOGINFO("SimpleCacheLoader: Got a load event.");
+  
+  CacheablePtr value = CacheableString::create("LoaderValue");
+  
+  return value; 
+}
+
+void SimpleCacheLoader::close( const RegionPtr& region )
+{
+  LOGINFO("SimpleCacheLoader: Got a close event.");
+}
+
+// ----------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.hpp b/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.hpp
new file mode 100644
index 0000000..5876acd
--- /dev/null
+++ b/geode-client-native/quickstart/cpp/plugins/SimpleCacheLoader.hpp
@@ -0,0 +1,26 @@
+/*
+ * SimpleCacheLoader QuickStart Example.
+ *
+ * This is a simple implementation of a Cache Loader
+ * It merely prints the events captured from the GemFire Native Client.
+ *
+ */
+
+// Include the GemFire library.
+#include <gfcpp/GemfireCppCache.hpp>
+#include <gfcpp/CacheLoader.hpp>
+
+// Use the "gemfire" namespace.
+using namespace gemfire;
+
+// The SimpleCacheLoader class.
+class SimpleCacheLoader : public CacheLoader
+{
+public:
+  virtual CacheablePtr load(
+    const RegionPtr& region,
+    const CacheableKeyPtr& key,
+    const UserDataPtr& aCallbackArgument);
+  
+  virtual void close( const RegionPtr& region );
+};



Mime
View raw message