[
https://issues.apache.org/jira/browse/GEODE-8593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17234141#comment-17234141
]
ASF subversion and git services commented on GEODE-8593:
--------------------------------------------------------
Commit 6b92114bf1d43d69ff525857f31c29d8b6ae3032 in geode-native's branch
refs/heads/master from Dave Barnes
[ https://gitbox.apache.org/repos/asf?p=geode-native.git;h=6b92114 ]
GEODE-8593: Update geode-native examples to use builder pattern: C++ (revisions)
> 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
> Fix For: 1.14.0
>
>
> 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)