You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/10 22:34:00 UTC

[jira] [Commented] (GEODE-8593) Update native client examples to use Builder pattern

    [ https://issues.apache.org/jira/browse/GEODE-8593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17229551#comment-17229551 ] 

ASF GitHub Bot commented on GEODE-8593:
---------------------------------------

davebarnes97 opened a new pull request #689:
URL: https://github.com/apache/geode-native/pull/689


   Analog of an update performed previously on the geode-native C++ examples and user guide:
   
   - Updated examples to use builder pattern for cache and pool creation
   - Updated accompanying text in user guide to match examples
   - Pruned Connection Pool doc to focus on pools, not locators and load-balancing


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Update native client examples to use Builder pattern
> ----------------------------------------------------
>
>                 Key: GEODE-8593
>                 URL: https://issues.apache.org/jira/browse/GEODE-8593
>             Project: Geode
>          Issue Type: Improvement
>          Components: docs, native client
>    Affects Versions: 1.13.0
>            Reporter: Dave Barnes
>            Assignee: Dave Barnes
>            Priority: Major
>              Labels: pull-request-available
>
> For both C++ and .NET examples, the section of code that creates the connection pool should be improved to better illustrate the Builder pattern. For example, in the C++ examples, current code is:
> ```
>   auto cacheFactory = CacheFactory();
>   cacheFactory.set("log-level", "none");
>   auto cache = cacheFactory.create();
>   auto poolFactory = cache.getPoolManager().createFactory();
>  
>   poolFactory.addLocator("localhost", 10334);
>   auto pool = poolFactory.create("pool");
> ```
> The improved version would be:
> ```
> auto cache = CacheFactory()
>                    .set("log-level", "debug")
>                    .set("ssl-enabled", "true")
>                    .set("ssl-truststore", clientTruststore.string())
>                    .create();
>   cache.getPoolManager()
>       .createFactory()
>       .addLocator("localhost", 10334)
>       .create("pool");
> ```
> Similarly for .NET examples.
> These doc snippets also appear in the user guides, so they'll need updating in the docs, as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)