geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmil...@apache.org
Subject [1/2] geode-native git commit: GEODE-2513 Unbrand Programming Examples section
Date Wed, 15 Mar 2017 22:34:12 GMT
Repository: geode-native
Updated Branches:
  refs/heads/develop 39a0d7137 -> 125624f5b


GEODE-2513 Unbrand Programming Examples section

- also removed ancient examples, and replaced them with pointers
to the QuickStart examples


Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/0138dbd5
Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/0138dbd5
Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/0138dbd5

Branch: refs/heads/develop
Commit: 0138dbd5a753c7671c82773fcee76f847a6edebb
Parents: 4c18359
Author: Karen Miller <kmiller@pivotal.io>
Authored: Wed Mar 15 13:34:41 2017 -0700
Committer: Karen Miller <kmiller@pivotal.io>
Committed: Wed Mar 15 13:34:41 2017 -0700

----------------------------------------------------------------------
 .../source/subnavs/geode-nc-nav.erb             |  2 +-
 .../cpp-example.html.md.erb                     | 28 +------
 .../csharp-example.html.md.erb                  | 81 +-------------------
 .../native-client-region.html.md.erb            |  8 +-
 .../programming-examples.html.md.erb            |  8 +-
 .../serialization-java.html.md.erb              | 12 +--
 .../serialization-overview.html.md.erb          |  2 -
 7 files changed, 18 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
index e61c9ea..2c38410 100644
--- a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
+++ b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb
@@ -883,7 +883,7 @@ limitations under the License.
                         <a href="/docs/guide-native/11/programming-examples/programming-examples.html">Programming
Examples</a>
                         <ul>
                             <li>
-                                <a href="/docs/guide-native/11/programming-examples/native-client-region.html">Declaring
a Native Client Region</a>
+                                <a href="/docs/guide-native/11/programming-examples/native-client-region.html">Declaring
a Client Region</a>
                             </li>
                             <li>
                                 <a href="/docs/guide-native/11/programming-examples/csharp-example.html">API
Programming Example – C#</a>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-docs/programming-examples/cpp-example.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/programming-examples/cpp-example.html.md.erb b/docs/geode-native-docs/programming-examples/cpp-example.html.md.erb
index 831dfe3..e43f2a6 100644
--- a/docs/geode-native-docs/programming-examples/cpp-example.html.md.erb
+++ b/docs/geode-native-docs/programming-examples/cpp-example.html.md.erb
@@ -19,32 +19,8 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The next example uses the C++ API to implement a cache loader, which is generally used to
retrieve data from an outside source.
 
-``` pre
-CacheablePtr TestCacheLoader::load(const RegionPtr& region,
-                                   const CacheableKeyPtr& key,
-                                   const UserDataPtr& aCallbackArgument)
-{
-  m_bInvoked = true;
-  printf("CacheLoader.load : %s\n", printEvent(region, key,
-          aCallbackArgument).c_str());
-  CacheablePtr value = NULLPTR;
-  try {
-    value = region->get(key, aCallbackArgument);
-  } catch(Exception& ex) {
-    fprintf(stderr, "Exception in TestCacheCallback::printEvent [%s]\n", ex.getMessage());
-  }
-  if (value != NULLPTR) {
-    printf( "Loader found value: ");
-    std::string formatValue = printEntryValue(value);
-    printf( "%s\n",formatValue.c_str());
-  } else {
-    printf( " Loader did not find a value");
-  }
- 
-  return value;
-}
-```
+See [QuickStart Examples](../introduction/quickstart.html)
+for C++ programming examples.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-docs/programming-examples/csharp-example.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/programming-examples/csharp-example.html.md.erb b/docs/geode-native-docs/programming-examples/csharp-example.html.md.erb
index 8251891..bf2f7fb 100644
--- a/docs/geode-native-docs/programming-examples/csharp-example.html.md.erb
+++ b/docs/geode-native-docs/programming-examples/csharp-example.html.md.erb
@@ -19,84 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-This C\# programming code in the next example demonstrates how to use two or more clients
sharing a distributed region in a Geode cache.
-
-``` pre
-using System;
-using GemStone.GemFire.Cache;
- 
-namespace GemStone.GemFire.Cache.QuickStart {
-  // The BasicOperations QuickStart example.
-  class BasicOperations {
-      static void Main(string[] args) {
-      try {
-          // Create a Cache.
-          CacheFactory cacheFactory = CacheFactory.CreateCacheFactory(null);
- 
-          Cache cache = cacheFactory.SetSubscriptionEnabled(true).Create();
- 
-          Console.WriteLine("Created the Cache");
- 
-          RegionFactory regionFactory = 
-              cache.CreateRegionFactory(RegionShortcut.CACHING_PROXY);
- 
-          Region region = regionFactory.Create("exampleRegion");
- 
-          Console.WriteLine("Created the Region Programmatically.");
- 
-          // Put an Entry (Key and Value pair) into the Region using the 
-          // direct/shortcut method.
-          region.Put("Key1", "Value1");
- 
-          Console.WriteLine("Put the first Entry into the Region");
- 
-          // Put an Entry into the Region by manually creating a Key and 
-          // a Value pair.
-          CacheableInt32 key = new CacheableInt32(123);
-          CacheableString value = new CacheableString("123");
-          region.Put(key, value);
- 
-          Console.WriteLine("Put the second Entry into the Region");
- 
-          if (IntPtr.Size == 8) { // Are we a 64 bit process?
-              Char ch = 'A';
-              string text = new string(ch, 1024 * 1024);
-              for (int item = 0; item < (5 * 1024 /* 5 GB */); item++) {
-                  region.LocalPut(item, text);
-              }
-              Console.WriteLine("Put over 4 GB data locally");
-          }
-          // Get Entries back out of the Region.
-          IGFSerializable result1 = region.Get("Key1");
- 
-          Console.WriteLine("Obtained the first Entry from the Region");
- 
-          IGFSerializable result2 = region.Get(key);
- 
-          Console.WriteLine("Obtained the second Entry from the Region");
- 
-          // Invalidate an Entry in the Region.
-          region.Invalidate("Key1");
- 
-          Console.WriteLine("Invalidated the first Entry in the Region");
- 
-          // Destroy an Entry in the Region.
-          region.Destroy(key);
- 
-          Console.WriteLine("Destroyed the second Entry in the Region");
- 
-          // Close the GemFire Cache.
-          cache.Close();
- 
-          Console.WriteLine("Closed the Cache");
-      }
-      // An exception should not occur
-      catch (GemFireException gfex) {
-          Console.WriteLine("BasicOperations Exception: {0}", 
-              gfex.Message);
-      }
-  }
-}
-```
 
