| <!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 --> |
| <title>CacheFactory (Apache Geode 1.15.1)</title> |
| <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="CacheFactory (Apache Geode 1.15.1)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":41,"i3":9,"i4":9,"i5":9,"i6":9,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10}; |
| 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/CacheExistsException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/geode/cache/CacheListener.html" title="interface in org.apache.geode.cache"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/geode/cache/CacheFactory.html" target="_top">Frames</a></li> |
| <li><a href="CacheFactory.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</div> |
| <h2 title="Class CacheFactory" class="title">Class CacheFactory</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.CacheFactory</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">CacheFactory</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/Cache.html" title="interface in org.apache.geode.cache"><code>cache</code></a> and connect to the GemFire |
| singleton <a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed"><code>distributed system</code></a>. If the application wants to connect to |
| GemFire as a client it should use <a href="../../../../org/apache/geode/cache/client/ClientCacheFactory.html" title="class in org.apache.geode.cache.client"><code>ClientCacheFactory</code></a> instead. |
| <p> |
| Once the factory has been configured using its <a href="../../../../org/apache/geode/cache/CacheFactory.html#set-java.lang.String-java.lang.String-"><code>set(String, String)</code></a> method you produce a |
| <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> by calling the <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a> method. |
| <p> |
| To get the existing unclosed singleton cache instance call <a href="../../../../org/apache/geode/cache/CacheFactory.html#getAnyInstance--"><code>getAnyInstance()</code></a>. |
| <p> |
| If an instance of <a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed"><code>DistributedSystem</code></a> already exists when this factory creates a cache, |
| that instance will be used if it is compatible with this factory. |
| <p> |
| The following examples illustrate bootstrapping the cache using region shortcuts: |
| <p> |
| Example 1: Create a cache and a replicate region named customers. |
| |
| <PRE> |
| Cache c = new CacheFactory().create(); |
| Region r = c.createRegionFactory(REPLICATE).create("customers"); |
| </PRE> |
| |
| Example 2: Create a cache and a partition region with redundancy |
| |
| <PRE> |
| Cache c = new CacheFactory().create(); |
| Region r = c.createRegionFactory(PARTITION_REDUNDANT).create("customers"); |
| </PRE> |
| |
| Example 3: Construct the cache region declaratively in cache.xml |
| |
| <PRE> |
| <!DOCTYPE cache PUBLIC |
| "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN" |
| "http://www.gemstone.com/dtd/cache8_0.dtd"> |
| <cache> |
| <region name="myRegion" refid="REPLICATE"/> |
| <!-- you can override or add to the REPLICATE attributes by adding |
| a region-attributes sub element here --> |
| </cache> |
| </PRE> |
| |
| Now, create the cache telling it to read your cache.xml file: |
| |
| <PRE> |
| Cache c = new CacheFactory().set("cache-xml-file", "myCache.xml").create(); |
| Region r = c.getRegion("myRegion"); |
| </PRE> |
| |
| <p> |
| For a complete list of all region shortcuts see <a href="../../../../org/apache/geode/cache/RegionShortcut.html" title="enum in org.apache.geode.cache"><code>RegionShortcut</code></a>. Applications that need to |
| explicitly control the individual region attributes can do this declaratively in XML or using |
| APIs.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 3.0</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/CacheFactory.html#CacheFactory--">CacheFactory</a></span>()</code> |
| <div class="block">Creates a default cache factory.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#CacheFactory-java.util.Properties-">CacheFactory</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 CacheFactory initialized with the given 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/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#addMeterSubregistry-io.micrometer.core.instrument.MeterRegistry-">addMeterSubregistry</a></span>(io.micrometer.core.instrument.MeterRegistry subregistry)</code> |
| <div class="block">Adds the given meter registry to the cache's composite registry for publishing cache metrics |
| to external monitoring systems.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#create--">create</a></span>()</code> |
| <div class="block">Creates a new cache that uses the configured distributed system.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#create-org.apache.geode.distributed.DistributedSystem-">create</a></span>(<a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed">DistributedSystem</a> system)</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">as of 6.5 use <a href="../../../../org/apache/geode/cache/CacheFactory.html#CacheFactory-java.util.Properties-"><code>CacheFactory(Properties)</code></a> instead.</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#getAnyInstance--">getAnyInstance</a></span>()</code> |
| <div class="block">Gets an arbitrary open instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to |
| <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#getInstance-org.apache.geode.distributed.DistributedSystem-">getInstance</a></span>(<a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed">DistributedSystem</a> system)</code> |
| <div class="block">Gets the instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#getInstanceCloseOk-org.apache.geode.distributed.DistributedSystem-">getInstanceCloseOk</a></span>(<a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed">DistributedSystem</a> system)</code> |
| <div class="block">Gets the instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a> even if it |
| has been closed.</div> |
| </td> |
| </tr> |
| <tr id="i6" 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/CacheFactory.html#getVersion--">getVersion</a></span>()</code> |
| <div class="block">Returns the version of the cache implementation.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.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 Cache.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.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">Set the disk store that is used for PDX meta data.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.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="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#setPdxPersistent-boolean-">setPdxPersistent</a></span>(boolean isPersistent)</code> |
| <div class="block">Control whether the type metadata for PDX objects is persisted to disk.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#setPdxReadSerialized-boolean-">setPdxReadSerialized</a></span>(boolean readSerialized)</code> |
| <div class="block">Sets the object preference to PdxInstance type.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.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="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#setPostProcessor-org.apache.geode.security.PostProcessor-">setPostProcessor</a></span>(<a href="../../../../org/apache/geode/security/PostProcessor.html" title="interface in org.apache.geode.security">PostProcessor</a> postProcessor)</code> |
| <div class="block">Sets the postProcessor for the cache.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/CacheFactory.html#setSecurityManager-org.apache.geode.security.SecurityManager-">setSecurityManager</a></span>(<a href="../../../../org/apache/geode/security/SecurityManager.html" title="interface in org.apache.geode.security">SecurityManager</a> securityManager)</code> |
| <div class="block">Sets the securityManager for the cache.</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="CacheFactory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CacheFactory</h4> |
| <pre>public CacheFactory()</pre> |
| <div class="block">Creates a default cache factory.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.5</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="CacheFactory-java.util.Properties-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>CacheFactory</h4> |
| <pre>public CacheFactory(<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 CacheFactory initialized with the given gemfire properties. For a list of valid |
| GemFire properties and their meanings see <a href="../../../../org/apache/geode/distributed/ConfigurationProperties.html" title="interface in org.apache.geode.distributed">ConfigurationProperties</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>props</code> - the gemfire properties to initialize the factory with.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.5</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="create--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre>public <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a> create() |
| throws <a href="../../../../org/apache/geode/cache/TimeoutException.html" title="class in org.apache.geode.cache">TimeoutException</a>, |
| <a href="../../../../org/apache/geode/cache/CacheWriterException.html" title="class in org.apache.geode.cache">CacheWriterException</a>, |
| <a href="../../../../org/apache/geode/cache/GatewayException.html" title="class in org.apache.geode.cache">GatewayException</a>, |
| <a href="../../../../org/apache/geode/cache/RegionExistsException.html" title="class in org.apache.geode.cache">RegionExistsException</a></pre> |
| <div class="block">Creates a new cache that uses the configured distributed system. If a connected distributed |
| system already exists it will be used if it is compatible with the properties on this factory. |
| Otherwise a a distributed system will be created with the configured properties. If a cache |
| already exists it will be returned. |
| <p> |
| If the cache does need to be created it will also be initialized from cache.xml if it exists.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the created or already existing singleton 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/GatewayException.html" title="class in org.apache.geode.cache">GatewayException</a></code> - If a <code>GatewayException</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 cache already exists and is not compatible with the new |
| configuration.</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 the distributed system is in secure mode and this |
| new member is not configured with security credentials.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.5</dd> |
| </dl> |
| </li> |
| </ul> |
| <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/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</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 Cache. For a list of valid GemFire |
| properties and their meanings 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 CacheFactory object</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.5</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/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a> setPdxReadSerialized(boolean readSerialized)</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>readSerialized</code> - true to prefer PdxInstance</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this CacheFactory</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="setSecurityManager-org.apache.geode.security.SecurityManager-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSecurityManager</h4> |
| <pre>public <a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a> setSecurityManager(<a href="../../../../org/apache/geode/security/SecurityManager.html" title="interface in org.apache.geode.security">SecurityManager</a> securityManager)</pre> |
| <div class="block">Sets the securityManager for the cache. If this securityManager is set, it will override the |
| security-manager property you set in your gemfire system properties. |
| |
| This is provided mostly for container to inject an already initialized securityManager. An |
| object provided this way is expected to be initialized already. We are not calling the init |
| method on this object</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>securityManager</code> - the securityManager for the cache</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this CacheFactory</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPostProcessor-org.apache.geode.security.PostProcessor-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPostProcessor</h4> |
| <pre>public <a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a> setPostProcessor(<a href="../../../../org/apache/geode/security/PostProcessor.html" title="interface in org.apache.geode.security">PostProcessor</a> postProcessor)</pre> |
| <div class="block">Sets the postProcessor for the cache. If this postProcessor is set, it will override the |
| security-post-processor setting in the gemfire system properties. |
| |
| This is provided mostly for container to inject an already initialized post processor. An |
| object provided this way is expected to be initialized already. We are not calling the init |
| method on this object</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>postProcessor</code> - the postProcessor for the cache</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this CacheFactory</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/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</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 CacheFactory</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>public <a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</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">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. |
| |
| 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 CacheFactory</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>public <a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a> setPdxPersistent(boolean isPersistent)</pre> |
| <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 <code>GatewaySender</code> or <code>AsyncEventQueue</code> 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 CacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setPdxIgnoreUnreadFields-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setPdxIgnoreUnreadFields</h4> |
| <pre>public <a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</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 CacheFactory</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 6.6</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addMeterSubregistry-io.micrometer.core.instrument.MeterRegistry-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addMeterSubregistry</h4> |
| <pre><a href="../../../../org/apache/geode/annotations/Experimental.html" title="annotation in org.apache.geode.annotations">@Experimental</a>(<a href="../../../../org/apache/geode/annotations/Experimental.html#value--">value</a>="Micrometer metrics is a new addition to Geode and the API may change") |
| public <a href="../../../../org/apache/geode/cache/CacheFactory.html" title="class in org.apache.geode.cache">CacheFactory</a> addMeterSubregistry(io.micrometer.core.instrument.MeterRegistry subregistry)</pre> |
| <div class="block">Adds the given meter registry to the cache's composite registry for publishing cache metrics |
| to external monitoring systems. |
| |
| <p> |
| Example adding a meter sub-registry: |
| |
| <pre> |
| MeterRegistry prometheusRegistry = new PrometheusMeterRegistry(...); |
| |
| Cache cache = new CacheFactory() |
| .addMeterSubregistry(prometheusRegistry) |
| .create(); |
| </pre> |
| |
| <p> |
| Example adding multiple meter sub-registries: |
| |
| <pre> |
| MeterRegistry prometheusRegistry = new PrometheusMeterRegistry(...); |
| MeterRegistry influxRegistry = new InfluxMeterRegistry(...); |
| MeterRegistry newRelicRegistry = new NewRelicMeterRegistry(...); |
| |
| Cache cache = new CacheFactory() |
| .addMeterSubregistry(prometheusRegistry) |
| .addMeterSubregistry(influxRegistry) |
| .addMeterSubregistry(newRelicRegistry) |
| .create(); |
| </pre> |
| |
| <p> |
| Experimental: Micrometer metrics is a new addition to Geode and the API may change.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>subregistry</code> - the registry to add</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this CacheFactory</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://micrometer.io/docs">Micrometer Documentation</a>, |
| <a href="https://micrometer.io/docs/concepts">Micrometer Concepts</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="create-org.apache.geode.distributed.DistributedSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</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 static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a> create(<a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed">DistributedSystem</a> system) |
| throws <a href="../../../../org/apache/geode/cache/CacheExistsException.html" title="class in org.apache.geode.cache">CacheExistsException</a>, |
| <a href="../../../../org/apache/geode/cache/TimeoutException.html" title="class in org.apache.geode.cache">TimeoutException</a>, |
| <a href="../../../../org/apache/geode/cache/CacheWriterException.html" title="class in org.apache.geode.cache">CacheWriterException</a>, |
| <a href="../../../../org/apache/geode/cache/GatewayException.html" title="class in org.apache.geode.cache">GatewayException</a>, |
| <a href="../../../../org/apache/geode/cache/RegionExistsException.html" title="class in org.apache.geode.cache">RegionExistsException</a></pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">as of 6.5 use <a href="../../../../org/apache/geode/cache/CacheFactory.html#CacheFactory-java.util.Properties-"><code>CacheFactory(Properties)</code></a> instead.</span></div> |
| <div class="block">Creates a new cache that uses the specified <code>system</code>. |
| <p> |
| The <code>system</code> can specify a |
| <A href="../distributed/DistributedSystem.html#cache-xml-file">"cache-xml-file"</a> property |
| which will cause this creation to also create the regions, objects, and attributes declared in |
| the file. The contents of the file must comply with the <code>"doc-files/cache8_0.dtd"></code> file. |
| Note that when parsing the XML file <a href="../../../../org/apache/geode/cache/Declarable.html" title="interface in org.apache.geode.cache"><code>Declarable</code></a> classes are loaded using the current |
| thread's <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getContextClassLoader--" title="class or interface in java.lang">context class loader</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>system</code> - a <code>DistributedSystem</code> obtained by calling |
| <a href="../../../../org/apache/geode/distributed/DistributedSystem.html#connect-java.util.Properties-"><code>DistributedSystem.connect(java.util.Properties)</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>Cache</code> that uses the specified <code>system</code> for distribution.</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>system</code> is not <a href="../../../../org/apache/geode/distributed/DistributedSystem.html#isConnected--"><code>connected</code></a>.</dd> |
| <dd><code><a href="../../../../org/apache/geode/cache/CacheExistsException.html" title="class in org.apache.geode.cache">CacheExistsException</a></code> - If an open cache already exists.</dd> |
| <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/GatewayException.html" title="class in org.apache.geode.cache">GatewayException</a></code> - If a <code>GatewayException</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> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInstance-org.apache.geode.distributed.DistributedSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstance</h4> |
| <pre>public static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a> getInstance(<a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed">DistributedSystem</a> system)</pre> |
| <div class="block">Gets the instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>system</code> - the <code>DistributedSystem</code> the cache was created with.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> associated with the specified system.</dd> |
| <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 created one is |
| <a href="../../../../org/apache/geode/cache/RegionService.html#isClosed--"><code>closed</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInstanceCloseOk-org.apache.geode.distributed.DistributedSystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstanceCloseOk</h4> |
| <pre>public static <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache">Cache</a> getInstanceCloseOk(<a href="../../../../org/apache/geode/distributed/DistributedSystem.html" title="class in org.apache.geode.distributed">DistributedSystem</a> system)</pre> |
| <div class="block">Gets the instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a> even if it |
| has been closed.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>system</code> - the <code>DistributedSystem</code> the cache was created with.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> associated with the specified system.</dd> |
| <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</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>GemFire 3.5</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/Cache.html" title="interface in org.apache.geode.cache">Cache</a> getAnyInstance()</pre> |
| <div class="block">Gets an arbitrary open instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to |
| <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a>. |
| |
| <p> |
| WARNING: To avoid risk of deadlock, do not invoke getAnyInstance() from within any |
| CacheCallback including CacheListener, CacheLoader, CacheWriter, TransactionListener, |
| TransactionWriter. Instead use EntryEvent.getRegion().getCache(), |
| RegionEvent.getRegion().getCache(), LoaderHelper.getRegion().getCache(), or |
| TransactionEvent.getCache(). |
| <p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>arbitrary open instance of <a href="../../../../org/apache/geode/cache/Cache.html" title="interface in org.apache.geode.cache"><code>Cache</code></a> produced by an earlier call to |
| <a href="../../../../org/apache/geode/cache/CacheFactory.html#create--"><code>create()</code></a></dd> |
| <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> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <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> |
| </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/CacheExistsException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/geode/cache/CacheListener.html" title="interface in org.apache.geode.cache"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/geode/cache/CacheFactory.html" target="_top">Frames</a></li> |
| <li><a href="CacheFactory.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> |