blob: 598c7a460ebed0bd2180d7edb2cfc1609538520d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<HTML>
<HEAD>
<TITLE>org.apache.geode.cache.client package</TITLE>
</HEAD>
<BODY>
The <code>org.apache.geode.cache.client</code> package provides APIs used
for client connectivity and caching.
<p>
Most clients will only need to create a
{@link org.apache.geode.cache.client.ClientCache}
using a
{@link org.apache.geode.cache.client.ClientCacheFactory}.
<p>
A client configures the servers it will connect to by creating one or more
{@link org.apache.geode.cache.client.Pool pools}.
For most use cases one pool per client is all you need and the easiest
way to get a single pool is to use
{@link org.apache.geode.cache.client.ClientCacheFactory}.
If you do need more than one pool use a
{@link org.apache.geode.cache.client.PoolFactory pool factory} obtained from the
{@link org.apache.geode.cache.client.PoolManager pool manager} before you
create the cache using
{@link org.apache.geode.cache.client.ClientCacheFactory}.
<p>
An alternative to these APIs is to use the <code>pool</code> XML element
as described in the <code>cache6_5.dtd</code>.
<p>
If you create more than one pool then for regions that will use a pool you
need to configure the pool name on the regions.
This can be done by setting the
pool name on the region using the
{@link org.apache.geode.cache.client.ClientRegionFactory#setPoolName API}
or using the <code>pool-name</code> attribute on the <code>region-attributes</code>
as described in the <code>cache6_5.dtd</code>.
<a name="declarative"><h2>Client Declarative Caching</h2>
<p>A "caching XML file" declares regions, entries, and attributes. When
a <code>ClientCache</code> is created its contents can be initialized
according to a caching XML file.
The top level element must be a client-cache element.
</p>
<p>The Document Type Definition for a declarative cache XML file can
be found in <code>"doc-files/cache6_5.dtd"</code>.
For examples of declarative cache XML files see <A
href="{@docRoot}/javadoc-images/example-client-cache.xml">example1</A>.
</BODY>
</HTML>