geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [45/51] [partial] incubator-geode git commit: Add source for geode c++ and .net clients
Date Thu, 19 May 2016 15:14:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/BenchmarkHierarchicalClient/README.html
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/BenchmarkHierarchicalClient/README.html b/geode-client-native/examples/clicache/BenchmarkHierarchicalClient/README.html
new file mode 100755
index 0000000..a60785f
--- /dev/null
+++ b/geode-client-native/examples/clicache/BenchmarkHierarchicalClient/README.html
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 7.0/HTML Export Filter">
+
+<TITLE>BenchmarkHierarchicalClient: Pivotal GemFire&#174; Native Client Example</TITLE>
+
+</HEAD>
+<BODY>
+ <IMG SRC="../../../docs/PIVOTAL_GemFire_190x81.png" BORDER="0">
+ <DIV>
+   <h1 align="center"><a name="Top" id="Top"></a>BenchmarkHierarchicalClient</h1>
+   <h2 align="center">
+     Pivotal GemFire&#174; Native Client </h2>
+   <h2 align="center">C# Programming Example</h2>
+</DIV>
+
+ <DIV>
+<H2>
+<br>
+About the BenchmarkHierarchicalClient Example </H2>
+<P>The <code>BenchmarkHierarchicalClient</code> example is an interactive C# program that uses Microsoft .NET Framework 4.0 to access the GemFire C++ API for benchmarking performance between a client and a server.</P>
+<blockquote>
+  <p align="left"><em>Microsoft .NET Framework 4.0 must be installed before running this example. For information about installing the .NET Framework, see  the </em>GemFire Native Client User's Guide<em>.</em></p>
+</blockquote>
+<P><code>BenchmarkHierarchicalClient</code> measures the time it takes for a <code>put</code> operation to return in a hierarchical cache configuration. In this test, the client does the <code>put</code> and its BridgeWriter automatically forwards the <code>put</code> to the server. Consequently, the measurement includes the time required to send the data to the server.</P>
+<P>To run the server and client on separate machines, you need to modify the client configuration file, <a href="./BenchmarkHierarchicalClient.xml" target="_blank"><code>BenchmarkHierarchicalClient.xml</code></a>, changing the two occurrences of the endpoints parameter string, <code>localhost</code>, to the name of the server's machine.</P>
+ </DIV>
+
+<DIV>
+<H2>
+<a name="configuring_environment" id="configuring_environment"></a>Configuring the Environment </H2>
+<P>
+Examples that interact with a Java cache server require specific environment configurations so the Java cache server will run properly. Follow the configuration steps listed below that apply to your operating system: </P>
+</DIV>
+ <DIV>
+<ol>
+  <li>From the GemFire product installation directory, configure your environment settings by following the steps in   <code>examples/EnvSetup.html</code>.<br>
+      <br>
+  <li>Set the <code>JAVA_HOME</code> and <code>GF_JAVA_HOME</code>  environment variables to your installed Java JRE or JDK. See the Installation chapter of the   <em>GemFire User's Guide</em> for the versions of Java that are compatible with GemFire. The <code>JAVA_HOME</code> setting is for your applications, and  <code>GF_JAVA_HOME</code> is for the GemFire scripts.  You must have a compatible Java JRE or JDK installed and you must set <code>JAVA_HOME</code> and <code>GF_JAVA_HOME</code> to point to it.<br>
+      <br>
+  <li>Add <code>$JAVA_HOME/bin</code> to the start of your <code>PATH</code>. <br>
+  <br>
+  <li>Add the GemFire quickstart classes to your <code>CLASSPATH</code>. <br>
+  <blockquote>
+  <p><strong> <code><strong>set CLASSPATH=%GEMFIRE%\quickstart\classes;%CLASSPATH%</strong></code></strong></p>
+</blockquote>  
+</ol>
+<p>The following is a list of the environment configuration commands for the <code>BenchmarkHierarchicalClient</code> example. Choose the set of commands that are appropriate for your operating system. The text that you type is shown in bold.
+  These configurations only need to be performed for the sessions that invoke the Java cache server.</p>
+<p><strong>Bourne and Korn shells (sh, ksh, bash)</strong></p>
+<blockquote>
+  <p>    <code>% <strong>cd GemFireInstallDirectory</strong><br>
+    % <strong>CLASSPATH=$CLASSPATH:$GEMFIRE/quickstart/classes; export CLASSPATH</strong><br>
+    % <strong>cd $GEMFIRE/quickstart</strong><br>
+    % <strong>JAVA_HOME=&lt;installed JRE PATH&gt;; export JAVA_HOME</strong><br>
+    % <strong>GF_JAVA_HOME=$JAVA_HOME; export GF_JAVA_HOME</strong><br>
+    % <strong>PATH=$JAVA_HOME/bin:$PATH; export PATH</strong></code></p>
+</blockquote>
+<p><strong>Windows</strong></p>
+<blockquote>
+  <p><code>&gt; <strong>cd GemFireInstallDirectory</strong><br>
+&gt; <strong>set CLASSPATH=%GEMFIRE%\quickstart\classes;%CLASSPATH%</strong><br>
+&gt; <strong>cd %GEMFIRE%\quickstart</strong><br>
+&gt; <strong>set JAVA_HOME=&lt;installed JRE PATH&gt;</strong><br>
+&gt; <strong>set GF_JAVA_HOME=%JAVA_HOME%</strong><br>
+&gt; <strong>set PATH=%JAVA_HOME%\bin;%PATH%</strong> </code></p>
+</blockquote>
+</DIV>
+
+<DIV>
+<H2>
+Starting BenchmarkHierarchicalClient </H2>
+<P>
+To start the <code>BenchmarkHierarchicalClient</code> example, create a session from the GemFire product installation directory and complete the following steps.  Throughout this example, when you're prompted to enter the native client directory, replace the <code>xxxx</code> in <code>NativeClient_xxxx</code> with the actual four-digit product version number.</P>
+<P>This first session starts the Java cache server. </P>
+</DIV>
+<DIV>
+<OL>
+<LI CLASS="Numbered-1st"><p>
+Configure the session environment according to the steps listed in <a href="#configuring_environment">Configuring the Environment</a><a href="../envsetup.html" target="_blank"></a>.</p>
+</LI>
+<LI CLASS="Numbered-1st">If you have not already done so, go to the <code>%GEMFIRE%/quickstart</code> directory.</LI>
+<blockquote>
+  <p><strong> <code>cd %GEMFIRE%/quickstart</code></strong></p>
+</blockquote>
+<LI CLASS="Numbered">
+Enter this command to start the Java cache server:
+
+  <blockquote>
+   <p><strong>
+     <code>java quickstart.BenchmarkHierarchicalServer</code></strong></p>
+   </blockquote>
+ </LI>
+<LI CLASS="Numbered">
+Create another session and change its working directory to the native client <code>cli_BenchmarkHierarchicalClient</code> example directory:
+  <blockquote>
+    <p><strong><code>cd examples\cli_BenchmarkHierarchicalClient</code></strong></p>
+  </blockquote>
+  <li>
+    Start the <code>BenchmarkHierarchicalClient</code> application:</li>
+  <blockquote>
+   <p><strong>
+     <code>BenchmarkHierarchicalClient.exe</code></strong></p>
+   </blockquote>	
+</OL>
+</DIV>
+<DIV>
+<H2>
+Running the Example </H2>
+</DIV>
+<DIV>
+<P><strong>
+In the client session</strong></P>
+<blockquote>
+  <p>
+    The benchmarking tests may take several moments to finish. After the benchmarking is complete, the following statistical categories are reported in the client session:</p>
+  <blockquote class="style1">
+    <p><code>Benchmark Statistics</code></p>
+    <p><code>Benchmark Averages (Mean)</code></p>
+    <p><code>Best Benchmark Results   </code></p>
+  </blockquote>
+</blockquote>
+<blockquote>
+  <p> When you have finished reviewing the benchmarking results, press <code>Enter</code> to end the <code>BenchmarkHierarchicalClient</code> application. Next, type <strong><code>Exit</code></strong> to close the session.</p>
+</blockquote>
+<p><strong>In the server session</strong></p>
+<blockquote>
+  <p>Press <code>Enter</code> to end the cache server, then type <strong><code>Exit</code></strong> to close the session.</p>
+</blockquote>
+</DIV>
+<DIV>
+<H2>
+Changing System Parameters</H2>
+<P>
+This product ships configured to run with default system properties. If you need to run in a non-default configuration, GemFire also takes a system-level configuration file. To configure a .NET client, rename any <code>gfcpp.properties</code> file currently in the example directory, then copy <code>gfcpp.properties</code> file into your <code>cli_BenchmarkHierarchicalClient</code> directory from the <code>defaultSystem</code> directory. Edit the <code>gfcpp.properties</code> file in your <code>cli_BenchmarkHierarchicalClient</code> directory, as needed.</P>
+<P>If you also need to make a non-default configuration for the Java cache server, rename any <code>gemfire.properties</code> file currently in the <code>%GEMFIRE%/quickstart</code>, then copy <code>gemfire.properties</code> into the <code>/quickstart</code> directory from the <code>%GEMFIRE%/defaultConfigs</code> directory and edit it. For example, to change the name of the <code>cache.xml</code> file, uncomment this line and change the file name:</P>
+<P> <code>#cache-xml-file=cache.xml</code></P>
+<P>When you're done with the example, delete your edited versions of <code>gemfire.properties</code> and <code>gfcpp.properties</code>, then restore the renamed original versions to their original names so other examples can use the unedited files.<code><br>
+    <br>
+</code></P>
+</DIV>
+<a href="#Top">Top</a>
+<P>
+<br>
+<p><span class=GramE>Copyright &#169; 2005-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 one or more patents listed at
+http://www.pivotal.io/patents. </p>
+</BODY>
+</HTML>
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/CacheRunner.cs
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/CacheRunner.cs b/geode-client-native/examples/clicache/CacheRunner/CacheRunner.cs
new file mode 100644
index 0000000..09515aa
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/CacheRunner.cs
@@ -0,0 +1,698 @@
+//=========================================================================
+// 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.
+//========================================================================
+
+using System;
+
+namespace GemStone.GemFire.Cache.Examples
+{
+  using GemStone.GemFire.Cache.Tests;
+  using GemStone.GemFire.Cache;
+
+  // Example class to perform puts/gets using one or more clients.
+  class CacheRunner
+  {
+    #region Local constants
+
+    private static string DefaultXMLPath = "tcr_cache.xml";
+
+    #endregion
+
+    #region Private static members
+
+    private static Cache m_cache = null;
+    private static Region m_region = null;
+
+    #endregion
+
+    static void Main(string[] args)
+    {
+      try
+      {
+        // Connect to distributed system and cache 
+        DSInit(args);
+
+        // Enter puts and gets manually
+        DoCommand();
+      }
+      catch (Exception ex)
+      {
+        Console.WriteLine("{0}An exception occurred: {1}",
+          Environment.NewLine, ex.Message);
+        Console.WriteLine("---[ Press <Enter> to End the Application ]---");
+        Console.ReadLine();
+      }
+      finally
+      {
+        try
+        {
+          // Close the cache and disconnect
+          DSClose();
+        }
+        catch // Ignore any exception here.
+        {
+        }
+      }
+    }
+
+    #region Local functions
+
+    // Initialize the distributed system, setup the cache, register callbacks
+    // and user-defined classes and create the region.
+    public static void DSInit(string[] args)
+    {
+      Console.WriteLine("{0}Connecting to GemFire{0}", Environment.NewLine);
+
+      // Register the ComplexNumber type
+      Serializable.RegisterType(ComplexNumber.Create);
+
+      // Register the Portfolio and Position classes for Query
+      Serializable.RegisterType(Portfolio.CreateDeserializable);
+      Serializable.RegisterType(Position.CreateDeserializable);
+
+      // Register the ExampleObject for putall and interop 
+      Serializable.RegisterType(ExampleObject.CreateDeserializable);
+
+      string xmlPath;
+      // Create a cache
+      if (args != null && args.Length > 1)
+      {
+        throw new ApplicationException(string.Format("Usage: CacheRunner " +
+          "[<XML file name>]{0}\tXML file name is optional " +
+          "and the default is {1}.", Environment.NewLine, DefaultXMLPath));
+      }
+      else if (args != null && args.Length == 1)
+      {
+        xmlPath = args[0];
+      }
+      else
+      {
+        xmlPath = DefaultXMLPath;
+      }
+      CacheFactory cacheFactory = CacheFactory.CreateCacheFactory(null);
+      m_cache = cacheFactory.Set("cache-xml-file", xmlPath).Create();
+      Region[] rootRegions = m_cache.RootRegions();
+      if (rootRegions != null && rootRegions.Length > 0)
+      {
+        SetRegion(rootRegions[rootRegions.Length - 1]);
+      }
+      else
+      {
+        throw new ApplicationException("No root regions found.");
+      }
+    }
+
+    // Close the cache and disconnect from the distributed system.
+    public static void DSClose()
+    {
+      // Close cache
+      if (m_cache != null)
+      {
+        m_cache.Close();
+        m_cache = null;
+        
+        Console.WriteLine("{0}Closed cache", Environment.NewLine);
+      }
+      Console.WriteLine("{0}Connection closed", Environment.NewLine);
+    }
+
+    private static void SetRegion(Region region)
+    {
+      m_region = region;
+      RegionAttributes attrs = m_region.Attributes;
+      if (attrs.ClientNotificationEnabled)
+      {
+        m_region.RegisterAllKeys();
+      }
+      // Add cache listener callback to region
+      if (attrs.CacheListener == null)
+      {
+        ExampleCacheListenerCallback listenerCallback =
+          new ExampleCacheListenerCallback();
+        AttributesMutator mutator = m_region.GetAttributesMutator();
+        mutator.SetCacheListener(listenerCallback);
+      }
+    }
+
+    // Puts a string key and complex number value
+    public static void PutComplex(string key, ComplexNumber value)
+    {
+      m_region.Put(key, value);
+      Console.WriteLine("Put complex -- key: " + key + " value: " + value);
+    }
+
+    // Puts a string key and string value
+    public static void PutStr(string key, string value)
+    {
+      m_region.Put(key, value);
+      Console.WriteLine("Put string  -- key: " + key + " value: " + value);
+    }
+
+    // Puts a string key and bytes value
+    public static void PutBytes(string key, string value)
+    {
+      byte[] buffer = new byte[value.Length];
+      for (int index = 0; index < value.Length; index++)
+      {
+        buffer[index] = (byte)value[index];
+      }
+      m_region.Put(key, buffer);
+      Console.WriteLine("Put string  -- key: " + key + " value: " + value);
+    }
+
+    // Puts a string key and object
+    public static void PutObject(string key, IGFSerializable cValue)
+    {
+      m_region.Put(key, cValue);
+      Console.WriteLine("Put  -- key: " + key + " value: " + cValue);
+    }
+
+    // Puts a string key and portfolio object
+    public static void PutPortfolio(string key, int id)
+    {
+      Portfolio portfolio = new Portfolio(id, 2);
+      m_region.Put(key, portfolio);
+      Console.WriteLine("Put portfolio  -- key: " + key + " id: " + id);
+    }
+
+    // Puts a string key and position object
+    public static void PutPosition(string key, int id)
+    {
+      Position position = new Position(key, id);
+      m_region.Put(key, position);
+      Console.WriteLine("Put position  -- key: " + key + " id: " + id);
+    }
+
+    // Gets the value, if the key exists
+    public static string GetStr(string key)
+    {
+      string testStr = string.Empty;
+
+      IGFSerializable cValue = m_region.Get(key);
+      // Is the key found?
+      if (cValue != null)
+      {
+        testStr = cValue.ToString();
+
+        // Type of value?
+        if (cValue is CacheableBytes)
+        {
+          System.Text.StringBuilder sb = new System.Text.StringBuilder();
+          CacheableBytes cBytes = cValue as CacheableBytes;
+          foreach (byte b in cBytes.Value)
+          {
+            sb.Append((char)b);
+          }
+          testStr = sb.ToString();
+        }
+        else if (cValue is CacheableObjectXml)
+        {
+          object val = ((CacheableObjectXml)cValue).Value;
+          System.Xml.XmlDocument xd = val as System.Xml.XmlDocument;
+          if (xd != null)
+          {
+            testStr = xd.OuterXml;
+          }
+        }
+        Console.WriteLine("Get [{0}] -- key: {1}, value: {2}",
+          cValue.GetType().Name, key, testStr);
+      }
+      else
+      {
+        testStr = "NULL";
+        Console.WriteLine("No such key in region: " + key);
+      }
+
+      return testStr;
+    }
+
+    // Run the given query
+    public static void RunQuery(string query, bool isRegionQuery)
+    {
+      try
+      {
+        ISelectResults results = null;
+
+        if (isRegionQuery)
+        {
+          results = m_region.Query(query);
+        }
+        else
+        {
+          QueryService qs = m_cache.GetQueryService("examplePool");
+          Query qry = qs.NewQuery(query);
+          results = qry.Execute();
+        }
+        if (results is ResultSet)
+        {
+          uint index = 1;
+          foreach (IGFSerializable result in results)
+          {
+            Console.WriteLine("\tResult {0}: {1}", index, result);
+            index++;
+          }
+        }
+        else
+        {
+          StructSet ss = (StructSet)results;
+          Console.Write("Columns:");
+          uint index = 0;
+          string colName;
+          while ((colName = ss.GetFieldName(index)) != null)
+          {
+            Console.Write('\t' + colName);
+            index++;
+          }
+          Console.WriteLine();
+          index = 1;
+          foreach (Struct si in results)
+          {
+            Console.Write("\tResult {0}: ");
+            while (si.HasNext())
+            {
+              Console.Write(si.Next() + " || ");
+            }
+            Console.WriteLine();
+            index++;
+          }
+        }
+      }
+      catch (Exception ex)
+      {
+        Console.WriteLine("Exception while running the query [{0}]: {1}",
+          query, ex.Message);
+      }
+    }
+
+    // Run the given query and display the single result value
+    public static void SelectValue(string query)
+    {
+      try
+      {
+        IGFSerializable result = m_region.SelectValue(query);
+
+        if (result is Struct)
+        {
+          Struct si = result as Struct;
+          Console.Write("Columns:");
+          uint index = 0;
+          string colName;
+          while ((colName = si.Set.GetFieldName(index)) != null)
+          {
+            Console.Write('\t' + colName);
+            index++;
+          }
+          Console.WriteLine();
+
+          index = 0;
+          Console.Write("\tResult {0}: ");
+          while (si.HasNext())
+          {
+            Console.Write(si.Next() + " || ");
+          }
+          Console.WriteLine();
+          index++;
+        }
+        else
+        {
+          Console.WriteLine("\tResult : {0}", result);
+        }
+      }
+      catch (Exception ex)
+      {
+        Console.WriteLine("Exception while running the query [{0}]: {1}",
+          query, ex.Message);
+      }
+    }
+
+    private static int getTS(DateTime ts)
+    {
+      int ms = (ts.Hour * 3600 + ts.Minute * 60 + ts.Second) * 1000 + ts.Millisecond;
+      return ms;
+    }
+
+    // Run the given query and display if value exists
+    public static void ExistsValue(string query)
+    {
+      try
+      {
+        bool result = m_region.ExistsValue(query);
+
+        Console.WriteLine("\tResult is {0}", result);
+      }
+      catch (Exception ex)
+      {
+        Console.WriteLine("Exception while running the query [{0}]: {1}",
+          query, ex.Message);
+      }
+    }
+
+    // Waits for input of a command (chrgn, get, put, putAll, exec, query,
+    // existsvalue, selectvalue or quit), then does just that.
+    public static void DoCommand()
+    {
+      string myCmd = string.Empty;
+      string myKey;
+      string myValue;
+
+      while (myCmd != "quit")
+      {
+        Console.Write("{0}: chrgn, lsrgn, get, put, putAll, run, exec, query, " +
+          "existsvalue, selectvalue, quit: ", m_region.FullPath);
+
+        string strIn = Console.ReadLine().Trim();
+        string[] strSplit = strIn.Split(' ');
+
+        myCmd = strSplit[0];
+        myCmd = myCmd.ToLower();
+
+        if (myCmd == "q") { myCmd = "quit"; }
+
+        switch (myCmd)
+        {
+          case "chrgn":
+            if (strSplit.Length == 2)
+            {
+              string regionPath = strSplit[1].Trim();
+              Region region = null;
+              try
+              {
+                region = m_cache.GetRegion(regionPath);
+              }
+              catch
+              {
+              }
+              if (region == null)
+              {
+                Console.WriteLine("No region {0} found.", regionPath);
+                Console.WriteLine("usage: chrgn region-path");
+              }
+              else
+              {
+                SetRegion(region);
+              }
+            }
+            else
+            {
+              Console.WriteLine("usage: chrgn region-path \t change the " +
+                "current region to the given region; the region-path can " +
+                "be absolute or relative to the current region");
+            }
+            break;
+
+          case "lsrgn":
+            Region[] rootRegions = m_cache.RootRegions();
+            Console.Write("\nNumber of regions in Cache: {0}\n", rootRegions.Length);
+            int count = 1;
+            for (int rgnCnt = 0; rgnCnt < rootRegions.Length; rgnCnt++)
+            {
+              Console.Write("Region Name {0}: {1}\n",count++,rootRegions[rgnCnt].Name);
+            }
+            break;
+
+          case "run":
+            if (strSplit.Length == 3)
+            {
+              string myNumber = strSplit[1];
+              string mySize = strSplit[2];
+              int number = int.Parse(myNumber);
+              int size = int.Parse(mySize);
+              byte[] payload = new byte[size];
+
+              CacheableHashMap map = new CacheableHashMap();
+              int ts1 = getTS(System.DateTime.Now);
+              for (int i = 0; i < number; i++)
+              {
+                if (size == 0)
+                {
+                  map.Add(new CacheableInt32(i), new ExampleObject(i));
+                }
+                else
+                {
+                  map.Add(CacheableInt32.Create(i),
+                    CacheableBytes.Create(payload));
+                }
+              }
+              m_region.PutAll(map);
+              int ts2 = getTS(System.DateTime.Now);
+              Double run_t = (ts2 - ts1) / 1000.0;
+              Console.WriteLine("Ops/sec: {0}, {1}, {2}", number / run_t, ts1, ts2);
+            } else {
+              Console.WriteLine("usage: run numOfKeys entrySize");
+            }
+            break;
+
+          case "putall":
+            if (strSplit.Length == 3)
+            {
+              myKey = strSplit[1];
+              myValue = strSplit[2];
+              int num = int.Parse(myValue);
+
+              //byte[] payload = new byte[10];
+              //for (int index = 0; index < 10; index++)
+              //{
+              //payload[index] = 1;
+              //}
+
+              Console.WriteLine("putAll: " + myKey + ":" + num);
+
+              CacheableHashMap map = new CacheableHashMap();
+              map.Clear();
+              for (int i = 0; i < num; i++)
+              {
+                string key = myKey + i;
+                // map.Add(new CacheableString(key), (CacheableBytes)(payload));
+                map.Add(new CacheableString(key), new ExampleObject(i));
+                // map.Add(new CacheableString(key), new Position(i));
+              }
+              m_region.PutAll(map);
+            } else {
+              Console.WriteLine("usage: putAll keyBase numOfKeys");
+            }
+            break;
+
+          case "put":
+            if (strSplit.Length == 3)
+            {
+              myKey = strSplit[1];
+              myValue = strSplit[2];
+
+              // Check to see if value is ComplexNumber or String
+              ComplexNumber cNum = ComplexNumber.Parse(myValue);
+
+              if (cNum != null)
+              {
+                // Put the key and value
+                PutComplex(myKey, cNum);
+              }
+              else
+              {
+                // Put the key and value
+                PutStr(myKey, myValue);
+              }
+            }
+            else if (strSplit.Length == 4)
+            {
+              myKey = strSplit[1];
+              myValue = strSplit[2];
+              string type = strSplit[3];
+              type = type.ToLower();
+
+              switch (type)
+              {
+                case "str":
+                  PutStr(myKey, myValue);
+                  break;
+
+                case "bytes":
+                  PutBytes(myKey, myValue);
+                  break;
+
+                case "complex":
+                  ComplexNumber cNum = ComplexNumber.Parse(myValue);
+                  if (cNum != null)
+                  {
+                    PutComplex(myKey, cNum);
+                  }
+                  else
+                  {
+                    Console.WriteLine("Could not parse the complex number.");
+                  }
+                  break;
+
+                case "double":
+                  double dval = 0.0;
+                  try
+                  {
+                    dval = double.Parse(myValue);
+                  }
+                  catch (Exception ex)
+                  {
+                    Console.WriteLine("Double value [{0}] not valid: {1}.", myValue, ex);
+                    break;
+                  }
+                  PutObject(myKey, new CacheableDouble(dval));
+                  break;
+
+                case "float":
+                  float fval = 0.0F;
+                  try
+                  {
+                    fval = float.Parse(myValue);
+                  }
+                  catch (Exception ex)
+                  {
+                    Console.WriteLine("Float value [{0}] not valid: {1}.", myValue, ex);
+                    break;
+                  }
+                  PutObject(myKey, new CacheableFloat(fval));
+                  break;
+
+                case "obj":
+                  string xmlStr = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+                  xmlStr += "<IndexMessage xmlns=\"urn:example.com:FinanceManager.Messages:v1.0\">";
+                  xmlStr += "<Keys>11</Keys><Keys>22</Keys><Keys>33</Keys></IndexMessage>";
+
+                  System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
+                  xd.LoadXml(xmlStr);
+                  PutObject(myKey, CacheableObjectXml.Create(xd));
+                  break;
+
+                case "port":
+                  int id = 0;
+                  try
+                  {
+                    id = int.Parse(myValue);
+                  }
+                  catch
+                  {
+                    Console.WriteLine("Portfolio value [{0}] not a valid"
+                      + " integer ID.", myValue);
+                    break;
+                  }
+                  PutPortfolio(myKey, id);
+                  break;
+
+                case "pos":
+                  int id2 = 0;
+                  try
+                  {
+                    id2 = int.Parse(myValue);
+                  }
+                  catch
+                  {
+                    Console.WriteLine("Position value [{0}] not a valid"
+                      + " integer ID.", myValue);
+                    break;
+                  }
+                  PutPosition(myKey, id2);
+                  break;
+
+                default:
+                  Console.WriteLine("usage: put key value [str|bytes|complex|double|float|obj|port|pos]");
+                  break;
+              }
+            }
+            else
+            {
+              Console.WriteLine("usage: put key value [str|bytes|complex|double|float|obj|port|pos]");
+            }
+            break;
+
+          case "get":
+            if (strSplit.Length == 2)
+            {
+              myKey = strSplit[1];
+
+              // Get the value
+              string xStr = GetStr(myKey);
+            }
+            else
+            {
+              Console.WriteLine("usage: get key");
+            }
+
+            break;
+
+          case "exec":
+            if (strSplit.Length > 1)
+            {
+              string query = string.Empty;
+              for (int index = 1; index < strSplit.Length; index++)
+              {
+                query += strSplit[index] + ' ';
+              }
+              query = query.Trim();
+              RunQuery(query, false);
+            }
+            else
+            {
+              Console.WriteLine("usage: exec <select query string>");
+            }
+
+            break;
+
+          case "query":
+            if (strSplit.Length > 1)
+            {
+              string query = string.Empty;
+              for (int index = 1; index < strSplit.Length; index++)
+              {
+                query += strSplit[index] + ' ';
+              }
+              query = query.Trim();
+              RunQuery(query, true);
+            }
+            else
+            {
+              Console.WriteLine("usage: query <query predicate>");
+            }
+
+            break;
+
+          case "existsvalue":
+            if (strSplit.Length > 1)
+            {
+              string query = string.Empty;
+              for (int index = 1; index < strSplit.Length; index++)
+              {
+                query += strSplit[index] + ' ';
+              }
+              query = query.Trim();
+              ExistsValue(query);
+            }
+            else
+            {
+              Console.WriteLine("usage: existsvalue <query predicate>");
+            }
+
+            break;
+
+          case "selectvalue":
+            if (strSplit.Length > 1)
+            {
+              string query = string.Empty;
+              for (int index = 1; index < strSplit.Length; index++)
+              {
+                query += strSplit[index] + ' ';
+              }
+              query = query.Trim();
+              SelectValue(query);
+            }
+            else
+            {
+              Console.WriteLine("usage: selectvalue <query predicate>");
+            }
+
+            break;
+        }
+      }
+    }
+
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj b/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj
new file mode 100644
index 0000000..0bc705f
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj
@@ -0,0 +1,129 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{D8F67104-CDDE-433F-A8EE-470A92180AB9}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>GemStone.GemFire.Cache.Examples</RootNamespace>
+    <AssemblyName>CacheRunner</AssemblyName>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\Debug\CacheRunner\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\Debug\CacheRunner\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\CacheRunner\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\CacheRunner\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\Debug\CacheRunner\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\Debug\CacheRunner\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <IntermediateOutputPath>$(OSBUILDDIR)\examples\clicache\CacheRunner\</IntermediateOutputPath>
+    <OutputPath>$(OSBUILDDIR)\examples\clicache\CacheRunner\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.XML" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\..\tests\clicache\TestObject\Portfolio.cs">
+      <Link>Portfolio.cs</Link>
+    </Compile>
+    <Compile Include="..\..\..\tests\clicache\TestObject\Position.cs">
+      <Link>Position.cs</Link>
+    </Compile>
+    <Compile Include="CacheRunner.cs" />
+    <Compile Include="Callbacks.cs" />
+    <Compile Include="ComplexNumber.cs" />
+    <Compile Include="ExampleObject.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\vs_projects\gfclicache\gfclicache.vcproj">
+      <Project>{B274E3B1-6A09-4322-952B-8BDA712892CE}</Project>
+      <Name>gfclicache</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\dist\cacheRunner\cacherunner.xml">
+      <Link>cacherunner.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\cacherunner2.xml">
+      <Link>cacherunner2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\csQueryPortfolios.xml">
+      <Link>csQueryPortfolios.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\csQueryPortfolios2.xml">
+      <Link>csQueryPortfolios2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\tcr_cache.xml">
+      <Link>tcr_cache.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\tcr_cacheless.xml">
+      <Link>tcr_cacheless.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\tcr_hacache.xml">
+      <Link>tcr_hacache.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\dist\cacheRunner\tcr_hacacheless.xml">
+      <Link>tcr_hacacheless.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj.user
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj.user b/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj.user
new file mode 100644
index 0000000..99f5303
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/CacheRunner.csproj.user
@@ -0,0 +1,6 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ReferencePath>$(OSBUILDDIR)\hidden\lib\</ReferencePath>
+    <ProjectView>ProjectFiles</ProjectView>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/Callbacks.cs
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/Callbacks.cs b/geode-client-native/examples/clicache/CacheRunner/Callbacks.cs
new file mode 100644
index 0000000..f0f6634
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/Callbacks.cs
@@ -0,0 +1,85 @@
+/*=========================================================================
+ * 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.
+ *========================================================================
+ */
+
+using System;
+
+namespace GemStone.GemFire.Cache.Examples
+{
+  /// <summary>
+  /// Capture and display cache events.
+  /// </summary>
+  class ExampleCacheListenerCallback : ICacheListener
+  {
+    public static ICacheListener Create()
+    {
+      return new ExampleCacheListenerCallback();
+    }
+
+    #region ICacheListener Members
+
+    public void AfterCreate(EntryEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterCreate event of: {1}",
+        Environment.NewLine, ev.Key);
+    }
+
+    public void AfterDestroy(EntryEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterDestroy event of: {1}",
+        Environment.NewLine, ev.Key);
+    }
+
+    public void AfterInvalidate(EntryEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterInvalidate event of: {1}",
+        Environment.NewLine, ev.Key);
+    }
+
+    public void AfterRegionClear(RegionEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterRegionClear event of region: {1}",
+        Environment.NewLine, ev.Region.Name);
+    }
+
+    public void AfterRegionDestroy(RegionEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterRegionDestroy event of region: {1}",
+        Environment.NewLine, ev.Region.Name);
+    }
+
+    public void AfterRegionInvalidate(RegionEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterRegionInvalidate event of region: {1}",
+        Environment.NewLine, ev.Region.Name);
+    }
+
+    public void AfterRegionLive(RegionEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterRegionLive event of region: {1}",
+        Environment.NewLine, ev.Region.Name);
+    }
+
+    public void AfterUpdate(EntryEvent ev)
+    {
+      Console.WriteLine("{0}--- Received afterUpdate event of: {1}",
+        Environment.NewLine, ev.Key);
+    }
+    
+    public void Close(Region region)
+    {
+      Console.WriteLine("{0}--- Received close event of region: {1}",
+        Environment.NewLine, region.Name);
+    }
+    public void AfterRegionDisconnected(Region region)
+    {
+      Console.WriteLine("{0}--- Received disconnected event of region: {1}",
+        Environment.NewLine, region.Name);
+    }
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/ComplexNumber.cs
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/ComplexNumber.cs b/geode-client-native/examples/clicache/CacheRunner/ComplexNumber.cs
new file mode 100644
index 0000000..8c36d7a
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/ComplexNumber.cs
@@ -0,0 +1,206 @@
+/*=========================================================================
+ * 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.
+ *========================================================================
+ */
+
+using System;
+using System.Text.RegularExpressions;
+
+namespace GemStone.GemFire.Cache.Examples
+{
+  /// <summary>
+  /// A complex number -- no operations defined yet.
+  /// </summary>
+  public class ComplexNumber : ICacheableKey
+  {
+    #region Public Accessors
+
+    /// <summary>
+    /// The real portion of the complex number.
+    /// </summary>
+    public double Real
+    {
+      get
+      {
+        return m_real;
+      }
+      set
+      {
+        m_real = value;
+      }
+    }
+
+    /// <summary>
+    /// The imaginary portion of the complex number.
+    /// </summary>
+    public double Imaginary
+    {
+      get
+      {
+        return m_imaginary;
+      }
+      set
+      {
+        m_imaginary = value;
+      }
+    }
+
+    #endregion
+
+    #region Private members
+
+    private double m_real;
+    private double m_imaginary;
+
+    #endregion
+
+    #region Constructor and factory function
+
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="real">Real part</param>
+    /// <param name="imaginary">Imaginary part</param>
+    public ComplexNumber(double real, double imaginary)
+    {
+      m_real = real;
+      m_imaginary = imaginary;
+    }
+
+    /// <summary>
+    /// Factory function to be registered using
+    /// <see cref="Serializable.registerType" />.
+    /// </summary>
+    public static IGFSerializable Create()
+    {
+      return new ComplexNumber(0.0, 0.0);
+    }
+
+    #endregion
+
+    #region Serialization -- IGFSerializable members
+
+    /// <summary>
+    /// Read the complex number from the <see cref="DataInput" /> stream.
+    /// </summary>
+    /// <param name="input">The <c>DataInput</c> stream.</param>
+    /// <returns>A reference to <c>this</c> object.</returns>
+    public IGFSerializable FromData(DataInput input)
+    {
+      m_real = input.ReadDouble();
+      m_imaginary = input.ReadDouble();
+      return this;
+    }
+
+    /// <summary>
+    /// Write the complex number to the <see cref="DataOutput" /> stream.
+    /// </summary>
+    /// <param name="output">The <c>DataOutput</c> stream.</param>
+    public void ToData(DataOutput output)
+    {
+      output.WriteDouble(m_real);
+      output.WriteDouble(m_imaginary);
+    }
+
+    /// <summary>
+    /// return the size of this object in bytes
+    /// </summary>
+    public UInt32 ObjectSize
+    {
+      get
+      {
+        return (UInt32) (sizeof(double) + sizeof(double));
+      }
+    }
+
+    /// <summary>
+    /// Get the <see cref="IGFSerializable.ClassId" /> of this class.
+    /// </summary>
+    /// <returns>The classId.</returns>
+    public UInt32 ClassId
+    {
+      get
+      {
+        return 0x04;
+      }
+    }
+
+    #endregion
+
+    #region ICacheableKey Members
+
+    public bool Equals(ICacheableKey other)
+    {
+      ComplexNumber cOther = other as ComplexNumber;
+      if (cOther != null)
+      {
+        return (m_real == cOther.m_real) && (m_imaginary == cOther.m_imaginary);
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Gets the hashcode by XORing the hashcodes of real and imaginary parts
+    /// </summary>
+    public override int GetHashCode()
+    {
+      return m_real.GetHashCode() ^ m_imaginary.GetHashCode();
+    }
+
+    #endregion
+
+    #region Overridden System.Object members
+
+    /// <summary>
+    /// Check whether this <c>ComplexNumber</c> is equal to the given object.
+    /// </summary>
+    /// <param name="obj">The object to use compare to.</param>
+    /// <returns>True if the object is equal, false otherwise.</returns>
+    public override bool Equals(object obj)
+    {
+      if (obj is ComplexNumber)
+      {
+        ComplexNumber other = obj as ComplexNumber;
+        return (m_real == other.m_real) && (m_imaginary == other.m_imaginary);
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Get a string representation of the form 'a+bi' for this complex number.
+    /// </summary>
+    /// <returns>The string representation of this object.</returns>
+    public override string ToString()
+    {
+      return m_real.ToString() + '+' + m_imaginary.ToString() + 'i';
+    }
+
+    #endregion
+
+    #region Read string representation and create new ComplexNumber
+
+    /// <summary>
+    /// A convenience Parse method to get a ComplexNumber from a given string.
+    /// The format is expected to be of the form a+bi, such as "7+3.14i".
+    /// </summary>
+    /// <param name="s">The string to parse.</param>
+    /// <returns>The ComplexNumber that this string represents; null if format not correct.</returns>
+    public static ComplexNumber Parse(string s)
+    {
+      const string dbPat = @"([0-9]+)|([0-9]*\.[0-9]+)";
+      Match mt = Regex.Match(s, @"^\s*(?<REAL>" + dbPat + @")\s*\+\s*(?<IM>" + dbPat + @")i\s*$");
+      if (mt != null && mt.Length > 0)
+      {
+        double real = double.Parse(mt.Groups["REAL"].Value);
+        double imaginary = double.Parse(mt.Groups["IM"].Value);
+        return new ComplexNumber(real, imaginary);
+      }
+      return null;
+    }
+
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/ExampleObject.cs
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/ExampleObject.cs b/geode-client-native/examples/clicache/CacheRunner/ExampleObject.cs
new file mode 100755
index 0000000..897133f
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/ExampleObject.cs
@@ -0,0 +1,229 @@
+/*=========================================================================
+ * 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.
+ *========================================================================
+ */
+
+/*
+ * @brief ExampleObject class for testing the put functionality for object. 
+ */
+
+using System;
+namespace GemStone.GemFire.Cache.Examples
+{
+  public class ExampleObject
+    : IGFSerializable
+  {
+    #region Private members
+    private double double_field;
+    private float  float_field;
+    private long  long_field;
+    private int  int_field;
+    private short  short_field;
+    private string  string_field;
+      private System.Collections.ArrayList string_vector = new System.Collections.ArrayList();
+    #endregion
+
+    #region Public accessors
+    public int Int_Field
+    {
+      get
+      {
+        return int_field;
+      }
+      set
+      {
+        int_field = value;
+      }
+    }
+    public short Short_Field
+    {
+      get
+      {
+        return short_field;
+      }
+      set
+      {
+        short_field = value;
+      }
+    }
+    public long Long_Field
+    {
+      get
+      {
+        return long_field;
+      }
+      set
+      {
+        long_field = value;
+      }
+    }
+    public float Float_Field
+    {
+      get
+      {
+        return float_field;
+      }
+      set
+      {
+        float_field = value;
+      }
+    }
+    public double Double_Field
+    {
+      get
+      {
+        return double_field;
+      }
+      set
+      {
+        double_field = value;
+      }
+    }
+    public string String_Field
+    {
+      get
+      {
+        return string_field;
+      }
+      set
+      {
+        string_field = value;
+      }
+    }
+    public System.Collections.ArrayList String_Vector
+    {
+      get
+      {
+        return string_vector;
+      }
+      set
+      {
+        string_vector = value;
+      }
+    }
+    public override string ToString()
+    {
+        string buffer = "ExampleObject: "+int_field+"(int),"+string_field+"(str),";
+        buffer += "[";
+        for (int idx = 0; idx < string_vector.Count; idx++)
+        {
+            buffer += string_vector[idx];
+        }
+        buffer += "(string_vector)]";
+        return buffer;
+    }
+    #endregion
+
+    #region Constructors
+    public ExampleObject()
+    {
+      double_field = (double)0.0;
+      float_field = (float)0.0;
+      long_field = 0;
+      int_field = 0;
+      short_field = 0;
+      string_field = "";
+      string_vector.Clear();
+    }
+
+    public ExampleObject(int id) {
+      int_field = id;
+      short_field = (Int16)id;
+      long_field = (Int64)id;
+      float_field = (float)id;
+      double_field = (double)id;
+      string_field = ""+id;
+      string_vector.Clear();
+      for (int i=0; i<3; i++) {
+        string_vector.Add(string_field);
+      }
+    }
+    public ExampleObject(string sValue) {
+      int_field = Int32.Parse(sValue);
+      long_field = Int64.Parse(sValue);
+      short_field = Int16.Parse(sValue);
+      double_field = (double)int_field;
+      float_field = (float)int_field;
+      string_field = sValue;
+      string_vector.Clear();
+      for (int i=0; i<3; i++) {
+        string_vector.Add(sValue);
+      }
+    }
+    #endregion
+
+    #region IGFSerializable Members
+    public IGFSerializable FromData(DataInput input)
+    {
+      double_field = input.ReadInt64();
+      float_field = input.ReadFloat();
+      long_field = input.ReadInt64();
+      int_field = input.ReadInt32();
+      short_field = input.ReadInt16();
+      string_field = input.ReadUTF();
+      int itemCount = input.ReadInt32();
+      string_vector.Clear();
+      for (int idx = 0; idx<itemCount; itemCount++) {
+          string_vector.Add(input.ReadUTF());
+      }
+      return this;
+    }
+
+    public void ToData(DataOutput output)
+    {
+      output.WriteDouble( double_field );
+      output.WriteFloat( float_field );
+      output.WriteInt64( long_field );
+      output.WriteInt32( int_field );
+      output.WriteInt16( short_field );
+      output.WriteUTF( string_field );
+      int itemCount = string_vector.Count;
+      output.WriteInt32( itemCount );
+      for( int idx = 0; idx < itemCount; idx++ ) {
+          string s = (string)string_vector[idx];
+        output.WriteUTF( s );
+      }
+    }
+
+    public UInt32 ObjectSize
+    {
+      get
+      {
+        UInt32 objectSize = 0;
+        objectSize += (UInt32)sizeof(double);
+        objectSize += (UInt32)sizeof(float);
+        objectSize += (UInt32)sizeof(Int64);
+        objectSize += (UInt32)sizeof(Int32);
+        objectSize += (UInt32)sizeof(Int16);
+        objectSize += (UInt32)(string_field == null ? 0 : sizeof(char) * string_field.Length);
+        objectSize += (UInt32)sizeof(Int32);
+        for (int idx = 0; idx<string_vector.Count; idx++) {
+            string s = (string)string_vector[idx];
+            objectSize += (UInt32)(string_vector[idx] == null ? 0 : sizeof(char) * s.Length);
+        }
+        return objectSize;
+      }
+    }
+
+    public UInt32 ClassId
+    {
+      get
+      {
+        return 0x2e;
+      }
+    }
+    #endregion
+
+    public static IGFSerializable CreateDeserializable()
+    {
+      return new ExampleObject();
+    }
+  }
+
+};
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/clicache/CacheRunner/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/clicache/CacheRunner/Properties/AssemblyInfo.cs b/geode-client-native/examples/clicache/CacheRunner/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4fbf771
--- /dev/null
+++ b/geode-client-native/examples/clicache/CacheRunner/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GemFireCacheRunner")]
+[assembly: AssemblyDescription("GemFire ThinClient PutGet Example")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("GemStone Systems Inc.")]
+[assembly: AssemblyProduct("GemFireCacheRunner")]
+[assembly: AssemblyCopyright("Copyright © GemStone Systems Inc. 2008")]
+[assembly: AssemblyTrademark("All Rights Reserved")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bfe795a5-161f-4bb0-9694-f225e1f465be")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("9.0.0.0")]
+[assembly: AssemblyFileVersion("9.0.0.0")]


Mime
View raw message