You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2014/03/25 22:04:28 UTC
svn commit: r1581517 - in /commons/proper/jcs/trunk/xdocs:
getting_started/intro.xml index.xml
Author: tv
Date: Tue Mar 25 21:04:28 2014
New Revision: 1581517
URL: http://svn.apache.org/r1581517
Log:
Update docs
Modified:
commons/proper/jcs/trunk/xdocs/getting_started/intro.xml
commons/proper/jcs/trunk/xdocs/index.xml
Modified: commons/proper/jcs/trunk/xdocs/getting_started/intro.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/xdocs/getting_started/intro.xml?rev=1581517&r1=1581516&r2=1581517&view=diff
==============================================================================
--- commons/proper/jcs/trunk/xdocs/getting_started/intro.xml (original)
+++ commons/proper/jcs/trunk/xdocs/getting_started/intro.xml Tue Mar 25 21:04:28 2014
@@ -80,28 +80,33 @@
Download the latest version of JCS. The latest JCS
builds are located
<a
- href="http://svn.apache.org/viewcvs.cgi/commons/proper/jcs/trunk/tempbuild/">
+ href="http://www.apache.org/dist/commons/jcs/">
HERE
</a>
</p>
<p>
If you would like to build JCS yourself, check it out
from Subversion and build it as you would any other
- project built by Maven 1.x. The location of the
+ project built by Maven. The location of the
repository is documented in the project info pages that
are linked via the left nav.
</p>
</section>
<section name="STEP 3: Get the Required Dependencies">
+ <p>
+ Beginning with version 2.0 the core of JCS (the LRU memory
+ cache, the indexed disk cache, the TCP lateral, and the
+ RMI remote server) requires only commons-logging.
+ </p>
<p>
- As of version 1.2.7.0, the core of JCS (the LRU memory
+ Beginning with version 1.2.7.0 and up to version 1.3, the core of
+ JCS (the LRU memory
cache, the indexed disk cache, the TCP lateral, and the
RMI remote server) requires only two other jars.
</p>
<p>
- <a
- href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
+ <a href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
concurrent
</a>
</p>
@@ -205,9 +210,8 @@ jcs.auxiliary.DC.attributes.ShutdownSpoo
<section name="STEP 5: Programming to JCS">
<p>
- JCS provides a convenient class that should meet all
- your needs. It is called, appropriately enough,
- <code>org.apache.commons.jcs.JCS</code>
+ JCS provides a few convenient classes that should meet all
+ your needs.
</p>
<p>
To get a cache region you simply ask JCS for the region
@@ -217,51 +221,53 @@ jcs.auxiliary.DC.attributes.ShutdownSpoo
<source>
<![CDATA[
import org.apache.commons.jcs.JCS;
+import org.apache.commons.jcs.access.CacheAccess;
import org.apache.commons.jcs.access.exception.CacheException;
. . .
private static final String cacheRegionName = "city";
- private JCS cache = null;
+ private CacheAccess<String, City> cache = null;
. . .
- // in your constructor you might do this
- try
- {
- setCache( JCS.getInstance( this.getCacheRegionName() ) );
- }
- catch ( CacheException e )
- {
- log.error( "Problem initializing cache for region name ["
- + this.getCacheRegionName() + "].", e );
- }
+ // in your constructor you might do this
+ try
+ {
+ CacheAccess<String, City> c = JCS.getInstance( this.getCacheRegionName() );
+ setCache( c );
+ }
+ catch ( CacheException e )
+ {
+ log.error( "Problem initializing cache for region name ["
+ + this.getCacheRegionName() + "].", e );
+ }
. . .
- // to get a city out of the cache by id you might do this:
- String key = "cityId:" + String.valueOf( id );
+ // to get a city out of the cache by id you might do this:
+ String key = "cityId:" + String.valueOf( id );
- City city = (City) cache.get( key );
+ City city = cache.get( key );
. . .
- // to put a city object in the cache, you could do this:
- try
- {
- // if it isn't null, insert it
- if ( city != null )
- {
- cache.put( key, city );
- }
- }
- catch ( CacheException e )
- {
- log.error( "Problem putting "
- + city + " in the cache, for key " + key, e );
- }
+ // to put a city object in the cache, you could do this:
+ try
+ {
+ // if it isn't null, insert it
+ if ( city != null )
+ {
+ cache.put( key, city );
+ }
+ }
+ catch ( CacheException e )
+ {
+ log.error( "Problem putting "
+ + city + " in the cache, for key " + key, e );
+ }
]]>
- </source>
+</source>
</section>
</body>
Modified: commons/proper/jcs/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/xdocs/index.xml?rev=1581517&r1=1581516&r2=1581517&view=diff
==============================================================================
--- commons/proper/jcs/trunk/xdocs/index.xml (original)
+++ commons/proper/jcs/trunk/xdocs/index.xml Tue Mar 25 21:04:28 2014
@@ -47,18 +47,18 @@
<li>Remote synchronization</li>
<li>Remote store recovery</li>
<li>Non-blocking "zombie" (balking facade) pattern</li>
- <li> Lateral distribution of elements via HTTP, TCP, or UDP</li>
+ <li>Lateral distribution of elements via HTTP, TCP, or UDP</li>
<li>UDP Discovery of other caches</li>
<li>Element event handling</li>
- <li> Remote server chaining (or clustering) and failover</li>
+ <li>Remote server chaining (or clustering) and failover</li>
<li>Custom event logging hooks</li>
<li>Custom event queue injection</li>
<li>Custom object serializer injection</li>
<li>Key pattern matching retrieval</li>
<li>Network efficient multi-key retrieval</li>
</ul>
- <p> JCS works on JDK versions 1.4 and up. It only has two
- dependencies: Commons Logging and Doug Lea's Util Concurrent.</p>
+ <p> JCS 2.0 works on JDK versions 1.6 and up. It only has a
+ dependency on Commons Logging.</p>
</section>
<section name="JCS is a Composite Cache">
<p>