+See [QuickStart Examples](../introduction/quickstart.html)
+for C\# programming examples.
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-docs/programming-examples/native-client-region.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/programming-examples/native-client-region.html.md.erb
b/docs/geode-native-docs/programming-examples/native-client-region.html.md.erb
index e2aa9ab..6aaf4bc 100644
--- a/docs/geode-native-docs/programming-examples/native-client-region.html.md.erb
+++ b/docs/geode-native-docs/programming-examples/native-client-region.html.md.erb
@@ -1,5 +1,5 @@
 ---
-title:  Declaring a Native Client Region
+title:  Declaring a Client Region
 ---
 
 <!--
@@ -19,7 +19,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-The following example shows how to declare a native client region in a `cache.xml` file.
+This example shows how to declare a client region in a `cache.xml` file.
 
 ``` pre
 <cache>
@@ -38,9 +38,9 @@ The following example shows how to declare a native client region in a `cache.xm
 </cache>
 ```
 
--   The pool defines a list of cache servers that the native client region can communicate
with.
+-   The pool defines a list of cache servers that the client region can communicate with.
 -   The *CACHING\_PROXY* setting causes the client region to cache data and to communicate
with the servers. The *PROXY* setting causes the client region to communicate with the servers,
but cache no data.
 -   The region *subscription-enabled* property, if `true` , indicates that the client should
receive data updates when server data changes.
--   Native clients do not specify cache loaders or writers, which are provided by the server.
+-   Clients do not specify cache loaders or writers, which are provided by the server.
 
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-docs/programming-examples/programming-examples.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/programming-examples/programming-examples.html.md.erb
b/docs/geode-native-docs/programming-examples/programming-examples.html.md.erb
index 7014d9e..748d9d4 100644
--- a/docs/geode-native-docs/programming-examples/programming-examples.html.md.erb
+++ b/docs/geode-native-docs/programming-examples/programming-examples.html.md.erb
@@ -19,16 +19,14 @@ See the License for the specific language governing permissions and
 limitations under the License.
 -->
 
-This chapter provides a set of programming examples to help you understand the Geode native
client API.
+This section provides a set of programming examples to further understanding of the client
API.
 
--   **[Declaring a Native Client Region](native-client-region.html)**
+-   **[Declaring a Client Region](native-client-region.html)**
 
-    The following example shows how to declare a native client region in a `cache.xml` file.
+    The following example shows how to declare a client region in a `cache.xml` file.
 
 -   **[API Programming Example – C\#](csharp-example.html)**
 
-    This C\# programming code in the next example demonstrates how to use two or more clients
sharing a distributed region in a Geode cache.
-
 -   **[API Programming Example – C++](cpp-example.html)**
 
 -   **[Data Serialization Examples](serialization-overview.html)**

http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-docs/programming-examples/serialization-java.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/programming-examples/serialization-java.html.md.erb b/docs/geode-native-docs/programming-examples/serialization-java.html.md.erb
index 9f02566..91a1922 100644
--- a/docs/geode-native-docs/programming-examples/serialization-java.html.md.erb
+++ b/docs/geode-native-docs/programming-examples/serialization-java.html.md.erb
@@ -29,12 +29,12 @@ public class User implements DataSerializable
     private ExampleObject eo;
     static {
         Instantiator.register(
-                       new Instantiator(User.class, (byte)45)
-                       {
-                            public DataSerializable newInstance() {
-                                return new User();
-                            }
-                        } );
+            new Instantiator(User.class, (byte)45)
+                {
+                    public DataSerializable newInstance() {
+                        return new User();
+                    }
+                } );
     }
     /**
      * Creates an "empty" User whose contents are filled in by

http://git-wip-us.apache.org/repos/asf/geode-native/blob/0138dbd5/docs/geode-native-docs/programming-examples/serialization-overview.html.md.erb
----------------------------------------------------------------------
diff --git a/docs/geode-native-docs/programming-examples/serialization-overview.html.md.erb
b/docs/geode-native-docs/programming-examples/serialization-overview.html.md.erb
index edbcbf6..dc311fe 100644
--- a/docs/geode-native-docs/programming-examples/serialization-overview.html.md.erb
+++ b/docs/geode-native-docs/programming-examples/serialization-overview.html.md.erb
@@ -25,8 +25,6 @@ This section contains data serialization examples for C++, C\#, and Java.
 
 -   **[C\# Serialization Example](serialization-csharp.html)**
 
-    This example shows how to implement a user-defined Serializable object.
-
 -   **[Java Serialization Example](serialization-java.html)**
 
 


Mime
View raw message