| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_272) on Thu Nov 12 16:27:24 PST 2020 --> |
| <title>ClientCacheFactory (Apache Geode 1.13.1)</title> |
| <meta name="date" content="2020-11-12"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ClientCacheFactory (Apache Geode 1.13.1)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9,"i5":10,"i6":42,"i7":10,"i8":42,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":42}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/geode/cache/client/ClientNotReadyException.html" title="class in org.apache.geode.cache.client"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/geode/cache/client/ClientCacheFactory.html" target="_top">Frames</a></li> |
| <li><a href="ClientCacheFactory.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.geode.cache.client</div> |
| <h2 title="Class ClientCacheFactory" class="title">Class ClientCacheFactory</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.geode.cache.client.ClientCacheFactory</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">ClientCacheFactory</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Factory class used to create the singleton <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><code>client cache</code></a> and connect to one or |
| more GemFire Cache Servers. If the application wants to connect to GemFire as a peer it should |
| use <a href="../../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache"><code>CacheFactory</code></a> instead. |
| <p> |
| Once the factory has been configured using its set* methods you produce a <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><code>ClientCache</code></a> by |
| calling the <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#create--"><code>create()</code></a> method. The |
| <a href="../../../../../org/apache/geode/distributed/ConfigurationProperties.html#CACHE_XML_FILE"><code>ConfigurationProperties.CACHE_XML_FILE</code></a> property can be used |
| to specify a cache.xml file to initialize the cache with. The contents of this file must comply |
| with the <code>"doc-files/cache8_0.dtd"</code> file and the top level element must be a |
| <code>client-cache</code> element. |
| <p> |
| Client connections are managed through connection <a href="../../../../../org/apache/geode/cache/client/Pool.html" title="interface in org.apache.geode.cache.client"><code>pools</code></a>. ClientCacheFactory creates |
| a single pool to use by default on the cache it creates. ClientCacheFactory can also be used to |
| configure the default connection pool using its <code>setPool*</code> and <code>addPool*</code> |
| methods. In most cases, the defaults used by this implementation will suffice. For the default |
| pool attributes see <a href="../../../../../org/apache/geode/cache/client/PoolFactory.html" title="interface in org.apache.geode.cache.client"><code>PoolFactory</code></a>. If no pool is configured and a pool was not declared in |
| cache.xml or created using <a href="../../../../../org/apache/geode/cache/client/PoolManager.html" title="class in org.apache.geode.cache.client"><code>PoolManager</code></a> then a default one will be created that connects |
| to a server on the default cache server port and local host. If multiple pools are declared in |
| cache.xml or created by the PoolFactory then no default pool will exist and |
| <code>ClientRegionFactory.setPoolName</code> will need to be called on each region created. |
| <p> |
| To get the existing unclosed singleton client cache instance call <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#getAnyInstance--"><code>getAnyInstance()</code></a>. |
| <p> |
| The following examples illustrate bootstrapping the client cache using region shortcuts: |
| <p> |
| Example 1: Connect to a CacheServer on the default host and port and access a region "customers" |
| |
| <PRE> |
| ClientCache c = new ClientCacheFactory().create(); |
| Region r = c.createClientRegionFactory(PROXY).create("customers"); |
| // The PROXY shortcut tells GemFire to route all requests to the servers |
| // . i.e. there is no local caching |
| </PRE> |
| |
| Example 2: Connect using the GemFire locator and create a local LRU cache |
| |
| <PRE> |
| ClientCache c = new ClientCacheFactory().addPoolLocator(host, port).create(); |
| Region r = c.createClientRegionFactory(CACHING_PROXY_HEAP_LRU).create("customers"); |
| // The local LRU "customers" data region will automatically start evicting, by default, at 80% |
| // heap utilization threshold |
| </PRE> |
| |
| Example 3: Access the query service |
| |
| <PRE> |
| QueryService qs = new ClientCacheFactory().create().getQueryService(); |
| </PRE> |
| |
| Example 4: Construct the client cache region declaratively in cache.xml |
| |
| <PRE> |
| <!DOCTYPE client-cache PUBLIC |
| "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN" |
| "http://www.gemstone.com/dtd/cache8_0.dtd"> |
| <client-cache> |
| <pool name="myPool"> |
| <locator host="hostName" port="10334"/> |
| </pool> |
| <region name="myRegion" refid="PROXY"/> |
| <!-- you can override or add to the PROXY attributes by adding |
| a region-attributes sub element here --> |
| </client-cache> |
| </PRE> |
| |
| Now, create the cache telling it to read your cache.xml file: |
| |
| <PRE> |
| ClientCache c = new ClientCacheFactory().set("cache-xml-file", "myCache.xml").create(); |
| Region r = c.getRegion("myRegion"); |
| </PRE> |
| <p> |
| <p> |
| For a complete list of all client region shortcuts see <a href="../../../../../org/apache/geode/cache/client/ClientRegionShortcut.html" title="enum in org.apache.geode.cache.client"><code>ClientRegionShortcut</code></a>. Applications |
| that need to explicitly control the individual region attributes can do this declaratively in XML |
| or using API. |
| <p> |
| Example 5: Define custom region attributes for persistence in XML and create region using API. |
| Define new region attributes with ID "MYAPP_CACHING_PROXY_MEM_LRU" that overrides the |
| "CACHING_PROXY" shortcut |
| |
| <PRE> |
| <!DOCTYPE client-cache PUBLIC |
| "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN" |
| "http://www.gemstone.com/dtd/cache8_0.dtd"> |
| <client-cache> |
| <!-- now create a named region attributes that uses the CACHING_PROXY shortcut |
| and adds a memory LRU limited to 900 megabytes --> |
| <region-attributes id="MYAPP_CACHING_PROXY_MEM_LRU" refid="CACHING_PROXY" > |
| <lru-memory-size maximum="900"/> |
| </region-attributes> |
| </client-cache> |
| </PRE> |
| |
| Now, create the data region in the client cache using this new attributes ID. |
| |
| <PRE> |
| ClientCache c = new ClientCacheFactory().set("cache-xml-file", "myCache.xml") |
| .addPoolLocator(host, port).create(); |
| Region r = c.createClientRegionFactory("MYAPP_CACHING_PROXY_MEM_LRU").create("customers"); |
| </PRE></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>6.5</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#ClientCacheFactory--">ClientCacheFactory</a></span>()</code> |
| <div class="block">Creates a new client cache factory.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#ClientCacheFactory-java.util.Properties-">ClientCacheFactory</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> props)</code> |
| <div class="block">Create a new client cache factory given the initial gemfire properties.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#addPoolLocator-java.lang.String-int-">addPoolLocator</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> host, |
| int port)</code> |
| <div class="block">Add a locator, given its host and port, to this factory.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#addPoolServer-java.lang.String-int-">addPoolServer</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> host, |
| int port)</code> |
| <div class="block">Add a server, given its host and port, to this factory.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client">ClientCache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#create--">create</a></span>()</code> |
| <div class="block">Create a singleton client cache.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client">ClientCache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#getAnyInstance--">getAnyInstance</a></span>()</code> |
| <div class="block">Gets an arbitrary open instance of <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><code>ClientCache</code></a> produced by an earlier call to |
| <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#create--"><code>create()</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#getVersion--">getVersion</a></span>()</code> |
| <div class="block">Returns the version of the cache implementation.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#set-java.lang.String-java.lang.String-">set</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</code> |
| <div class="block">Sets a gemfire property that will be used when creating the ClientCache.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPdxDiskStore-java.lang.String-">setPdxDiskStore</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> diskStoreName)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">Pdx Persistence is not supported on client side. Even when set, it's internally |
| ignored.</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPdxIgnoreUnreadFields-boolean-">setPdxIgnoreUnreadFields</a></span>(boolean ignore)</code> |
| <div class="block">Control whether pdx ignores fields that were unread during deserialization.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPdxPersistent-boolean-">setPdxPersistent</a></span>(boolean isPersistent)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">Pdx Persistence is not supported on client side. Even when set, it's internally |
| ignored.</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPdxReadSerialized-boolean-">setPdxReadSerialized</a></span>(boolean pdxReadSerialized)</code> |
| <div class="block">Sets the object preference to PdxInstance type.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPdxSerializer-org.apache.geode.pdx.PdxSerializer-">setPdxSerializer</a></span>(<a href="../../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx">PdxSerializer</a> serializer)</code> |
| <div class="block">Set the PDX serializer for the cache.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolFreeConnectionTimeout-int-">setPoolFreeConnectionTimeout</a></span>(int connectionTimeout)</code> |
| <div class="block">Sets the free connection timeout for this pool.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolIdleTimeout-long-">setPoolIdleTimeout</a></span>(long idleTimeout)</code> |
| <div class="block">Set the amount of time a connection can be idle before expiring the connection.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolLoadConditioningInterval-int-">setPoolLoadConditioningInterval</a></span>(int loadConditioningInterval)</code> |
| <div class="block">Sets the load conditioning interval for this pool.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMaxConnections-int-">setPoolMaxConnections</a></span>(int maxConnections)</code> |
| <div class="block">Set the max number of client to server connections that the pool will create.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMinConnections-int-">setPoolMinConnections</a></span>(int minConnections)</code> |
| <div class="block">Set the minimum number of connections to keep available at all times.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMultiuserAuthentication-boolean-">setPoolMultiuserAuthentication</a></span>(boolean enabled)</code> |
| <div class="block">If set to <code>true</code> then the created pool can be used by multiple users.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolPingInterval-long-">setPoolPingInterval</a></span>(long pingInterval)</code> |
| <div class="block">How often to ping servers to verify that they are still alive.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolPRSingleHopEnabled-boolean-">setPoolPRSingleHopEnabled</a></span>(boolean enabled)</code> |
| <div class="block">By default setPRSingleHopEnabled is <code>true</code> in which case the client is aware of the |
| location of partitions on servers hosting <a href="../../../../../org/apache/geode/cache/Region.html" title="interface in org.apache.geode.cache"><code>regions</code></a> with |
| <a href="../../../../../org/apache/geode/cache/DataPolicy.html#PARTITION"><code>DataPolicy.PARTITION</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolReadTimeout-int-">setPoolReadTimeout</a></span>(int timeout)</code> |
| <div class="block">Sets the number of milliseconds to wait for a response from a server before timing out the |
| operation and trying another server (if any are available).</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolRetryAttempts-int-">setPoolRetryAttempts</a></span>(int retryAttempts)</code> |
| <div class="block">Set the number of times to retry a request after timeout/exception.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolServerConnectionTimeout-int-">setPoolServerConnectionTimeout</a></span>(int connectionTimeout)</code> |
| <div class="block">Sets the server connection timeout for this pool.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolServerGroup-java.lang.String-">setPoolServerGroup</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> group)</code> |
| <div class="block">Configures the group that all servers this pool connects to must belong to.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSocketBufferSize-int-">setPoolSocketBufferSize</a></span>(int bufferSize)</code> |
| <div class="block">Sets the socket buffer size for each connection made in this pool.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSocketConnectTimeout-int-">setPoolSocketConnectTimeout</a></span>(int socketConnectTimeout)</code> |
| <div class="block">Sets the socket connect timeout for this pool.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSocketFactory-org.apache.geode.cache.client.SocketFactory-">setPoolSocketFactory</a></span>(<a href="../../../../../org/apache/geode/cache/client/SocketFactory.html" title="interface in org.apache.geode.cache.client">SocketFactory</a> socketFactory)</code> |
| <div class="block">Set the socket factory used by this pool to create connections to both locators (if |
| configured using <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#addPoolLocator-java.lang.String-int-"><code>addPoolLocator(String, int)</code></a> (String, int)}) and servers.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolStatisticInterval-int-">setPoolStatisticInterval</a></span>(int statisticInterval)</code> |
| <div class="block">How often to send client statistics to the server.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSubscriptionAckInterval-int-">setPoolSubscriptionAckInterval</a></span>(int ackInterval)</code> |
| <div class="block">Sets the interval in milliseconds to wait before sending acknowledgements to the cache server |
| for events received from the server subscriptions.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSubscriptionEnabled-boolean-">setPoolSubscriptionEnabled</a></span>(boolean enabled)</code> |
| <div class="block">If set to <code>true</code> then the created pool will have server-to-client subscriptions |
| enabled.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSubscriptionMessageTrackingTimeout-int-">setPoolSubscriptionMessageTrackingTimeout</a></span>(int messageTrackingTimeout)</code> |
| <div class="block">Sets the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, |
| for subscription events the client has received from the server.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSubscriptionRedundancy-int-">setPoolSubscriptionRedundancy</a></span>(int redundancy)</code> |
| <div class="block">Sets the redundancy level for this pools server-to-client subscriptions.</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolSubscriptionTimeoutMultiplier-int-">setPoolSubscriptionTimeoutMultiplier</a></span>(int multiplier)</code> |
| <div class="block">A server has an inactivity monitor that ensures a message is sent to a client at least once a |
| minute (60,000 milliseconds).</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolThreadLocalConnections-boolean-">setPoolThreadLocalConnections</a></span>(boolean threadLocalConnections)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">Since Geode 1.10.0. Thread local connections are ignored. Will be removed in future |
| major release.</span></div> |
| </div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="ClientCacheFactory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>ClientCacheFactory</h4> |
| <pre>public ClientCacheFactory()</pre> |
| <div class="block">Creates a new client cache factory.</div> |
| </li> |
| </ul> |
| <a name="ClientCacheFactory-java.util.Properties-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ClientCacheFactory</h4> |
| <pre>public ClientCacheFactory(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> props)</pre> |
| <div class="block">Create a new client cache factory given the initial gemfire properties.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>props</code> - The initial gemfire properties to be used. These properties can be overridden |
| using the <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#set-java.lang.String-java.lang.String-"><code>set(java.lang.String, java.lang.String)</code></a> method For a full list of valid gemfire properties see |
| <a href="../../../../../org/apache/geode/distributed/ConfigurationProperties.html" title="interface in org.apache.geode.distributed"><code>ConfigurationProperties</code></a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="set-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>set</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> set(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> value)</pre> |
| <div class="block">Sets a gemfire property that will be used when creating the ClientCache. For a full list of |
| valid gemfire properties see <a href="../../../../../org/apache/geode/distributed/ConfigurationProperties.html" title="interface in org.apache.geode.distributed"><code>ConfigurationProperties</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the gemfire property</dd> |
| <dd><code>value</code> - the value of the gemfire property</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to this ClientCacheFactory object</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="create--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client">ClientCache</a> create()</pre> |
| <div class="block">Create a singleton client cache. If a client cache already exists in this vm that is not |
| compatible with this factory's configuration then create will fail. |
| <p> |
| While creating the cache instance any declarative cache configuration (cache.xml) is processed |
| and used to initialize the created cache. |
| <P> |
| Note that the cache that is produced is a singleton. Before a different instance can be |
| produced the old one must be <a href="../../../../../org/apache/geode/cache/client/ClientCache.html#close-boolean-"><code>closed</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the singleton client cache</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/geode/cache/CacheXmlException.html" title="class in org.apache.geode.cache">CacheXmlException</a></code> - If a problem occurs while parsing the declarative caching XML file.</dd> |
| <dd><code><a href="../../../../../org/apache/geode/cache/TimeoutException.html" title="class in org.apache.geode.cache">TimeoutException</a></code> - If a <a href="../../../../../org/apache/geode/cache/Region.html#put-K-V-"><code>Region.put(Object, Object)</code></a> times out while initializing |
| the cache.</dd> |
| <dd><code><a href="../../../../../org/apache/geode/cache/CacheWriterException.html" title="class in org.apache.geode.cache">CacheWriterException</a></code> - If a <code>CacheWriterException</code> is thrown while |
| initializing the cache.</dd> |
| <dd><code><a href="../../../../../org/apache/geode/cache/RegionExistsException.html" title="class in org.apache.geode.cache">RegionExistsException</a></code> - If the declarative caching XML file describes a region that |
| already exists (including the root region).</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if a client cache already exists and it is not compatible with |
| this factory's configuration.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if mcast-port or locator is set on client cache.</dd> |
| <dd><code><a href="../../../../../org/apache/geode/security/AuthenticationFailedException.html" title="class in org.apache.geode.security">AuthenticationFailedException</a></code> - if authentication fails.</dd> |
| <dd><code><a href="../../../../../org/apache/geode/security/AuthenticationRequiredException.html" title="class in org.apache.geode.security">AuthenticationRequiredException</a></code> - if server is in secure mode and client cache is not |
| configured with security credentials.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSocketConnectTimeout-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSocketConnectTimeout</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSocketConnectTimeout(int socketConnectTimeout)</pre> |
| <div class="block">Sets the socket connect timeout for this pool. The number of milli seconds specified as socket |
| timeout when the client connects to the servers/locators. A timeout of zero is interpreted as |
| an infinite timeout. The connection will then block until established or an error occurs.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>socketConnectTimeout</code> - timeout in milliseconds when the client connects to the servers</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>socketConnectTimeout</code> is less than or equal to |
| <code>-1</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolFreeConnectionTimeout-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolFreeConnectionTimeout</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolFreeConnectionTimeout(int connectionTimeout)</pre> |
| <div class="block">Sets the free connection timeout for this pool. If the pool has a max connections setting, |
| operations will block if all of the connections are in use. The free connection timeout |
| specifies how long those operations will block waiting for a free connection before receiving |
| an <a href="../../../../../org/apache/geode/cache/client/AllConnectionsInUseException.html" title="class in org.apache.geode.cache.client"><code>AllConnectionsInUseException</code></a>. If max connections is not set this setting has no |
| effect.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connectionTimeout</code> - the connection timeout in milliseconds</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>connectionTimeout</code> is less than or equal to |
| <code>0</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMaxConnections-int-"><code>setPoolMaxConnections(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolServerConnectionTimeout-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolServerConnectionTimeout</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolServerConnectionTimeout(int connectionTimeout)</pre> |
| <div class="block">Sets the server connection timeout for this pool. If the pool has a max connections setting, |
| operations will block if there is no free connections toward designated server. The server |
| connection timeout |
| specifies how long those operations will block waiting for a connection toward server before |
| receiving an <a href="../../../../../org/apache/geode/cache/client/AllConnectionsInUseException.html" title="class in org.apache.geode.cache.client"><code>AllConnectionsInUseException</code></a>. If max connections is not set this setting |
| has no effect.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>connectionTimeout</code> - the connection timeout in milliseconds</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>connectionTimeout</code> is less than |
| <code>0</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMaxConnections-int-"><code>setPoolMaxConnections(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolLoadConditioningInterval-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolLoadConditioningInterval</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolLoadConditioningInterval(int loadConditioningInterval)</pre> |
| <div class="block">Sets the load conditioning interval for this pool. This interval controls how frequently the |
| pool will check to see if a connection to a given server should be moved to a different server |
| to improve the load balance. |
| <p> |
| A value of <code>-1</code> disables load conditioning</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>loadConditioningInterval</code> - the connection lifetime in milliseconds</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>connectionLifetime</code> is less than |
| <code>-1</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSocketBufferSize-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSocketBufferSize</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSocketBufferSize(int bufferSize)</pre> |
| <div class="block">Sets the socket buffer size for each connection made in this pool. Large messages can be |
| received and sent faster when this buffer is larger. Larger buffers also optimize the rate at |
| which servers can send events for client subscriptions.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>bufferSize</code> - the size of the socket buffers used for reading and writing on each |
| connection in this pool.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>bufferSize</code> is less than or equal to |
| <code>0</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolThreadLocalConnections-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolThreadLocalConnections</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolThreadLocalConnections(boolean threadLocalConnections)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Since Geode 1.10.0. Thread local connections are ignored. Will be removed in future |
| major release.</span></div> |
| <div class="block">Sets the thread local connections policy for this pool. If <code>true</code> then any time a |
| thread goes to use a connection from this pool it will check a thread local cache and see if it |
| already has a connection in it. If so it will use it. If not it will get one from this pool and |
| cache it in the thread local. This gets rid of thread contention for the connections but |
| increases the number of connections the servers see. |
| <p> |
| If <code>false</code> then connections are returned to the pool as soon as the operation being |
| done with the connection completes. This allows connections to be shared amonst multiple |
| threads keeping the number of connections down.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadLocalConnections</code> - if <code>true</code> then enable thread local connections.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolReadTimeout-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolReadTimeout</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolReadTimeout(int timeout)</pre> |
| <div class="block">Sets the number of milliseconds to wait for a response from a server before timing out the |
| operation and trying another server (if any are available).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>timeout</code> - number of milliseconds to wait for a response from a server</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>timeout</code> is less than <code>0</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolMinConnections-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolMinConnections</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolMinConnections(int minConnections)</pre> |
| <div class="block">Set the minimum number of connections to keep available at all times. When the pool is created, |
| it will create this many connections. If <code>0</code> then connections will not be made until |
| an actual operation is done that requires client-to-server communication.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minConnections</code> - the initial number of connections this pool will create.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>minConnections</code> is less than <code>0</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolMaxConnections-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolMaxConnections</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolMaxConnections(int maxConnections)</pre> |
| <div class="block">Set the max number of client to server connections that the pool will create. If all of the |
| connections are in use, an operation requiring a client to server connection will block until a |
| connection is available.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxConnections</code> - the maximum number of connections in the pool. this pool will create. -1 |
| indicates that there is no maximum number of connections</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>maxConnections</code> is less than |
| <code>minConnections</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolFreeConnectionTimeout-int-"><code>setPoolFreeConnectionTimeout(int)</code></a>, |
| <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolServerConnectionTimeout-int-"><code>setPoolServerConnectionTimeout(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolIdleTimeout-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolIdleTimeout</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolIdleTimeout(long idleTimeout)</pre> |
| <div class="block">Set the amount of time a connection can be idle before expiring the connection. If the pool |
| size is greater than the minimum specified by <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMinConnections-int-"><code>setPoolMinConnections(int)</code></a>, connections |
| which have been idle for longer than the idleTimeout will be closed.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>idleTimeout</code> - The amount of time in milliseconds that an idle connection should live |
| before expiring. -1 indicates that connections should never expire.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>idleTimout</code> is less than <code>-1</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolRetryAttempts-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolRetryAttempts</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolRetryAttempts(int retryAttempts)</pre> |
| <div class="block">Set the number of times to retry a request after timeout/exception.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>retryAttempts</code> - The number of times to retry a request after timeout/exception. -1 |
| indicates that a request should be tried against every available server before failing</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>idleTimout</code> is less than <code>-1</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolPingInterval-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolPingInterval</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolPingInterval(long pingInterval)</pre> |
| <div class="block">How often to ping servers to verify that they are still alive. Each server will be sent a ping |
| every pingInterval if there has not been any other communication with the server. |
| <p> |
| These pings are used by the server to monitor the health of the client. Make sure that the |
| pingInterval is less than the maximum time between pings allowed by the cache server.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pingInterval</code> - The amount of time in milliseconds between pings.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>pingInterval</code> is less than or equal to |
| <code>0</code>.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/cache/server/CacheServer.html#setMaximumTimeBetweenPings-int-"><code>CacheServer.setMaximumTimeBetweenPings(int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolStatisticInterval-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolStatisticInterval</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolStatisticInterval(int statisticInterval)</pre> |
| <div class="block">How often to send client statistics to the server. Doing this allows <code>gfmon</code> to |
| monitor clients. |
| <p> |
| A value of <code>-1</code> disables the sending of client statistics to the server.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>statisticInterval</code> - The amount of time in milliseconds between sends of client statistics |
| to the server.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>statisticInterval</code> is less than |
| <code>-1</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolServerGroup-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolServerGroup</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolServerGroup(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> group)</pre> |
| <div class="block">Configures the group that all servers this pool connects to must belong to.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>group</code> - the server group that this pool will connect to. If <code>null</code> or |
| <code>""</code> then all servers will be connected to.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addPoolLocator-java.lang.String-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addPoolLocator</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> addPoolLocator(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> host, |
| int port)</pre> |
| <div class="block">Add a locator, given its host and port, to this factory. The locator must be a server locator |
| and will be used to discover other running cache servers and locators. Note that if the host is |
| unknown at the time of this call the locator will still be added. When the pool is used for an |
| operation if the host is still unknown an exception will be thrown.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>host</code> - the host name or ip address that the locator is listening on.</dd> |
| <dd><code>port</code> - the port that the locator is listening on</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if port is outside the valid range of [0..65535] inclusive.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if a server has already been <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#addPoolServer-java.lang.String-int-"><code>added</code></a> to this |
| factory.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addPoolServer-java.lang.String-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addPoolServer</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> addPoolServer(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> host, |
| int port)</pre> |
| <div class="block">Add a server, given its host and port, to this factory. The server must be a cache server and |
| this client will directly connect to without consulting a server locator. Note that if the host |
| is unknown at the time of this call the server will still be added. When the pool is used for |
| an operation if the host is still unknown an exception will be thrown.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>host</code> - the host name or ip address that the server is listening on.</dd> |
| <dd><code>port</code> - the port that the server is listening on</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if port is outside the valid range of [0..65535] inclusive.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if a locator has already been <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#addPoolLocator-java.lang.String-int-"><code>added</code></a> to |
| this factory.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSubscriptionEnabled-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSubscriptionEnabled</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSubscriptionEnabled(boolean enabled)</pre> |
| <div class="block">If set to <code>true</code> then the created pool will have server-to-client subscriptions |
| enabled. If set to <code>false</code> then all <code>Subscription*</code> attributes are |
| ignored at create time.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSubscriptionRedundancy-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSubscriptionRedundancy</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSubscriptionRedundancy(int redundancy)</pre> |
| <div class="block">Sets the redundancy level for this pools server-to-client subscriptions. If <code>0</code> then |
| no redundant copies will be kept on the servers. Otherwise an effort will be made to maintain |
| the requested number of copies of the server-to-client subscriptions. At most one copy per |
| server will be made up to the requested level.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>redundancy</code> - the number of redundant servers for this client's subscriptions.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>redundancyLevel</code> is less than <code>-1</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSubscriptionTimeoutMultiplier-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSubscriptionTimeoutMultiplier</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSubscriptionTimeoutMultiplier(int multiplier)</pre> |
| <div class="block">A server has an inactivity monitor that ensures a message is sent to a client at least once a |
| minute (60,000 milliseconds). If a subscription timeout multipler is set in the client it |
| enables timing out of the subscription feed with failover to another server. |
| <p> |
| The client will time out it's subscription connection after a number of seconds equal to this |
| multiplier times the server's subscription-timeout. |
| <p> |
| Set this to 2 or more to make sure the client will receive pings from the server before the |
| timeout. |
| <p> |
| A value of zero (the default) disables timeouts |
| <p> |
| The resulting timeout will be multiplied by 1.25 in order to avoid race conditions with the |
| server sending its "ping" message.</div> |
| </li> |
| </ul> |
| <a name="setPoolSubscriptionMessageTrackingTimeout-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSubscriptionMessageTrackingTimeout</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSubscriptionMessageTrackingTimeout(int messageTrackingTimeout)</pre> |
| <div class="block">Sets the messageTrackingTimeout attribute which is the time-to-live period, in milliseconds, |
| for subscription events the client has received from the server. It's used to minimize |
| duplicate events. Entries that have not been modified for this amount of time are expired from |
| the list</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>messageTrackingTimeout</code> - number of milliseconds to set the timeout to.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>messageTrackingTimeout</code> is less than or equal |
| to <code>0</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSocketFactory-org.apache.geode.cache.client.SocketFactory-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSocketFactory</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSocketFactory(<a href="../../../../../org/apache/geode/cache/client/SocketFactory.html" title="interface in org.apache.geode.cache.client">SocketFactory</a> socketFactory)</pre> |
| <div class="block">Set the socket factory used by this pool to create connections to both locators (if |
| configured using <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#addPoolLocator-java.lang.String-int-"><code>addPoolLocator(String, int)</code></a> (String, int)}) and servers. |
| |
| Sockets returned by this factory will have the rest of the configuration options |
| specified on this pool and on the <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><code>ClientCache</code></a> applied to them. In particular, |
| sockets returned by this factory will be wrapped with SSLSockets if ssl is enabled |
| for this client cache. |
| |
| This factory can be used for configuring a proxy, or overriding various socket settings. |
| For modifying SSL settings, see <a href="../../../../../org/apache/geode/net/SSLParameterExtension.html" title="interface in org.apache.geode.net"><code>SSLParameterExtension</code></a> |
| |
| See <a href="../../../../../org/apache/geode/cache/client/proxy/ProxySocketFactories.html" title="class in org.apache.geode.cache.client.proxy"><code>ProxySocketFactories</code></a></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>socketFactory</code> - The <a href="../../../../../org/apache/geode/cache/client/SocketFactory.html" title="interface in org.apache.geode.cache.client"><code>SocketFactory</code></a> to use</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code> this </code></dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>Geode 1.13</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/cache/client/PoolFactory.html#setSocketFactory-org.apache.geode.cache.client.SocketFactory-"><code>PoolFactory.setSocketFactory(SocketFactory)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolSubscriptionAckInterval-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolSubscriptionAckInterval</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolSubscriptionAckInterval(int ackInterval)</pre> |
| <div class="block">Sets the interval in milliseconds to wait before sending acknowledgements to the cache server |
| for events received from the server subscriptions.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ackInterval</code> - number of milliseconds to wait before sending event acknowledgements.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>ackInterval</code> is less than or equal to |
| <code>0</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolPRSingleHopEnabled-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolPRSingleHopEnabled</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolPRSingleHopEnabled(boolean enabled)</pre> |
| <div class="block">By default setPRSingleHopEnabled is <code>true</code> in which case the client is aware of the |
| location of partitions on servers hosting <a href="../../../../../org/apache/geode/cache/Region.html" title="interface in org.apache.geode.cache"><code>regions</code></a> with |
| <a href="../../../../../org/apache/geode/cache/DataPolicy.html#PARTITION"><code>DataPolicy.PARTITION</code></a>. Using this information, the client routes |
| the client cache operations directly to the server which is hosting the required partition for |
| the cache operation using a single network hop. This mode works best when |
| <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPoolMaxConnections-int-"><code>setPoolMaxConnections(int)</code></a> is set to <code>-1</code> which is the default. This mode |
| causes the client to have more connections to the servers. |
| <p> |
| If setPRSingleHopEnabled is <code>false</code> the client may need to do an extra network hop |
| on servers to go to the required partition for that cache operation. The client will use fewer |
| network connections to the servers. |
| <p> |
| Caution: for <a href="../../../../../org/apache/geode/cache/DataPolicy.html#PARTITION"><code>partition</code></a> regions with |
| <a href="../../../../../org/apache/geode/cache/PartitionAttributesFactory.html#setLocalMaxMemory-int-"><code>local-max-memory</code></a> equal to zero, no cache operations mentioned above will be routed to those |
| servers as they do not host any partitions.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created pool.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPoolMultiuserAuthentication-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPoolMultiuserAuthentication</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPoolMultiuserAuthentication(boolean enabled)</pre> |
| <div class="block">If set to <code>true</code> then the created pool can be used by multiple users. <br> |
| <br> |
| Note: If set to true, all the client side regions must be <a href="../../../../../org/apache/geode/cache/client/ClientRegionShortcut.html#PROXY"><code>proxies</code></a>. No client side storage is allowed.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a reference to <code>this</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVersion</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getVersion()</pre> |
| <div class="block">Returns the version of the cache implementation.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the version of the cache implementation as a <code>String</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAnyInstance--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAnyInstance</h4> |
| <pre>public static <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client">ClientCache</a> getAnyInstance()</pre> |
| <div class="block">Gets an arbitrary open instance of <a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><code>ClientCache</code></a> produced by an earlier call to |
| <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html#create--"><code>create()</code></a>.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../org/apache/geode/cache/CacheClosedException.html" title="class in org.apache.geode.cache">CacheClosedException</a></code> - if a cache has not been created or the only created one is |
| <a href="../../../../../org/apache/geode/cache/RegionService.html#isClosed--"><code>closed</code></a></dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the cache was created by CacheFactory instead of |
| ClientCacheFactory</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPdxReadSerialized-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPdxReadSerialized</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPdxReadSerialized(boolean pdxReadSerialized)</pre> |
| <div class="block">Sets the object preference to PdxInstance type. When a cached object that was serialized as a |
| PDX is read from the cache a <a href="../../../../../org/apache/geode/pdx/PdxInstance.html" title="interface in org.apache.geode.pdx"><code>PdxInstance</code></a> will be returned instead of the actual domain |
| class. The PdxInstance is an interface that provides run time access to the fields of a PDX |
| without deserializing the entire PDX. The PdxInstance implementation is a light weight wrapper |
| that simply refers to the raw bytes of the PDX that are kept in the cache. Using this method |
| applications can choose to access PdxInstance instead of Java object. |
| <p> |
| Note that a PdxInstance is only returned if a serialized PDX is found in the cache. If the |
| cache contains a deserialized PDX, then a domain class instance is returned instead of a |
| PdxInstance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pdxReadSerialized</code> - true to prefer PdxInstance</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this ClientCacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/pdx/PdxInstance.html" title="interface in org.apache.geode.pdx"><code>PdxInstance</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPdxSerializer-org.apache.geode.pdx.PdxSerializer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPdxSerializer</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPdxSerializer(<a href="../../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx">PdxSerializer</a> serializer)</pre> |
| <div class="block">Set the PDX serializer for the cache. If this serializer is set, it will be consulted to see if |
| it can serialize any domain classes which are added to the cache in portable data exchange |
| format.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>serializer</code> - the serializer to use</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this ClientCacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../org/apache/geode/pdx/PdxSerializer.html" title="interface in org.apache.geode.pdx"><code>PdxSerializer</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPdxDiskStore-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPdxDiskStore</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPdxDiskStore(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> diskStoreName)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Pdx Persistence is not supported on client side. Even when set, it's internally |
| ignored.</span></div> |
| <div class="block">Set the disk store that is used for PDX meta data. When serializing objects in the PDX format, |
| the type definitions are persisted to disk. This setting controls which disk store is used for |
| that persistence. |
| <p> |
| If not set, the metadata will go in the default disk store.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>diskStoreName</code> - the name of the disk store to use for the PDX metadata.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this ClientCacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPdxPersistent-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPdxPersistent</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> |
| public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPdxPersistent(boolean isPersistent)</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Pdx Persistence is not supported on client side. Even when set, it's internally |
| ignored.</span></div> |
| <div class="block">Control whether the type metadata for PDX objects is persisted to disk. The default for this |
| setting is false. If you are using persistent regions with PDX then you must set this to true. |
| If you are using a WAN gateway with PDX then you should set this to true.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>isPersistent</code> - true if the metadata should be persistent</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this ClientCacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPdxIgnoreUnreadFields-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>setPdxIgnoreUnreadFields</h4> |
| <pre>public <a href="../../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client">ClientCacheFactory</a> setPdxIgnoreUnreadFields(boolean ignore)</pre> |
| <div class="block">Control whether pdx ignores fields that were unread during deserialization. The default is to |
| preserve unread fields be including their data during serialization. But if you configure the |
| cache to ignore unread fields then their data will be lost during serialization. |
| <P> |
| You should only set this attribute to <code>true</code> if you know this member will only be |
| reading cache data. In this use case you do not need to pay the cost of preserving the unread |
| fields since you will never be reserializing pdx data.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ignore</code> - <code>true</code> if fields not read during pdx deserialization should be |
| ignored; <code>false</code>, the default, if they should be preserved.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this ClientCacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/geode/cache/client/ClientCache.html" title="interface in org.apache.geode.cache.client"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/geode/cache/client/ClientNotReadyException.html" title="class in org.apache.geode.cache.client"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/geode/cache/client/ClientCacheFactory.html" target="_top">Frames</a></li> |
| <li><a href="ClientCacheFactory.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |