Merge pull request #12 from xenoamess-fork/patch-2
fix travis-ci script.
diff --git a/.travis.yml b/.travis.yml
index 4120ed5..afa4630 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,4 +24,4 @@
- openjdk8
- openjdk11
after_success:
- - mvn clean cobertura:cobertura coveralls:report
+ - mvn -V --no-transfer-progress clean cobertura:cobertura coveralls:report
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bb87be7..47c385f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -50,7 +50,7 @@
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
-+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons JCS's scope.
++ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons JCS's scope.
+ Submit a ticket for your issue, assuming one does not already exist.
+ Clearly describe the issue including steps to reproduce when it is a bug.
+ Make sure you fill in the earliest version that you know has the issue.
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index ce5330a..abf489d 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -16,39 +16,50 @@
Apache Commons JCS
- Version 2.1
+ Version 3.0
Release Notes
INTRODUCTION:
-This document contains the release notes for the 2.1 version of Apache Commons JCS.
+This document contains the release notes for the 3.0 version of Apache Commons JCS.
Commons JCS is a distributed caching system written in Java. It is intend to speed up
applications by providing a means to manage cached data of various dynamic natures.
-JCS 2.0 and onwards now targets Java 6.0, making use of features that arrived with Java 5.0
-such as generics and concurrency.
+JCS 3.0 and onwards now targets Java 8.0, making use of features that arrived with Java 8.0
+such as lambdas.
-For the advice on upgrading from 1.x to 2.x, see the following page:
+For the advice on upgrading from 2.x to 3.x, see the following page:
- http://commons.apache.org/proper/commons-jcs/UpgradingFrom13.html
-
-Apache Commons JCS is a distributed, versatile caching system.
-
-This is mainly a bugfix release.
+ http://commons.apache.org/proper/commons-jcs/UpgradingFrom2x.html
Changes in this version include:
+New features:
+o JCS-46: Add configuration option to specify the datagram
+ time-to-live in UDPDiscoverySender
+o Add configuration option to specify the network interface
+ to use for UDP multicast
+o JCS-166: Add configuration option to specify the host to bind the
+ LateralTCPListener to
+o JCS-122: Add a log abstraction layer for java.util.logging or log4j2
+o Add a get method to CacheAccess that allows a Supplier to be specified
Fixed Bugs:
-o SoftReference cache did not work because of strong references being
- stored in payload of DoubleLinkedListNode
-o JCS-172: ElementAttributes.clone() not updating createTime causes cache elements
- to expire immediately Thanks to Tom Schroeder.
-o JCS-171: Multiple CacheEventQueue.QProcessor spawned for the same cache region Thanks to Wiktor Niesiobedzki.
-o JCS-170: Replace at least commas for jmx registration
+o JCS-205: Fix packaging
+o JCS-199: Properly shut down auxiliary caches
+o JCS-182: Fix NPE while closing data source
+o JCS-201: Fix initialization sequence
+Changes:
+o JCS-181: Update dependency to httpclient 4.5.3
+o Update dependency commons-dbcp2
+o Finally require Java 8
+Removed:
+o JCS-122: Remove dependency on commons-logging
+o Remove dependency on velocity-tools
+o Remove deprecated code
Historical list of changes: http://commons.apache.org/proper/commons-jcs/changes-report.html
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..51943ba
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,17 @@
+<!---
+ 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.
+-->
+The Apache Commons security page is [https://commons.apache.org/security.html](https://commons.apache.org/security.html).
diff --git a/commons-jcs-core/pom.xml b/commons-jcs-core/pom.xml
index 53eb5ec..cb2ed45 100644
--- a/commons-jcs-core/pom.xml
+++ b/commons-jcs-core/pom.xml
@@ -22,12 +22,12 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs3</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>commons-jcs3-core</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Apache Commons JCS :: Core</name>
@@ -36,6 +36,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<dependencies>
@@ -76,7 +77,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/access/CacheAccess.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/access/CacheAccess.java
index 7bf290c..0964216 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/access/CacheAccess.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/access/CacheAccess.java
@@ -22,6 +22,7 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@@ -121,7 +122,7 @@
.stream()
.filter(entry -> entry.getValue() != null)
.collect(Collectors.toMap(
- entry -> entry.getKey(),
+ Entry::getKey,
entry -> entry.getValue().getVal()));
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp
index b01bef0..313d349 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp
@@ -16,295 +16,293 @@
specific language governing permissions and limitations
under the License.
--%>
+<!DOCTYPE html>
+<%@page import="java.util.List"%>
<%@page import="org.apache.commons.jcs3.JCS"%>
<%@page import="org.apache.commons.jcs3.access.CacheAccess" %>
<%@page import="org.apache.commons.jcs3.admin.CacheElementInfo" %>
<%@page import="org.apache.commons.jcs3.admin.CacheRegionInfo" %>
-<%@page import="java.io.Serializable" %>
-<%@page import="java.util.HashMap" %>
+<%@page import="org.apache.commons.jcs3.engine.behavior.ICacheElement" %>
<jsp:useBean id="jcsBean" scope="request" class="org.apache.commons.jcs3.admin.JCSAdminBean" />
-<html>
+<html lang="en">
<head>
-
-<SCRIPT LANGUAGE="Javascript">
- function decision( message, url )
+ <script>
+ function decision(message, url)
{
- if( confirm(message) )
+ if(confirm(message))
{
location.href = url;
}
}
-</SCRIPT>
+ </script>
+ <style>
+ body {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: small;
+ }
+
+ h1 {
+ font-size: large;
+ color: navy;
+ }
-<title> JCS Admin Servlet </title>
+ h2 {
+ font-size: medium;
+ color: navy;
+ }
+ a {
+ color: navy;
+ font-weight: 700;
+ text-decoration: none;
+ }
+
+ /* Change color on hover */
+ a:hover {
+ background-color: navy;
+ color: white;
+ }
+
+ pre {
+ font-size: medium;
+ }
+
+ table, th, td {
+ border: thin solid #a0a0a0;
+ font-size: small;
+ }
+
+ table {
+ border-collapse: collapse;
+ }
+
+ tr:nth-child(odd) {
+ background: #EEE;
+ }
+
+ th, td {
+ padding: 4pt;
+ }
+
+ th {
+ background-color: navy;
+ color: white;
+ font-weight: 700;
+ text-align: left;
+ }
+ </style>
+ <title>JCS Administration</title>
</head>
-
<body>
-
<%
- String CACHE_NAME_PARAM = "cacheName";
- String ACTION_PARAM = "action";
- String CLEAR_ALL_REGIONS_ACTION = "clearAllRegions";
- String CLEAR_REGION_ACTION = "clearRegion";
- String REMOVE_ACTION = "remove";
- String DETAIL_ACTION = "detail";
- String REGION_SUMMARY_ACTION = "regionSummary";
- String ITEM_ACTION = "item";
- String KEY_PARAM = "key";
- String SILENT_PARAM = "silent";
+ final String CACHE_NAME_PARAM = "cacheName";
+ final String ACTION_PARAM = "action";
+ final String CLEAR_ALL_REGIONS_ACTION = "clearAllRegions";
+ final String CLEAR_REGION_ACTION = "clearRegion";
+ final String REMOVE_ACTION = "remove";
+ final String DETAIL_ACTION = "detail";
+ final String REGION_SUMMARY_ACTION = "regionSummary";
+ final String ITEM_ACTION = "item";
+ final String KEY_PARAM = "key";
- String DEFAULT_TEMPLATE_NAME = "DEFAULT";
- String REGION_DETAIL_TEMPLATE_NAME = "DETAIL";
- String ITEM_TEMPLATE_NAME = "ITEM";
- String REGION_SUMMARY_TEMPLATE_NAME = "SUMMARY";
+ final String DEFAULT_TEMPLATE_NAME = "DEFAULT";
+ final String REGION_DETAIL_TEMPLATE_NAME = "DETAIL";
+ final String ITEM_TEMPLATE_NAME = "ITEM";
+ final String REGION_SUMMARY_TEMPLATE_NAME = "SUMMARY";
- String templateName = DEFAULT_TEMPLATE_NAME;
+ String templateName = DEFAULT_TEMPLATE_NAME;
- HashMap<String, Object> context = new HashMap<String, Object>();
+ // Get cacheName for actions from request (might be null)
+ String cacheName = request.getParameter(CACHE_NAME_PARAM);
- // Get cacheName for actions from request (might be null)
- String cacheName = request.getParameter( CACHE_NAME_PARAM );
+ if (cacheName != null)
+ {
+ cacheName = cacheName.trim();
+ }
- if ( cacheName != null )
- {
- cacheName = cacheName.trim();
- }
+ // If an action was provided, handle it
+ String action = request.getParameter(ACTION_PARAM);
- // If an action was provided, handle it
- String action = request.getParameter( ACTION_PARAM );
+ if (action == null)
+ {
+ // do nothing
+ }
+ else if (action.equals(CLEAR_ALL_REGIONS_ACTION))
+ {
+ jcsBean.clearAllRegions();
+ }
+ else if (action.equals(CLEAR_REGION_ACTION) && cacheName != null)
+ {
+ jcsBean.clearRegion(cacheName);
+ }
+ else if (action.equals(REMOVE_ACTION))
+ {
+ for (String key : request.getParameterValues(KEY_PARAM))
+ {
+ jcsBean.removeItem(cacheName, key);
+ }
- if ( action != null )
- {
- if ( action.equals( CLEAR_ALL_REGIONS_ACTION ) )
- {
- jcsBean.clearAllRegions();
- }
- else if ( action.equals( CLEAR_REGION_ACTION ) )
- {
- if ( cacheName == null )
- {
- // Not Allowed
- }
- else
- {
- jcsBean.clearRegion( cacheName );
- }
- }
- else if ( action.equals( REMOVE_ACTION ) )
- {
- String[] keys = request.getParameterValues( KEY_PARAM );
+ templateName = REGION_DETAIL_TEMPLATE_NAME;
+ }
+ else if (action.equals(DETAIL_ACTION))
+ {
+ templateName = REGION_DETAIL_TEMPLATE_NAME;
+ }
+ else if (action.equals(ITEM_ACTION))
+ {
+ templateName = ITEM_TEMPLATE_NAME;
+ }
+ else if (action.equals(REGION_SUMMARY_ACTION))
+ {
+ templateName = REGION_SUMMARY_TEMPLATE_NAME;
+ }
- for ( int i = 0; i < keys.length; i++ )
- {
- jcsBean.removeItem( cacheName, keys[ i ] );
- }
+ ///////////////////////////////////////////////////////////////////////////////////
+ //handle display
- templateName = REGION_DETAIL_TEMPLATE_NAME;
- }
- else if ( action.equals( DETAIL_ACTION ) )
- {
- templateName = REGION_DETAIL_TEMPLATE_NAME;
- }
- else if ( action.equals( ITEM_ACTION ) )
- {
- templateName = ITEM_TEMPLATE_NAME;
- }
- else if ( action.equals( REGION_SUMMARY_ACTION ) )
- {
- templateName = REGION_SUMMARY_TEMPLATE_NAME;
- }
- }
+ if (templateName == ITEM_TEMPLATE_NAME)
+ {
+ String key = request.getParameter(KEY_PARAM);
- if ( request.getParameter( SILENT_PARAM ) != null )
- {
- // If silent parameter was passed, no output should be produced.
- //return null;
- }
- else
- {
- // Populate the context based on the template
- if ( templateName == REGION_DETAIL_TEMPLATE_NAME )
- {
- //context.put( "cacheName", cacheName );
- context.put( "elementInfoRecords", jcsBean.buildElementInfo( cacheName ) );
- }
- else if ( templateName == DEFAULT_TEMPLATE_NAME )
- {
- context.put( "cacheInfoRecords", jcsBean.buildCacheInfo() );
- }
- }
+ if (key != null)
+ {
+ key = key.trim();
+ }
-///////////////////////////////////////////////////////////////////////////////////
- //handle display
-
- if ( templateName == ITEM_TEMPLATE_NAME )
- {
- String key = request.getParameter( KEY_PARAM );
-
- if ( key != null )
- {
- key = key.trim();
- }
-
- CacheAccess<Serializable, Serializable> cache = JCS.getInstance( cacheName );
- org.apache.commons.jcs3.engine.behavior.ICacheElement<?, ?> element = cache.getCacheElement( key );
+ CacheAccess<Object, Object> cache = JCS.getInstance(cacheName);
+ ICacheElement<?, ?> element = cache.getCacheElement(key);
%>
-<h1> Item for key [<%=key%>] in region [<%=cacheName%>] </h1>
-
-<a href="JCSAdmin.jsp?action=detail&cacheName=<%=cacheName%>">Region Detail</a>
-| <a href="JCSAdmin.jsp">All Regions</a>
-
- <pre>
- <%=element%>
- </pre>
+<h1>Item for key [<%=key%>] in region [<%=cacheName%>]</h1>
+<p><a href="?action=detail&cacheName=<%=cacheName%>">Region Detail</a>
+| <a href="?">All Regions</a></p>
+<pre>
+<%=element%>
+</pre>
<%
- }
- else if ( templateName == REGION_SUMMARY_TEMPLATE_NAME )
- {
+ }
+ else if (templateName == REGION_SUMMARY_TEMPLATE_NAME)
+ {
%>
-
-<h1> Summary for region [<%=cacheName%>] </h1>
-
-<a href="JCSAdmin.jsp">All Regions</a>
-
+<h1>Summary for region [<%=cacheName%>]</h1>
+<p><a href="?">All Regions</a></p>
<%
- CacheAccess<?, ?> cache = JCS.getInstance( cacheName );
- String stats = cache.getStats();
+ CacheAccess<?, ?> cache = JCS.getInstance(cacheName);
+ String stats = cache.getStats();
%>
-
- <br>
-<b> Stats for region [<%=cacheName%>] </b>
-
- <pre>
- <%=stats%>
- </pre>
-
+<h2>Statistics for region [<%=cacheName%>]</h2>
+<pre>
+<%=stats%>
+</pre>
<%
- }
- else if ( templateName == REGION_DETAIL_TEMPLATE_NAME )
- {
+ }
+ else if (templateName == REGION_DETAIL_TEMPLATE_NAME)
+ {
%>
-
-<h1> Detail for region [<%=cacheName%>] </h1>
-
-<a href="JCSAdmin.jsp">All Regions</a>
-
-<table border="1" cellpadding="5" >
- <tr>
- <th> Key </th>
- <th> Eternal? </th>
- <th> Create time </th>
- <th> Max Life (s) </th>
- <th> Till Expiration (s) </th>
- </tr>
+<h1>Detail for region [<%=cacheName%>]</h1>
+<p><a href="?">All Regions</a></p>
+<table>
+ <tr>
+ <th>Key</th>
+ <th>Eternal?</th>
+ <th>Create time</th>
+ <th>Max Life (s)</th>
+ <th>Till Expiration (s)</th>
+ </tr>
<%
- CacheElementInfo[] list = (CacheElementInfo[]) context.get( "elementInfoRecords" );
- for (CacheElementInfo element : list)
- {
+ for (CacheElementInfo element : jcsBean.buildElementInfo(cacheName))
+ {
%>
- <tr>
- <td> <%=element.getKey()%> </td>
- <td> <%=element.isEternal()%> </td>
- <td> <%=element.getCreateTime()%> </td>
- <td> <%=element.getMaxLifeSeconds()%> </td>
- <td> <%=element.getExpiresInSeconds()%> </td>
- <td>
- <a href="JCSAdmin.jsp?action=item&cacheName=<%=cacheName%>&key=<%=element.getKey()%>"> View </a>
- | <a href="JCSAdmin.jsp?action=remove&cacheName=<%=cacheName%>&key=<%=element.getKey()%>"> Remove </a>
- </td>
- </tr>
+ <tr>
+ <td><%=element.getKey()%></td>
+ <td><%=element.isEternal()%></td>
+ <td><%=element.getCreateTime()%></td>
+ <td><%=element.getMaxLifeSeconds()%></td>
+ <td><%=element.getExpiresInSeconds()%></td>
+ <td>
+ <a href="?action=item&cacheName=<%=cacheName%>&key=<%=element.getKey()%>"> View </a>
+ | <a href="?action=remove&cacheName=<%=cacheName%>&key=<%=element.getKey()%>"> Remove </a>
+ </td>
+ </tr>
+<%
+ }
+
+ CacheAccess<?, ?> cache = JCS.getInstance(cacheName);
+ String stats = cache.getStats();
+%>
+</table>
+<h2>Statistics for region [<%=cacheName%>]</h2>
+<pre>
+<%=stats%>
+</pre>
<%
}
-
- CacheAccess<?, ?> cache = JCS.getInstance( cacheName );
- String stats = cache.getStats();
+ else
+ {
%>
- </table>
-
- <br>
-<b> Stats for region [<%=cacheName%>] </b>
-
- <pre>
- <%=stats%>
- </pre>
-<%
- }
- else
- {
-%>
-
-<h1> Cache Regions </h1>
-
+<h1>Cache Regions</h1>
<p>
These are the regions which are currently defined in the cache. 'Items' and
'Bytes' refer to the elements currently in memory (not spooled). You can clear
-all items for a region by selecting 'Remove all' next to the desired region
-below. You can also <a href="javascript:decision('Clicking OK will clear all the data from all regions!','JCSAdmin.jsp?action=clearAllRegions')">Clear all regions</a>
+all items for a region by selecting 'Clear' next to the desired region
+below. You can also <a href="javascript:decision('Clicking OK will clear all the data from all regions!','?action=clearAllRegions')">Clear all regions</a>
which empties the entire cache.
</p>
-<p>
- <form action="JCSAdmin.jsp">
- <input type="hidden" name="action" value="item">
- Retrieve (key) <input type="text" name="key">
- (region) <select name="cacheName">
+<form action="?"><p>
+ <input type="hidden" name="action" value="item" />
+ Retrieve <input type="text" name="key" autofocus="autofocus" placeholder="(key)" />
+ from region <select name="cacheName">
<%
- CacheRegionInfo[] listSelect = (CacheRegionInfo[]) context.get( "cacheInfoRecords" );
- for (CacheRegionInfo record : listSelect)
- {
- %>
+ List<CacheRegionInfo> records = jcsBean.buildCacheInfo();
+
+ for (CacheRegionInfo record : records)
+ {
+%>
<option value="<%=record.getCacheName()%>"><%=record.getCacheName()%></option>
- <%
- }
-%>
- </select>
- <input type="submit">
- </form>
-</p>
-
-<table border="1" cellpadding="5" >
- <tr>
- <th> Cache Name </th>
- <th> Items </th>
- <th> Bytes </th>
- <th> Status </th>
- <th> Memory Hits </th>
- <th> Aux Hits </th>
- <th> Not Found Misses </th>
- <th> Expired Misses </th>
- </tr>
-
<%
- CacheRegionInfo[] list = (CacheRegionInfo[]) context.get( "cacheInfoRecords" );
- for (CacheRegionInfo record : listSelect)
- {
+ }
%>
- <tr>
- <td> <%=record.getCacheName()%> </td>
- <td> <%=record.getCacheSize()%> </td>
- <td> <%=record.getByteCount()%> </td>
- <td> <%=record.getCacheStatus()%> </td>
- <td> <%=record.getHitCountRam()%> </td>
- <td> <%=record.getHitCountAux()%> </td>
- <td> <%=record.getMissCountNotFound()%> </td>
- <td> <%=record.getMissCountExpired()%> </td>
- <td>
- <a href="JCSAdmin.jsp?action=regionSummary&cacheName=<%=record.getCacheName()%>"> Summary </a>
- | <a href="JCSAdmin.jsp?action=detail&cacheName=<%=record.getCacheName()%>"> Detail </a>
- | <a href="javascript:decision('Clicking OK will remove all the data from the region [<%=record.getCacheName()%>]!','JCSAdmin.jsp?action=clearRegion&cacheName=<%=record.getCacheName()%>')"> Clear </a>
- </td>
- </tr>
+ </select>
+ <input type="submit" value="Retrieve" />
+</p></form>
+<table>
+ <tr>
+ <th>Cache Name</th>
+ <th>Items</th>
+ <th>Bytes</th>
+ <th>Status</th>
+ <th>Memory Hits</th>
+ <th>Aux Hits</th>
+ <th>Not Found Misses</th>
+ <th>Expired Misses</th>
+ <th>Actions</th>
+ </tr>
+<%
+ for (CacheRegionInfo record : records)
+ {
+%>
+ <tr>
+ <td><%=record.getCacheName()%></td>
+ <td><%=record.getCacheSize()%></td>
+ <td><%=record.getByteCount()%></td>
+ <td><%=record.getCacheStatus()%></td>
+ <td><%=record.getHitCountRam()%></td>
+ <td><%=record.getHitCountAux()%></td>
+ <td><%=record.getMissCountNotFound()%></td>
+ <td><%=record.getMissCountExpired()%></td>
+ <td>
+ <a href="?action=regionSummary&cacheName=<%=record.getCacheName()%>">Summary</a>
+ | <a href="?action=detail&cacheName=<%=record.getCacheName()%>">Detail</a>
+ | <a href="javascript:decision('Clicking OK will remove all the data from the region [<%=record.getCacheName()%>]!','?action=clearRegion&cacheName=<%=record.getCacheName()%>')">Clear</a>
+ </td>
+ </tr>
+<%
+ }
+%>
+</table>
<%
}
%>
- </table>
-<%
- }
-%>
-
-
</body>
-
</html>
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdminBean.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdminBean.java
index d1468a7..e53dd69 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdminBean.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdminBean.java
@@ -96,7 +96,7 @@
// Convert all keys to string, store in a sorted map
TreeMap<String, ?> keys = new TreeMap<>(cache.getMemoryCache().getKeySet()
.stream()
- .collect(Collectors.toMap(k -> k.toString(), k -> k)));
+ .collect(Collectors.toMap(Object::toString, k -> k)));
LinkedList<CacheElementInfo> records = new LinkedList<>();
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCache.java
index 8a1ed09..bfb231b 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCache.java
@@ -71,7 +71,7 @@
})
.filter(element -> element != null)
.collect(Collectors.toMap(
- element -> element.getKey(),
+ ICacheElement::getKey,
element -> element));
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java
index 1399e4f..bca907f 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AbstractAuxiliaryCacheFactory.java
@@ -19,8 +19,6 @@
* under the License.
*/
-import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheFactory;
-
/**
* Base class for auxiliary cache factories.
*/
@@ -31,24 +29,6 @@
private String name = this.getClass().getSimpleName();
/**
- * Initialize this factory
- */
- @Override
- public void initialize()
- {
- // empty
- }
-
- /**
- * Dispose of this factory, clean up shared resources
- */
- @Override
- public void dispose()
- {
- // empty
- }
-
- /**
* Gets the name attribute of the DiskCacheFactory object
* <p>
* @return The name value
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java
index ffaf2ae..52bffcd 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/AuxiliaryCacheFactory.java
@@ -48,12 +48,12 @@
/**
* Initialize this factory
*/
- void initialize();
+ default void initialize() { /* empty */ }
/**
* Dispose of this factory, clean up shared resources
*/
- void dispose();
+ default void dispose() { /* empty */ }
/**
* Sets the name attribute of the AuxiliaryCacheFactory object
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCache.java
index d4c9308..138c2a7 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCache.java
@@ -522,7 +522,7 @@
@Override
public CacheStatus getStatus()
{
- return ( alive ? CacheStatus.ALIVE : CacheStatus.DISPOSED );
+ return alive ? CacheStatus.ALIVE : CacheStatus.DISPOSED;
}
/**
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCache.java
index 54e6919..2a421d3 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCache.java
@@ -26,6 +26,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
@@ -269,8 +270,8 @@
key -> processGet( key ))).entrySet().stream()
.filter(entry -> entry.getValue() != null)
.collect(Collectors.toMap(
- entry -> entry.getKey(),
- entry -> entry.getValue()));
+ Entry::getKey,
+ Entry::getValue));
return elements;
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCache.java
index 720fdf2..8fbb830 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCache.java
@@ -38,7 +38,6 @@
import org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCache;
import org.apache.commons.jcs3.auxiliary.disk.jdbc.dsfactory.DataSourceFactory;
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
-import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager;
import org.apache.commons.jcs3.engine.behavior.IElementSerializer;
import org.apache.commons.jcs3.engine.logging.behavior.ICacheEvent;
import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger;
@@ -116,10 +115,8 @@
* @param cattr the configuration object for this cache
* @param dsFactory the DataSourceFactory for this cache
* @param tableState an object to track table operations
- * @param compositeCacheManager the global cache manager
*/
- public JDBCDiskCache( JDBCDiskCacheAttributes cattr, DataSourceFactory dsFactory, TableState tableState,
- ICompositeCacheManager compositeCacheManager )
+ public JDBCDiskCache(JDBCDiskCacheAttributes cattr, DataSourceFactory dsFactory, TableState tableState)
{
super( cattr );
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java
index 0e99d24..1a70699 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java
@@ -95,7 +95,7 @@
TableState tableState = getTableState( cattr.getTableName() );
DataSourceFactory dsFactory = getDataSourceFactory(cattr, compositeCacheManager.getConfigurationProperties());
- JDBCDiskCache<K, V> cache = new JDBCDiskCache<>( cattr, dsFactory, tableState, compositeCacheManager );
+ JDBCDiskCache<K, V> cache = new JDBCDiskCache<>(cattr, dsFactory, tableState);
cache.setCacheEventLogger( cacheEventLogger );
cache.setElementSerializer( elementSerializer );
@@ -150,7 +150,7 @@
*/
protected TableState getTableState(String tableName)
{
- return tableStates.computeIfAbsent(tableName, key -> new TableState(key));
+ return tableStates.computeIfAbsent(tableName, TableState::new);
}
/**
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/dsfactory/JndiDataSourceFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/dsfactory/JndiDataSourceFactory.java
index 7d33e01..6a689c3 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/dsfactory/JndiDataSourceFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/dsfactory/JndiDataSourceFactory.java
@@ -91,7 +91,7 @@
{
synchronized (ctx)
{
- ds = ((DataSource) ctx.lookup(path));
+ ds = (DataSource) ctx.lookup(path);
}
lastLookup = time;
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCache.java
index 59764dc..2030881 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCache.java
@@ -26,7 +26,6 @@
import org.apache.commons.jcs3.auxiliary.disk.jdbc.TableState;
import org.apache.commons.jcs3.auxiliary.disk.jdbc.dsfactory.DataSourceFactory;
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
-import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager;
import org.apache.commons.jcs3.log.Log;
import org.apache.commons.jcs3.log.LogManager;
@@ -54,13 +53,12 @@
* @param attributes the configuration object for this cache
* @param dsFactory the DataSourceFactory for this cache
* @param tableState an object to track table operations
- * @param compositeCacheManager the global cache manager
* @throws SQLException if the pool access could not be set up
*/
public MySQLDiskCache( MySQLDiskCacheAttributes attributes, DataSourceFactory dsFactory,
- TableState tableState, ICompositeCacheManager compositeCacheManager ) throws SQLException
+ TableState tableState) throws SQLException
{
- super( attributes, dsFactory, tableState, compositeCacheManager );
+ super( attributes, dsFactory, tableState);
mySQLDiskCacheAttributes = attributes;
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheFactory.java
index da702ad..f3da717 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheFactory.java
@@ -68,7 +68,7 @@
TableState tableState = getTableState( cattr.getTableName() );
DataSourceFactory dsFactory = getDataSourceFactory(cattr, compositeCacheManager.getConfigurationProperties());
- MySQLDiskCache<K, V> cache = new MySQLDiskCache<>( cattr, dsFactory, tableState, compositeCacheManager );
+ MySQLDiskCache<K, V> cache = new MySQLDiskCache<>( cattr, dsFactory, tableState);
cache.setCacheEventLogger( cacheEventLogger );
cache.setElementSerializer( elementSerializer );
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLTableOptimizer.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLTableOptimizer.java
index dc83d54..ffd2cde 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLTableOptimizer.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLTableOptimizer.java
@@ -134,34 +134,34 @@
try (Connection con = dataSource.getConnection())
{
// TEST
-
try (Statement sStatement = con.createStatement())
{
- ResultSet rs = sStatement.executeQuery( "optimize table " + this.getTableName() );
-
- // first row is error, then status
- // if there is only one row in the result set, everything
- // should be fine.
- // This may be mysql version specific.
- if ( rs.next() )
+ try (ResultSet rs = sStatement.executeQuery( "optimize table " + this.getTableName() ))
{
- String status = rs.getString( "Msg_type" );
- String message = rs.getString( "Msg_text" );
-
- log.info( "Message Type: {0}", status );
- log.info( "Message: {0}", message );
-
- if ( "error".equals( status ) )
+ // first row is error, then status
+ // if there is only one row in the result set, everything
+ // should be fine.
+ // This may be mysql version specific.
+ if ( rs.next() )
{
- log.warn( "Optimization was in error. Will attempt "
- + "to repair the table. Message: {0}", message);
+ String status = rs.getString( "Msg_type" );
+ String message = rs.getString( "Msg_text" );
- // try to repair the table.
- success = repairTable( sStatement );
- }
- else
- {
- success = true;
+ log.info( "Message Type: {0}", status );
+ log.info( "Message: {0}", message );
+
+ if ( "error".equals( status ) )
+ {
+ log.warn( "Optimization was in error. Will attempt "
+ + "to repair the table. Message: {0}", message);
+
+ // try to repair the table.
+ success = repairTable( sStatement );
+ }
+ else
+ {
+ success = true;
+ }
}
}
@@ -187,7 +187,7 @@
tableState.setState( TableState.FREE );
log.info( "Optimization of table [{0}] took {1} ms.",
- () -> this.getTableName(), () -> timer.getElapsedTime() );
+ this::getTableName, () -> timer.getElapsedTime() );
}
return success;
@@ -203,16 +203,20 @@
protected String getTableStatus( Statement sStatement )
throws SQLException
{
- ResultSet statusResultSet = sStatement.executeQuery( "show table status" );
StringBuilder statusString = new StringBuilder();
- int numColumns = statusResultSet.getMetaData().getColumnCount();
- while ( statusResultSet.next() )
+ try (ResultSet statusResultSet = sStatement.executeQuery( "show table status" ))
{
- statusString.append( "\n" );
- for ( int i = 1; i <= numColumns; i++ )
+ int numColumns = statusResultSet.getMetaData().getColumnCount();
+ while ( statusResultSet.next() )
{
- statusString.append( statusResultSet.getMetaData().getColumnLabel( i ) + " ["
- + statusResultSet.getString( i ) + "] | " );
+ statusString.append( "\n" );
+ for ( int i = 1; i <= numColumns; i++ )
+ {
+ statusString.append(statusResultSet.getMetaData().getColumnLabel(i))
+ .append(" [")
+ .append(statusResultSet.getString(i))
+ .append("] | ");
+ }
}
}
return statusString.toString();
@@ -234,23 +238,28 @@
boolean success = false;
// if( message != null && message.indexOf( ) )
- ResultSet repairResult = sStatement.executeQuery( "repair table " + this.getTableName() );
StringBuilder repairString = new StringBuilder();
- int numColumns = repairResult.getMetaData().getColumnCount();
- while ( repairResult.next() )
+ try (ResultSet repairResult = sStatement.executeQuery( "repair table " + this.getTableName()))
{
- for ( int i = 1; i <= numColumns; i++ )
+ int numColumns = repairResult.getMetaData().getColumnCount();
+ while ( repairResult.next() )
{
- repairString.append( repairResult.getMetaData().getColumnLabel( i ) + " [" + repairResult.getString( i )
- + "] | " );
- }
+ for ( int i = 1; i <= numColumns; i++ )
+ {
+ repairString.append(repairResult.getMetaData().getColumnLabel(i))
+ .append(" [")
+ .append(repairResult.getString(i))
+ .append("] | ");
+ }
- String message = repairResult.getString( "Msg_text" );
- if ( "OK".equals( message ) )
- {
- success = true;
+ String message = repairResult.getString( "Msg_text" );
+ if ( "OK".equals( message ) )
+ {
+ success = true;
+ }
}
}
+
log.info("{0}", repairString);
if ( !success )
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWait.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWait.java
index b85616b..e2fff84 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWait.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWait.java
@@ -25,6 +25,7 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.stream.Collectors;
@@ -173,8 +174,8 @@
key -> get(key))).entrySet().stream()
.filter(entry -> entry.getValue() != null)
.collect(Collectors.toMap(
- entry -> entry.getKey(),
- entry -> entry.getValue()));
+ Entry::getKey,
+ Entry::getValue));
return elements;
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWaitFacade.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWaitFacade.java
index 18e4c22..7649718 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWaitFacade.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/LateralCacheNoWaitFacade.java
@@ -26,6 +26,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
@@ -232,8 +233,8 @@
key -> get(key))).entrySet().stream()
.filter(entry -> entry.getValue() != null)
.collect(Collectors.toMap(
- entry -> entry.getKey(),
- entry -> entry.getValue()));
+ Entry::getKey,
+ Entry::getValue));
return elements;
}
@@ -301,7 +302,7 @@
@Override
public void removeAll()
{
- Arrays.stream(noWaits).forEach(nw -> nw.removeAll());
+ Arrays.stream(noWaits).forEach(LateralCacheNoWait::removeAll);
}
/** Adds a dispose request to the lateral cache. */
@@ -316,7 +317,7 @@
listener = null;
}
- Arrays.stream(noWaits).forEach(nw -> nw.dispose());
+ Arrays.stream(noWaits).forEach(LateralCacheNoWait::dispose);
}
finally
{
@@ -376,7 +377,7 @@
}
List<CacheStatus> statii = Arrays.stream(noWaits)
- .map(nw -> nw.getStatus())
+ .map(LateralCacheNoWait::getStatus)
.collect(Collectors.toList());
// It's alive if ANY of its nowaits is alive
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
index ce7d98d..e75936a 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java
@@ -21,7 +21,6 @@
import java.io.IOException;
import java.util.ArrayList;
-import java.util.StringTokenizer;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory;
@@ -96,12 +95,11 @@
// no servers are required.
if ( lac.getTcpServers() != null )
{
- StringTokenizer it = new StringTokenizer( lac.getTcpServers(), "," );
- log.debug( "Configured for [{0}] servers.", () -> it.countTokens() );
+ String servers[] = lac.getTcpServers().split("\\s*,\\s*");
+ log.debug( "Configured for [{0}] servers.", servers.length );
- while ( it.hasMoreElements() )
+ for (String server : servers)
{
- String server = (String) it.nextElement();
log.debug( "tcp server = {0}", server );
ITCPLateralCacheAttributes lacC = (ITCPLateralCacheAttributes) lac.clone();
lacC.setTcpServer( server );
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFactory.java
index cbf76d9..46b5c67 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFactory.java
@@ -117,7 +117,7 @@
// add a listener if there are none, need to tell rca what
// number it is at
- if ( ( !primaryDefined && fCnt == 1 ) || noWaits.size() <= 0 )
+ if (!primaryDefined && fCnt == 1 || noWaits.size() <= 0)
{
RemoteCacheNoWait<K,V> ic = rcm.getCache( rca );
noWaits.add( ic );
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFailoverRunner.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFailoverRunner.java
index 909bf6b..c1fe592 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFailoverRunner.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheFailoverRunner.java
@@ -173,11 +173,10 @@
log.debug( "starting at failover i = {0}", i );
// try them one at a time until successful
- for ( ; i.hasNext() && !allright.get();)
+ while (i.hasNext() && !allright.get())
{
RemoteLocation server = i.next();
- log.debug( "Trying server [{1}] at failover index i = {1}",
- server, i );
+ log.debug( "Trying server [{0}] at failover index i = {1}", server, i );
RemoteCacheAttributes rca = (RemoteCacheAttributes) rca0.clone();
rca.setRemoteLocation(server);
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheManager.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheManager.java
index 84119e2..ccd9dd5 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheManager.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteCacheManager.java
@@ -229,9 +229,7 @@
public <K, V> RemoteCacheNoWait<K, V> getCache( IRemoteCacheAttributes cattr )
{
RemoteCacheNoWait<K, V> remoteCacheNoWait =
- (RemoteCacheNoWait<K, V>) caches.computeIfAbsent(cattr.getCacheName(), key -> {
- return newRemoteCacheNoWait(cattr);
- });
+ (RemoteCacheNoWait<K, V>) caches.computeIfAbsent(cattr.getCacheName(), key -> newRemoteCacheNoWait(cattr));
// might want to do some listener sanity checking here.
return remoteCacheNoWait;
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteUtils.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteUtils.java
index 427992d..e05ec03 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteUtils.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/RemoteUtils.java
@@ -222,7 +222,7 @@
if (factoryInUse != null && !factoryInUse.getClass().getName().startsWith("org.apache.commons.jcs3"))
{
log.info("Could not create new custom socket factory. {0} Factory in use = {1}",
- () -> e.getMessage(), () -> RMISocketFactory.getSocketFactory());
+ () -> e.getMessage(), RMISocketFactory::getSocketFactory);
}
}
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/ICommonRemoteCacheAttributes.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/ICommonRemoteCacheAttributes.java
index be29370..edb9ced 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/ICommonRemoteCacheAttributes.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/behavior/ICommonRemoteCacheAttributes.java
@@ -94,7 +94,7 @@
* <p>
* @return The remote location value
*/
- public RemoteLocation getRemoteLocation();
+ RemoteLocation getRemoteLocation();
/**
* Gets the clusterServers attribute of the IRemoteCacheAttributes object
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServer.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServer.java
index fb7f5a4..2b5b92d 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServer.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServer.java
@@ -314,7 +314,7 @@
// UPDATE LOCALS IF A REQUEST COMES FROM A CLUSTER
// IF LOCAL CLUSTER CONSISTENCY IS CONFIGURED
- if ( !fromCluster || ( fromCluster && remoteCacheServerAttributes.isLocalClusterConsistency() ) )
+ if (!fromCluster || fromCluster && remoteCacheServerAttributes.isLocalClusterConsistency())
{
ICacheEventQueue<K, V>[] qlist = getEventQList( cacheDesc, requesterId );
log.debug( "qlist.length = {0}", qlist.length );
@@ -843,7 +843,7 @@
// UPDATE LOCALS IF A REQUEST COMES FROM A CLUSTER
// IF LOCAL CLUSTER CONSISTENCY IS CONFIGURED
- if ( !fromCluster || ( fromCluster && remoteCacheServerAttributes.isLocalClusterConsistency() ) )
+ if (!fromCluster || fromCluster && remoteCacheServerAttributes.isLocalClusterConsistency())
{
ICacheEventQueue<K, V>[] qlist = getEventQList( cacheDesc, requesterId );
@@ -928,13 +928,13 @@
}
// update registered listeners
- if ( !fromCluster || ( fromCluster && remoteCacheServerAttributes.isLocalClusterConsistency() ) )
+ if (!fromCluster || fromCluster && remoteCacheServerAttributes.isLocalClusterConsistency())
{
ICacheEventQueue<K, V>[] qlist = getEventQList( cacheDesc, requesterId );
- for ( int i = 0; i < qlist.length; i++ )
+ for (ICacheEventQueue<K, V> q : qlist)
{
- qlist[i].addRemoveAllEvent();
+ q.addRemoveAllEvent();
}
}
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerAttributes.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerAttributes.java
index b890d7c..6d9c8f0 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerAttributes.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerAttributes.java
@@ -42,13 +42,13 @@
private String configFileName = "";
/** Should we start the registry */
- private final boolean DEFAULT_START_REGISTRY = true;
+ private final static boolean DEFAULT_START_REGISTRY = true;
/** Should we start the registry */
private boolean startRegistry = DEFAULT_START_REGISTRY;
/** Should we try to keep the registry alive */
- private final boolean DEFAULT_USE_REGISTRY_KEEP_ALIVE = true;
+ private final static boolean DEFAULT_USE_REGISTRY_KEEP_ALIVE = true;
/** Should we try to keep the registry alive */
private boolean useRegistryKeepAlive = DEFAULT_USE_REGISTRY_KEEP_ALIVE;
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerFactory.java
index 9a1c85f..02789a2 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerFactory.java
@@ -20,6 +20,7 @@
*/
import java.io.IOException;
+import java.net.InetAddress;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
@@ -436,15 +437,16 @@
}
// startup.
- String host = prop.getProperty( "registry.host" );
+ String hostName = prop.getProperty( "registry.host" );
+ InetAddress host = InetAddress.getByName(hostName);
- if ( host == null || host.trim().equals( "" ) || host.trim().equals( "localhost" ) )
+ if (host.isLoopbackAddress())
{
log.debug( "main> creating registry on the localhost" );
RemoteUtils.createRegistry( port );
}
log.debug( "main> starting up RemoteCacheServer" );
- startup( host, port, prop);
+ startup( host.getHostName(), port, prop);
log.debug( "main> done" );
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheStartupServlet.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheStartupServlet.java
index d9966ae..8dbb1e5 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheStartupServlet.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheStartupServlet.java
@@ -21,6 +21,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets;
import java.util.Properties;
@@ -119,10 +120,17 @@
log.debug("registryHost = [{0}]", registryHost);
- if ("localhost".equals(registryHost) || "127.0.0.1".equals(registryHost))
+ try
{
- log.warn("The local address [{0}] is INVALID. Other machines must "
- + "be able to use the address to reach this server.", registryHost);
+ if (InetAddress.getByName(registryHost).isLoopbackAddress())
+ {
+ log.warn("The local address [{0}] is a loopback address. Other machines must "
+ + "be able to use the address to reach this server.", registryHost);
+ }
+ }
+ catch (UnknownHostException e)
+ {
+ throw new ServletException("Could not resolve registry host " + registryHost, e);
}
try
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheElement.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheElement.java
index 9d64993..ab37c6e 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheElement.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheElement.java
@@ -1,5 +1,7 @@
package org.apache.commons.jcs3.engine;
+import java.util.Objects;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -138,6 +140,25 @@
}
/**
+ * @param obj other object
+ * @return true if this object key equals the key of obj
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (!(obj instanceof CacheElement))
+ {
+ return false;
+ }
+ CacheElement<?,?> other = (CacheElement<?,?>) obj;
+ return Objects.equals(key, other.key);
+ }
+
+ /**
* @return a hash of the key only
*/
@Override
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheWatchRepairable.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheWatchRepairable.java
index 342479b..bc41de7 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheWatchRepairable.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/CacheWatchRepairable.java
@@ -91,9 +91,7 @@
{
// Record the added cache listener locally, regardless of whether the
// remote add-listener operation succeeds or fails.
- Set<ICacheListener<?, ?>> listenerSet = cacheMap.computeIfAbsent(cacheName, key -> {
- return new CopyOnWriteArraySet<>();
- });
+ Set<ICacheListener<?, ?>> listenerSet = cacheMap.computeIfAbsent(cacheName, key -> new CopyOnWriteArraySet<>());
listenerSet.add( obj );
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java
index dfb85ff..8fffb6b 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/behavior/ICacheObserver.java
@@ -43,8 +43,6 @@
<K, V> void addCacheListener( String cacheName, ICacheListener<K, V> obj )
throws IOException;
- //, CacheNotFoundException;
-
/**
* Subscribes to all caches.
*
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/control/CompositeCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/control/CompositeCache.java
index 75e51a1..8dd1e26 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/control/CompositeCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/control/CompositeCache.java
@@ -24,6 +24,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
@@ -40,9 +41,9 @@
import org.apache.commons.jcs3.engine.behavior.ICache;
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
import org.apache.commons.jcs3.engine.behavior.ICompositeCacheAttributes;
+import org.apache.commons.jcs3.engine.behavior.ICompositeCacheAttributes.DiskUsagePattern;
import org.apache.commons.jcs3.engine.behavior.IElementAttributes;
import org.apache.commons.jcs3.engine.behavior.IRequireScheduler;
-import org.apache.commons.jcs3.engine.behavior.ICompositeCacheAttributes.DiskUsagePattern;
import org.apache.commons.jcs3.engine.control.event.ElementEvent;
import org.apache.commons.jcs3.engine.control.event.behavior.ElementEventType;
import org.apache.commons.jcs3.engine.control.event.behavior.IElementEvent;
@@ -788,8 +789,8 @@
getMatchingFromMemory(pattern).entrySet().stream(),
getMatchingFromAuxiliaryCaches(pattern, localOnly).entrySet().stream())
.collect(Collectors.toMap(
- entry -> entry.getKey(),
- entry -> entry.getValue(),
+ Entry::getKey,
+ Entry::getValue,
// Prefer memory entries
(mem, aux) -> mem));
}
@@ -1219,7 +1220,7 @@
// - The auxiliary is not alive
// - The auxiliary is remote and the invocation was remote
if (aux == null || aux.getStatus() != CacheStatus.ALIVE
- || (fromRemote && aux.getCacheType() == CacheType.REMOTE_CACHE))
+ || fromRemote && aux.getCacheType() == CacheType.REMOTE_CACHE)
{
log.info("In DISPOSE, [{0}] SKIPPING auxiliary [{1}] fromRemote [{2}]",
() -> this.cacheAttr.getCacheName(), () -> aux.getCacheName(),
@@ -1515,7 +1516,7 @@
// If you have a 0 size memory cache, then the last access will
// not get updated.
// you will need to set the idle time to -1.
- if ((idleTime != -1) && (timestamp - lastAccessTime) > idleTime * timeFactorForMilliseconds)
+ if (idleTime != -1 && timestamp - lastAccessTime > idleTime * timeFactorForMilliseconds)
{
log.debug("Exceeded maxIdle: {0}", () -> element.getKey());
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractDoubleLinkedListMemoryCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractDoubleLinkedListMemoryCache.java
index 55479c5..85a846c 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractDoubleLinkedListMemoryCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractDoubleLinkedListMemoryCache.java
@@ -62,7 +62,7 @@
{
super.initialize(hub);
list = new DoubleLinkedList<>();
- log.info("initialized MemoryCache for {0}", () -> getCacheName());
+ log.info("initialized MemoryCache for {0}", this::getCacheName);
}
/**
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractMemoryCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractMemoryCache.java
index dec6227..c9f1d59 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractMemoryCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/AbstractMemoryCache.java
@@ -131,7 +131,7 @@
})
.filter(element -> element != null)
.collect(Collectors.toMap(
- element -> element.getKey(),
+ ICacheElement::getKey,
element -> element));
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCache.java
index 8d9fa7b..cfccb25 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCache.java
@@ -49,7 +49,7 @@
public void initialize( CompositeCache<K, V> hub )
{
super.initialize( hub );
- log.info( "initialized LHMLRUMemoryCache for {0}", () -> getCacheName() );
+ log.info( "initialized LHMLRUMemoryCache for {0}", this::getCacheName );
}
/**
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/soft/SoftReferenceMemoryCache.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/soft/SoftReferenceMemoryCache.java
index 9776ac2..d89537b 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/soft/SoftReferenceMemoryCache.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/engine/memory/soft/SoftReferenceMemoryCache.java
@@ -76,7 +76,7 @@
super.initialize( hub );
strongReferences = new LinkedBlockingQueue<>();
log.info( "initialized Soft Reference Memory Cache for {0}",
- () -> getCacheName() );
+ this::getCacheName );
}
/**
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/io/ObjectInputStreamClassLoaderAware.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/io/ObjectInputStreamClassLoaderAware.java
index 757024b..d1d0802 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/io/ObjectInputStreamClassLoaderAware.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/io/ObjectInputStreamClassLoaderAware.java
@@ -67,7 +67,7 @@
}
protected boolean isBlacklisted(final String name) {
- return (whitelist != null && !contains(whitelist, name)) || contains(blacklist, name);
+ return whitelist != null && !contains(whitelist, name) || contains(blacklist, name);
}
public final String check(final String name) {
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/MessageFormatter.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/MessageFormatter.java
index fbabfa9..1a50f74 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/MessageFormatter.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/MessageFormatter.java
@@ -65,7 +65,7 @@
{
this.messagePattern = messagePattern;
this.parameters = Arrays.stream(paramSuppliers)
- .map(s -> s.get())
+ .map(Supplier::get)
.toArray();
final int length = parameters == null ? 0 : parameters.length;
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/discovery/UDPDiscoveryReceiver.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/discovery/UDPDiscoveryReceiver.java
index 361b90a..0684d8c 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/discovery/UDPDiscoveryReceiver.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/discovery/UDPDiscoveryReceiver.java
@@ -208,7 +208,7 @@
cnt.incrementAndGet();
- log.debug( "{0} messages received.", () -> getCnt() );
+ log.debug( "{0} messages received.", this::getCnt );
UDPDiscoveryMessage message = null;
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/struct/AbstractLRUMap.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/struct/AbstractLRUMap.java
index 7cfb139..82a1c7f 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/struct/AbstractLRUMap.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/struct/AbstractLRUMap.java
@@ -160,7 +160,7 @@
public Collection<V> values()
{
return map.values().stream()
- .map(value -> value.getPayload())
+ .map(LRUElementDescriptor::getPayload)
.collect(Collectors.toList());
}
@@ -536,7 +536,7 @@
public Set<K> keySet()
{
return map.values().stream()
- .map(value -> value.getKey())
+ .map(LRUElementDescriptor::getKey)
.collect(Collectors.toSet());
}
}
diff --git a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/threadpool/DaemonThreadFactory.java b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/threadpool/DaemonThreadFactory.java
index c559bee..dcb0fac 100644
--- a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/threadpool/DaemonThreadFactory.java
+++ b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/utils/threadpool/DaemonThreadFactory.java
@@ -30,7 +30,7 @@
implements ThreadFactory
{
private final String prefix;
- private final boolean threadIsDaemon = true;
+ private final static boolean THREAD_IS_DAEMON = true;
private int threadPriority = Thread.NORM_PRIORITY;
/**
@@ -67,7 +67,7 @@
Thread t = new Thread( runner );
String oldName = t.getName();
t.setName( prefix + oldName );
- t.setDaemon(threadIsDaemon);
+ t.setDaemon(THREAD_IS_DAEMON);
t.setPriority(threadPriority);
return t;
}
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCache.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCache.java
index 9e18e7c..ed21fe0 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCache.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCache.java
@@ -24,7 +24,6 @@
import java.util.Map;
import java.util.Set;
-import org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCache;
import org.apache.commons.jcs3.engine.CacheStatus;
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
import org.apache.commons.jcs3.engine.stats.behavior.IStats;
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheAttributes.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheAttributes.java
index 5eaa7fe..b67041f 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheAttributes.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheAttributes.java
@@ -1,7 +1,5 @@
package org.apache.commons.jcs3.auxiliary;
-import org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheFactory.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheFactory.java
index 98ad210..3498967 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheFactory.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/MockAuxiliaryCacheFactory.java
@@ -19,7 +19,6 @@
* under the License.
*/
-import org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheFactory;
import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager;
import org.apache.commons.jcs3.engine.behavior.IElementSerializer;
import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger;
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCacheUnitTest.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCacheUnitTest.java
index 1ec3488..420ff08 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCacheUnitTest.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/AbstractDiskCacheUnitTest.java
@@ -27,11 +27,8 @@
import java.util.Map;
import java.util.Set;
-import junit.framework.TestCase;
-
import org.apache.commons.jcs3.TestLogConfigurationUtil;
import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes;
-import org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCache;
import org.apache.commons.jcs3.auxiliary.disk.behavior.IDiskCacheAttributes;
import org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes;
import org.apache.commons.jcs3.engine.CacheElement;
@@ -40,6 +37,8 @@
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
import org.apache.commons.jcs3.engine.behavior.IElementAttributes;
+import junit.framework.TestCase;
+
/** Tests for the abstract disk cache. It's largely tested by actual instances. */
public class AbstractDiskCacheUnitTest
extends TestCase
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheUnitTestAbstract.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheUnitTestAbstract.java
index d0fe76a..84bde7a 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheUnitTestAbstract.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheUnitTestAbstract.java
@@ -25,7 +25,6 @@
import java.nio.charset.StandardCharsets;
import java.util.Map;
-import org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheAttributes;
import org.apache.commons.jcs3.engine.CacheElement;
import org.apache.commons.jcs3.engine.ElementAttributes;
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexDiskCacheUnitTestAbstract.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexDiskCacheUnitTestAbstract.java
index d83bf91..5ba05a2 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexDiskCacheUnitTestAbstract.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexDiskCacheUnitTestAbstract.java
@@ -27,14 +27,13 @@
import org.apache.commons.jcs3.auxiliary.MockCacheEventLogger;
import org.apache.commons.jcs3.auxiliary.disk.DiskTestObject;
-import org.apache.commons.jcs3.utils.timing.SleepUtil;
-import org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes;
import org.apache.commons.jcs3.engine.CacheElement;
import org.apache.commons.jcs3.engine.ElementAttributes;
import org.apache.commons.jcs3.engine.behavior.ICacheElement;
import org.apache.commons.jcs3.engine.behavior.IElementAttributes;
import org.apache.commons.jcs3.engine.control.group.GroupAttrName;
import org.apache.commons.jcs3.engine.control.group.GroupId;
+import org.apache.commons.jcs3.utils.timing.SleepUtil;
import junit.framework.TestCase;
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java
index 4a54786..6b317be 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/mysql/MySQLDiskCacheUnitTest.java
@@ -23,7 +23,6 @@
import org.apache.commons.jcs3.auxiliary.disk.jdbc.TableState;
import org.apache.commons.jcs3.auxiliary.disk.jdbc.dsfactory.SharedPoolDataSourceFactory;
-import org.apache.commons.jcs3.engine.control.CompositeCacheManager;
import junit.framework.TestCase;
@@ -60,8 +59,7 @@
TableState tableState = new TableState( tableName );
tableState.setState( TableState.OPTIMIZATION_RUNNING );
- MySQLDiskCache<String, String> cache = new MySQLDiskCache<>( attributes, dsFactory, tableState,
- CompositeCacheManager.getUnconfiguredInstance() );
+ MySQLDiskCache<String, String> cache = new MySQLDiskCache<>(attributes, dsFactory, tableState);
// DO WORK
Object result = cache.processGet( "myKey" );
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerStartupUtil.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerStartupUtil.java
index a2624cb..3f48c18 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerStartupUtil.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/auxiliary/remote/server/RemoteCacheServerStartupUtil.java
@@ -24,7 +24,6 @@
import java.util.Properties;
import org.apache.commons.jcs3.auxiliary.remote.RemoteUtils;
-import org.apache.commons.jcs3.auxiliary.remote.server.RemoteCacheServer;
import org.apache.commons.jcs3.log.Log;
import org.apache.commons.jcs3.log.LogManager;
import org.apache.commons.jcs3.utils.net.HostNameUtil;
diff --git a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/engine/control/MockCompositeCacheManager.java b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/engine/control/MockCompositeCacheManager.java
index 18a025e..a415660 100644
--- a/commons-jcs-core/src/test/java/org/apache/commons/jcs3/engine/control/MockCompositeCacheManager.java
+++ b/commons-jcs-core/src/test/java/org/apache/commons/jcs3/engine/control/MockCompositeCacheManager.java
@@ -26,7 +26,6 @@
import org.apache.commons.jcs3.engine.ElementAttributes;
import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager;
import org.apache.commons.jcs3.engine.behavior.IShutdownObserver;
-import org.apache.commons.jcs3.engine.control.CompositeCache;
/** For testing. */
public class MockCompositeCacheManager
diff --git a/commons-jcs-dist/pom.xml b/commons-jcs-dist/pom.xml
index dd293ee..e4742d0 100644
--- a/commons-jcs-dist/pom.xml
+++ b/commons-jcs-dist/pom.xml
@@ -21,12 +21,12 @@
<parent>
<artifactId>commons-jcs3</artifactId>
<groupId>org.apache.commons</groupId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>commons-jcs3-dist</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Commons JCS :: Distribution</name>
<description>Creates the Apache Commons JCS multimodule distribution.</description>
@@ -35,6 +35,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<!-- NOTE: These dependency declarations are only required to sort this project to the
diff --git a/commons-jcs-jcache-extras/pom.xml b/commons-jcs-jcache-extras/pom.xml
index 55a5379..255c938 100644
--- a/commons-jcs-jcache-extras/pom.xml
+++ b/commons-jcs-jcache-extras/pom.xml
@@ -21,18 +21,19 @@
<parent>
<artifactId>commons-jcs3</artifactId>
<groupId>org.apache.commons</groupId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>commons-jcs3-jcache-extras</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<name>Apache Commons JCS :: JCache Extras</name>
<scm>
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<dependencies>
diff --git a/commons-jcs-jcache-openjpa/pom.xml b/commons-jcs-jcache-openjpa/pom.xml
index 46570df..fc92e06 100644
--- a/commons-jcs-jcache-openjpa/pom.xml
+++ b/commons-jcs-jcache-openjpa/pom.xml
@@ -21,18 +21,19 @@
<parent>
<artifactId>commons-jcs3</artifactId>
<groupId>org.apache.commons</groupId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>commons-jcs3-jcache-openjpa</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<name>Apache Commons JCS :: JCache OpenJPA</name>
<scm>
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<dependencies>
diff --git a/commons-jcs-jcache/pom.xml b/commons-jcs-jcache/pom.xml
index 555c59a..60c0fe0 100644
--- a/commons-jcs-jcache/pom.xml
+++ b/commons-jcs-jcache/pom.xml
@@ -23,18 +23,19 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs3</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>commons-jcs3-jcache</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<name>Apache Commons JCS :: JCache</name>
<scm>
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<dependencies>
diff --git a/commons-jcs-tck-tests/pom.xml b/commons-jcs-tck-tests/pom.xml
index 88123f9..899aa35 100644
--- a/commons-jcs-tck-tests/pom.xml
+++ b/commons-jcs-tck-tests/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-jcs3</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -34,7 +34,7 @@
-->
<artifactId>commons-jcs3-jcache-tck</artifactId>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<name>Apache Commons JCS :: JCache TCK</name>
@@ -42,6 +42,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<properties>
@@ -79,7 +80,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
diff --git a/pom.xml b/pom.xml
index ec4fc8a..66183bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
<artifactId>commons-jcs3</artifactId>
<packaging>pom</packaging>
- <version>3.0-SNAPSHOT</version>
+ <version>3.1-SNAPSHOT</version>
<!--
* Build with -PjcacheTck to run the JSR-107 TCK
@@ -54,6 +54,7 @@
<connection>scm:git:http://gitbox.apache.org/repos/asf/commons-jcs.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-jcs.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-jcs.git</url>
+ <tag>HEAD</tag>
</scm>
<mailingLists>
@@ -202,13 +203,6 @@
</contributors>
<build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <targetPath>${project.build.outputDirectory}</targetPath>
- </resource>
- </resources>
-
<pluginManagement>
<plugins>
<!-- Re-enable standard copying of N&L files from apache parent -->
@@ -335,13 +329,19 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.13</version>
+ <version>4.13.1</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
+ <artifactId>hamcrest</artifactId>
+ <version>2.2</version>
<scope>test</scope>
</dependency>
@@ -548,6 +548,7 @@
<commons.collections.version>4.4</commons.collections.version>
<commons.lang.version>3.10</commons.lang.version>
<commons.clirr.version>2.8</commons.clirr.version>
+ <commons.assembly-plugin.version>3.3.0</commons.assembly-plugin.version>
<test.type>Unit</test.type>
<doclint>none</doclint>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index ce7c0a3..c9f95dd 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -19,7 +19,10 @@
<author email="dev@commons.apache.org">Apache Commons Developers</author>
</properties>
<body>
- <release version="3.0" date="unreleased">
+ <release version="3.0" date="2020-08-16">
+ <action issue="JCS-205" dev="tv" type="fix">
+ Fix packaging
+ </action>
<action issue="JCS-46" dev="tv" type="add">
Add configuration option to specify the datagram
time-to-live in UDPDiscoverySender
diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm
index 60a6619..63feae5 100644
--- a/src/changes/release-notes.vm
+++ b/src/changes/release-notes.vm
@@ -43,12 +43,12 @@
Commons JCS is a distributed caching system written in Java. It is intend to speed up
applications by providing a means to manage cached data of various dynamic natures.
-JCS 2.0 and onwards now targets Java 6.0, making use of features that arrived with Java 5.0
-such as generics and concurrency.
+JCS 3.0 and onwards now targets Java 8.0, making use of features that arrived with Java 8.0
+such as lambdas.
-For the advice on upgrading from 1.x to 2.x, see the following page:
+For the advice on upgrading from 2.x to 3.x, see the following page:
- ${project.url}UpgradingFrom13.html
+ ${project.url}UpgradingFrom2x.html
$introduction.replaceAll("(?<!\015)\012", "
").replaceAll("(?m)^ +","")
diff --git a/src/site/site.xml b/src/site/site.xml
index edd1123..8e0a738 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -35,8 +35,8 @@
<item name="Upgrading from 2.x to 3.0" href="/UpgradingFrom2x.html"/>
<item name="Mailing Lists" href="/mail-lists.html"/>
<item name="Issue Tracking" href="/issue-tracking.html"/>
- <item name="Source Repository" href="/source-repository.html"/>
- <item name="Core Javadoc (SVN latest)" href="commons-jcs-core/apidocs/index.html"/>
+ <item name="Source Repository" href="/scm.html"/>
+ <item name="Core Javadoc" href="commons-jcs3-core/apidocs/index.html"/>
</menu>
<menu name="Getting Started">
diff --git a/xdocs/BasicJCSConfiguration.xml b/xdocs/BasicJCSConfiguration.xml
index 9a502fa..bf86db2 100644
--- a/xdocs/BasicJCSConfiguration.xml
+++ b/xdocs/BasicJCSConfiguration.xml
@@ -46,10 +46,10 @@
jcs.default=
jcs.default.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
]]></source>
<p>
If you want to add memory shrinking then you can add these
@@ -60,7 +60,7 @@
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
jcs.default.cacheattributes.MaxSpoolPerRun=500
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
]]></source>
<p>
@@ -72,9 +72,9 @@
</p>
<source><![CDATA[
jcs.auxiliary.DC=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jcs/raf
]]></source>
<p>
@@ -90,15 +90,15 @@
<source><![CDATA[
jcs.region.testCache1=DC
jcs.region.testCache1.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=1000
jcs.region.testCache1.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=true
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
-jcs.region.testCache1.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.region.testCache1.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=false
]]></source>
@@ -110,9 +110,9 @@
</p>
<source><![CDATA[
jcs.auxiliary.LTCP=
- org.apache.commons.jcs.auxiliary.lateral.LateralCacheFactory
+ org.apache.commons.jcs3.auxiliary.lateral.LateralCacheFactory
jcs.auxiliary.LTCP.attributes=
- org.apache.commons.jcs.auxiliary.lateral.LateralCacheAttributes
+ org.apache.commons.jcs3.auxiliary.lateral.LateralCacheAttributes
jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP
jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
@@ -150,39 +150,39 @@
jcs.default=DC,LTCP
jcs.default.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
# PRE-DEFINED CACHE REGIONS
jcs.region.testCache1=DC,LTCP
jcs.region.testCache1.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=1000
jcs.region.testCache1.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=true
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
-jcs.region.testCache1.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.region.testCache1.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=false
# AVAILABLE AUXILIARY CACHES
jcs.auxiliary.DC=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jcs/raf
jcs.auxiliary.DC.attributes.maxKeySize=100000
jcs.auxiliary.LTCP=
- org.apache.commons.jcs.auxiliary.lateral.LateralCacheFactory
+ org.apache.commons.jcs3.auxiliary.lateral.LateralCacheFactory
jcs.auxiliary.LTCP.attributes=
- org.apache.commons.jcs.auxiliary.lateral.LateralCacheAttributes
+ org.apache.commons.jcs3.auxiliary.lateral.LateralCacheAttributes
jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP
jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
diff --git a/xdocs/BlockDiskCache.xml b/xdocs/BlockDiskCache.xml
index 608f32a..aa01140 100644
--- a/xdocs/BlockDiskCache.xml
+++ b/xdocs/BlockDiskCache.xml
@@ -64,16 +64,16 @@
##### DEFAULT REGION ########################################
jcs.default=blockDiskCache
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=0
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
##############################################################
##### AUXILIARY CACHES ######################################
# Block Disk Cache
-jcs.auxiliary.blockDiskCache=org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCacheFactory
-jcs.auxiliary.blockDiskCache.attributes=org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCacheAttributes
+jcs.auxiliary.blockDiskCache=org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheFactory
+jcs.auxiliary.blockDiskCache.attributes=org.apache.commons.jcs3.auxiliary.disk.block.BlockDiskCacheAttributes
jcs.auxiliary.blockDiskCache.attributes.DiskPath=target/test-sandbox/block-disk-cache-huge
jcs.auxiliary.blockDiskCache.attributes.MaxPurgatorySize=300000
jcs.auxiliary.blockDiskCache.attributes.MaxKeySize=1000000
diff --git a/xdocs/CacheEventLogging.xml b/xdocs/CacheEventLogging.xml
index e540fce..39aed8f 100644
--- a/xdocs/CacheEventLogging.xml
+++ b/xdocs/CacheEventLogging.xml
@@ -28,7 +28,7 @@
and critical errors to the same logger.</p>
<p>
To inject a custom event logger, you simply need to implement the
- <code>org.apache.commons.jcs.engine.logging.behavior.ICacheEventLogger
+ <code>org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger
</code>
interface and add a couple of lines to the cache.ccf file.
</p>
@@ -38,8 +38,8 @@
could do the following:</p>
<source><![CDATA[
. . .
- jcs.auxiliary.RC=org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RC.attributes=org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+ jcs.auxiliary.RC=org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
+jcs.auxiliary.RC.attributes=org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RC.attributes.FailoverServers=localhost:1101,localhost:1102
jcs.auxiliary.RC.attributes.LocalPort=1201
jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
@@ -49,7 +49,7 @@
jcs.auxiliary.RC.attributes.GetTimeoutMillis=500
jcs.auxiliary.RC.attributes.ThreadPoolName=remote_cache_client
jcs.auxiliary.RC.attributes.GetOnly=false
-jcs.auxiliary.RC.cacheeventlogger=org.apache.commons.jcs.engine.logging.CacheEventLoggerDebugLogger
+jcs.auxiliary.RC.cacheeventlogger=org.apache.commons.jcs3.engine.logging.CacheEventLoggerDebugLogger
jcs.auxiliary.RC.cacheeventlogger.attributes.logCategoryName=test.RCCEventLogCategory
. . .
]]></source>
diff --git a/xdocs/ElementAttributes.xml b/xdocs/ElementAttributes.xml
index 0a21c50..1372217 100644
--- a/xdocs/ElementAttributes.xml
+++ b/xdocs/ElementAttributes.xml
@@ -49,14 +49,14 @@
jcs.default=DC
jcs.default.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=true
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=700
jcs.default.elementattributes.IdleTime=1800
diff --git a/xdocs/ElementEventHandling.xml b/xdocs/ElementEventHandling.xml
index 4b7ff1c..8a4bcd6 100644
--- a/xdocs/ElementEventHandling.xml
+++ b/xdocs/ElementEventHandling.xml
@@ -48,7 +48,7 @@
<p>
The various events that you can handle have all been
assigned integer codes. The codes are defined in the
- org.apache.commons.jcs.engine.control.event.behavior.IElementEventConstants
+ org.apache.commons.jcs3.engine.control.event.behavior.IElementEventConstants
interface. The events are named descriptively and
include:
</p>
@@ -112,7 +112,7 @@
</table>
<p>
To create an event handler you must implement the
- org.apache.commons.jcs.engine.control.event.behavior.IElementEventHandler
+ org.apache.commons.jcs3.engine.control.event.behavior.IElementEventHandler
interface. This interface contains only one method:
</p>
<source>
diff --git a/xdocs/IndexedDiskAuxCache.xml b/xdocs/IndexedDiskAuxCache.xml
index 5b91a85..c452d57 100644
--- a/xdocs/IndexedDiskAuxCache.xml
+++ b/xdocs/IndexedDiskAuxCache.xml
@@ -122,9 +122,9 @@
</p>
<source><![CDATA[
jcs.auxiliary.DC=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=g:\dev\jakarta-turbine-stratum\raf
jcs.auxiliary.DC.attributes.MaxKeySize=100000
]]></source>
@@ -201,22 +201,22 @@
##############################################################
##### Default Region Configuration
jcs.default=DC
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=100
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
##############################################################
##### CACHE REGIONS
jcs.region.myRegion1=DC
-jcs.region.myRegion1.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.region.myRegion1.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.myRegion1.cacheattributes.MaxObjects=1000
-jcs.region.myRegion1.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.region.myRegion1.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
##############################################################
##### AUXILIARY CACHES
# Indexed Disk Cache
-jcs.auxiliary.DC=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
+jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/indexed-disk-cache
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=10000
@@ -249,13 +249,13 @@
################## DEFAULT CACHE REGION #####################
# sets the default aux value for any non configured caches
jcs.default=DC2
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=200001
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=700
jcs.default.elementattributes.IdleTime=1800
@@ -273,8 +273,8 @@
# If you want to use a separate pool for each disk cache, either use
# the single model or define a different auxiliary for each region and use the Pooled type.
# SINGLE is generally best unless you have a huge # of regions.
-jcs.auxiliary.DC2=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC2.attributes=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+jcs.auxiliary.DC2=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
+jcs.auxiliary.DC2.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC2.attributes.DiskPath=target/test-sandbox/raf
jcs.auxiliary.DC2.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC2.attributes.MaxKeySize=10000
diff --git a/xdocs/IndexedDiskCacheProperties.xml b/xdocs/IndexedDiskCacheProperties.xml
index 125882e..9bafbb5 100644
--- a/xdocs/IndexedDiskCacheProperties.xml
+++ b/xdocs/IndexedDiskCacheProperties.xml
@@ -84,8 +84,8 @@
<subsection name="Example Configuration">
<source>
<![CDATA[
-jcs.auxiliary.DC=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
+jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/indexed-disk-cache
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=10000
@@ -130,8 +130,8 @@
<subsection name="Example Configuration Using Thread Pool">
<source>
<![CDATA[
-jcs.auxiliary.DC=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
+jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=target/test-sandbox/indexed-disk-cache
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=10000
diff --git a/xdocs/JCSvsEHCache.xml b/xdocs/JCSvsEHCache.xml
index cf15ee1..a604577 100644
--- a/xdocs/JCSvsEHCache.xml
+++ b/xdocs/JCSvsEHCache.xml
@@ -245,9 +245,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.commons.jcs.engine.CompositeCacheAttributes;
-import org.apache.commons.jcs.engine.behavior.ICompositeCacheAttributes;
-import org.apache.commons.jcs.utils.struct.LRUMap;
+import org.apache.commons.jcs3.engine.CompositeCacheAttributes;
+import org.apache.commons.jcs3.engine.behavior.ICompositeCacheAttributes;
+import org.apache.commons.jcs3.utils.struct.LRUMap;
/**
* Compare JCS vs ehcache performance.
diff --git a/xdocs/JDBCDiskCache.xml b/xdocs/JDBCDiskCache.xml
index b813a9b..079cd43 100644
--- a/xdocs/JDBCDiskCache.xml
+++ b/xdocs/JDBCDiskCache.xml
@@ -38,13 +38,13 @@
################## DEFAULT CACHE REGION #####################
# sets the default aux value for any non configured caches
jcs.default=MYSQL,RCluster
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=5000
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=true
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=7200
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=14400
jcs.default.elementattributes.IdleTime=14400
@@ -58,8 +58,8 @@
##############################################################
################## AUXILIARY CACHES AVAILABLE ################
# MYSQL disk cache used for flight options
-jcs.auxiliary.MYSQL=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.MYSQL=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.MYSQL.attributes.userName=myUsername
jcs.auxiliary.MYSQL.attributes.password=myPassword
jcs.auxiliary.MYSQL.attributes.url=jdbc:mysql://localhost:3306/YOURDBNAME?autoReconnect=true
@@ -95,13 +95,13 @@
<source>
<![CDATA[
jcs.default=JDBC_0
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=100
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=700
jcs.default.elementattributes.IdleTime=1800
@@ -118,8 +118,8 @@
# #############################################################
# ################# AUXILIARY CACHES AVAILABLE ################
# JDBC disk cache
-jcs.auxiliary.JDBC_0=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_0.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.JDBC_0=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.JDBC_0.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC_0.attributes.tableName=JCS_STORE_0
jcs.auxiliary.JDBC_0.attributes.testBeforeInsert=false
jcs.auxiliary.JDBC_0.attributes.allowRemoveAll=true
@@ -128,8 +128,8 @@
jcs.auxiliary.JDBC_0.attributes.EventQueueType=POOLED
jcs.auxiliary.JDBC_0.attributes.EventQueuePoolName=disk_cache_event_queue
-jcs.auxiliary.JDBC_1=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_1.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.JDBC_1=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.JDBC_1.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC_1.attributes.tableName=JCS_STORE_1
jcs.auxiliary.JDBC_1.attributes.testBeforeInsert=false
jcs.auxiliary.JDBC_1.attributes.allowRemoveAll=true
@@ -169,13 +169,13 @@
<source>
<![CDATA[
jcs.default=JDBC_0
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=100
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=700
jcs.default.elementattributes.IdleTime=1800
@@ -192,8 +192,8 @@
# #############################################################
# ################# AUXILIARY CACHES AVAILABLE ################
# JDBC disk cache
-jcs.auxiliary.JDBC_0=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_0.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.JDBC_0=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.JDBC_0.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC_0.attributes.tableName=JCS_STORE_0
jcs.auxiliary.JDBC_0.attributes.testBeforeInsert=false
jcs.auxiliary.JDBC_0.attributes.allowRemoveAll=true
@@ -202,8 +202,8 @@
jcs.auxiliary.JDBC_0.attributes.EventQueueType=POOLED
jcs.auxiliary.JDBC_0.attributes.EventQueuePoolName=disk_cache_event_queue
-jcs.auxiliary.JDBC_1=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC_1.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.JDBC_1=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.JDBC_1.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC_1.attributes.tableName=JCS_STORE_1
jcs.auxiliary.JDBC_1.attributes.testBeforeInsert=false
jcs.auxiliary.JDBC_1.attributes.allowRemoveAll=true
diff --git a/xdocs/JDBCDiskCacheProperties.xml b/xdocs/JDBCDiskCacheProperties.xml
index 56e05b3..c2ff134 100644
--- a/xdocs/JDBCDiskCacheProperties.xml
+++ b/xdocs/JDBCDiskCacheProperties.xml
@@ -177,8 +177,8 @@
##############################################################
################## AUXILIARY CACHES AVAILABLE ################
# JDBC disk cache
-jcs.auxiliary.JDBC=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.JDBC=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.JDBC.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC.attributes.userName=sa
jcs.auxiliary.JDBC.attributes.password=
jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:
@@ -246,8 +246,8 @@
##############################################################
################## AUXILIARY CACHES AVAILABLE ################
# JDBC disk cache
-jcs.auxiliary.JDBC=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory
-jcs.auxiliary.JDBC.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
+jcs.auxiliary.JDBC=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheFactory
+jcs.auxiliary.JDBC.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.JDBCDiskCacheAttributes
jcs.auxiliary.JDBC.attributes.userName=sa
jcs.auxiliary.JDBC.attributes.password=
jcs.auxiliary.JDBC.attributes.url=jdbc:hsqldb:
diff --git a/xdocs/LateralJavaGroupsAuxCache.xml b/xdocs/LateralJavaGroupsAuxCache.xml
index 988bc6a..db259a8 100644
--- a/xdocs/LateralJavaGroupsAuxCache.xml
+++ b/xdocs/LateralJavaGroupsAuxCache.xml
@@ -45,8 +45,8 @@
<source><![CDATA[
# Lateral JavaGroups Distribution
-jcs.auxiliary.LJG=org.apache.commons.jcs.auxiliary.lateral.LateralCacheFactory
-jcs.auxiliary.LJG.attributes=org.apache.commons.jcs.auxiliary.lateral.LateralCacheAttributes
+jcs.auxiliary.LJG=org.apache.commons.jcs3.auxiliary.lateral.LateralCacheFactory
+jcs.auxiliary.LJG.attributes=org.apache.commons.jcs3.auxiliary.lateral.LateralCacheAttributes
jcs.auxiliary.LJG.attributes.TransmissionTypeName=JAVAGROUPS
jcs.auxiliary.LJG.attributes.PutOnlyMode=true
jcs.auxiliary.LJG.attributes.JGChannelProperties=UDP(mcast_addr=224.0.0.100;mcast_port=7501):PING:FD:STABLE:NAKACK:UNICAST:FRAG:FLUSH:GMS:QUEUE
diff --git a/xdocs/LateralTCPAuxCache.xml b/xdocs/LateralTCPAuxCache.xml
index ba5a4c5..bc5e8d6 100644
--- a/xdocs/LateralTCPAuxCache.xml
+++ b/xdocs/LateralTCPAuxCache.xml
@@ -68,8 +68,8 @@
would be present in all.
</p>
<source><![CDATA[
-jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
+jcs.auxiliary.LTCP=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
+jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111,localhost:1112
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
jcs.auxiliary.LTCP.attributes.AllowGet=true
@@ -101,8 +101,8 @@
servers attribute.
</p>
<source><![CDATA[
-jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
+jcs.auxiliary.LTCP=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
+jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
#jcs.auxiliary.LTCP.attributes.TcpServers=
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1118
jcs.auxiliary.LTCP.attributes.UdpDiscoveryAddr=228.5.6.8
diff --git a/xdocs/LateralTCPProperties.xml b/xdocs/LateralTCPProperties.xml
index 7c265a0..7213aa8 100644
--- a/xdocs/LateralTCPProperties.xml
+++ b/xdocs/LateralTCPProperties.xml
@@ -133,8 +133,8 @@
</subsection>
<subsection name="Example Configuration">
<source><![CDATA[
-jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
+jcs.auxiliary.LTCP=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
+jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
#jcs.auxiliary.LTCP.attributes.TcpServers=
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1118
jcs.auxiliary.LTCP.attributes.UdpDiscoveryAddr=228.5.6.8
diff --git a/xdocs/LateralUDPDiscovery.xml b/xdocs/LateralUDPDiscovery.xml
index 4001f3e..4c6b6c7 100644
--- a/xdocs/LateralUDPDiscovery.xml
+++ b/xdocs/LateralUDPDiscovery.xml
@@ -59,8 +59,8 @@
is 4.
</p>
<source><![CDATA[
-jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
+jcs.auxiliary.LTCP=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
+jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
jcs.auxiliary.LTCP.attributes.PutOnlyMode=true
jcs.auxiliary.LTCP.attributes.UdpDiscoveryAddr=228.5.6.8
@@ -82,8 +82,8 @@
Search for the message "Using network interface" in your log file.
</p>
<source><![CDATA[
-jcs.auxiliary.LTCP=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
-jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
+jcs.auxiliary.LTCP=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPCacheFactory
+jcs.auxiliary.LTCP.attributes=org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
jcs.auxiliary.LTCP.attributes.PutOnlyMode=true
jcs.auxiliary.LTCP.attributes.UdpDiscoveryInterface=en0
diff --git a/xdocs/LocalCacheConfig.xml b/xdocs/LocalCacheConfig.xml
index 1988b6e..fd96d36 100644
--- a/xdocs/LocalCacheConfig.xml
+++ b/xdocs/LocalCacheConfig.xml
@@ -76,7 +76,7 @@
# sets the default aux value for any non configured caches
jcs.default=DC,RFailover
jcs.default.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
]]></source>
<p>
@@ -100,7 +100,7 @@
<source><![CDATA[
jcs.region.testCache=DC,RFailover
jcs.region.testCache.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.testCache.cacheattributes.MaxObjects=1000
]]></source>
<p>
@@ -135,9 +135,9 @@
</p>
<source><![CDATA[
jcs.auxiliary.DC=
- org.apache.commons.jcs.auxiliary.disk.DiskCacheFactory
+ org.apache.commons.jcs3.auxiliary.disk.DiskCacheFactory
jcs.auxiliary.DC.attributes=
- org.apache.commons.jcs.auxiliary.disk.DiskCacheAttributes
+ org.apache.commons.jcs3.auxiliary.disk.DiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=c:/dev/cache/raf
]]></source>
<p>
@@ -152,9 +152,9 @@
</p>
<source><![CDATA[
jcs.auxiliary.RFailover=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL
jcs.auxiliary.RFailover.attributes.FailoverServers=
localhost:1102,localhost:1101
diff --git a/xdocs/MySQLDiskCacheProperties.xml b/xdocs/MySQLDiskCacheProperties.xml
index 5815695..1bd8073 100644
--- a/xdocs/MySQLDiskCacheProperties.xml
+++ b/xdocs/MySQLDiskCacheProperties.xml
@@ -92,8 +92,8 @@
##############################################################
################## AUXILIARY CACHES AVAILABLE ################
# MYSQL disk cache
-jcs.auxiliary.MYSQL=org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
-jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
+jcs.auxiliary.MYSQL=org.apache.commons.jcs3.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
+jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
jcs.auxiliary.MYSQL.attributes.userName=sa
jcs.auxiliary.MYSQL.attributes.password=
jcs.auxiliary.MYSQL.attributes.url=jdbc:hsqldb:target/cache_hsql_db
@@ -160,8 +160,8 @@
##############################################################
################## AUXILIARY CACHES AVAILABLE ################
# MYSQL disk cache
-jcs.auxiliary.MYSQL=org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
-jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
+jcs.auxiliary.MYSQL=org.apache.commons.jcs3.auxiliary.disk.jdbc.mysql.MySQLDiskCacheFactory
+jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs3.auxiliary.disk.jdbc.mysql.MySQLDiskCacheAttributes
jcs.auxiliary.MYSQL.attributes.userName=sa
jcs.auxiliary.MYSQL.attributes.password=
jcs.auxiliary.MYSQL.attributes.url=jdbc:hsqldb:target/cache_hsql_db
diff --git a/xdocs/RegionProperties.xml b/xdocs/RegionProperties.xml
index f20c038..03c6f61 100644
--- a/xdocs/RegionProperties.xml
+++ b/xdocs/RegionProperties.xml
@@ -86,16 +86,16 @@
memory manager you would like to use. You
can create your own memory manager by
implementing the
- org.apache.commons.jcs.engine.memory.MemoryCache
+ org.apache.commons.jcs3.engine.memory.MemoryCache
interface. Alternatively, you can extend the
- org.apache.commons.jcs.engine.memory.AbstractMemoryCache
+ org.apache.commons.jcs3.engine.memory.AbstractMemoryCache
class. Several different memory caches are
available: two LRU implementations, an LFU,
and an adaptive replacement algorithm.
</td>
<td>N</td>
<td>
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
</td>
</tr>
<tr>
@@ -231,13 +231,13 @@
<source>
<![CDATA[
jcs.default=
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=200001
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=true
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=700
jcs.default.elementattributes.IsSpool=true
@@ -246,14 +246,14 @@
# optional region "testCache1" specific configuration settings
jcs.region.testCache1=
-jcs.region.testCache1.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.region.testCache1.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=123456
-jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=true
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=30
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=300
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=100
-jcs.region.testCache1.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.region.testCache1.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=false
jcs.region.testCache1.elementattributes.MaxLife=60000
jcs.region.testCache1.elementattributes.IsSpool=true
diff --git a/xdocs/RemoteAuxCache.xml b/xdocs/RemoteAuxCache.xml
index b63aadd..64b5848 100644
--- a/xdocs/RemoteAuxCache.xml
+++ b/xdocs/RemoteAuxCache.xml
@@ -150,9 +150,9 @@
<![CDATA[
# Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.FailoverServers=
localhost:1102,localhost:1103
jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true
@@ -168,10 +168,10 @@
#Regions preconfirgured for caching
jcs.region.testCache1=DC,RFailover
jcs.region.testCache1.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=1000
jcs.region.testCache1.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
]]>
</source>
</subsection>
@@ -249,13 +249,13 @@
# sets the default aux value for any non configured caches
jcs.default=DC,RCluster1
jcs.default.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.auxiliary.RCluster1=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RCluster1.attributes=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RCluster1.attributes.RemoteTypeName=CLUSTER
jcs.auxiliary.RCluster1.attributes.RemoveUponRemotePut=false
jcs.auxiliary.RCluster1.attributes.ClusterServers=localhost:1103
@@ -304,9 +304,9 @@
<![CDATA[
# Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.FailoverServers=
localhost:1102,localhost:1103
jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true
@@ -336,7 +336,7 @@
<servlet>
<servlet-name>JCSRemoteCacheStartupServlet</servlet-name>
<servlet-class>
- org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheStartupServlet
+ org.apache.commons.jcs3.auxiliary.remote.server.RemoteCacheStartupServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
diff --git a/xdocs/RemoteCacheProperties.xml b/xdocs/RemoteCacheProperties.xml
index ab96b16..0363b0f 100644
--- a/xdocs/RemoteCacheProperties.xml
+++ b/xdocs/RemoteCacheProperties.xml
@@ -150,8 +150,8 @@
<source>
<![CDATA[
# This remote client does not receive
-jcs.auxiliary.RC=org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
-jcs.auxiliary.RC.attributes=org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+jcs.auxiliary.RC=org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
+jcs.auxiliary.RC.attributes=org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RC.attributes.FailoverServers=localhost:1101,localhost:1102
jcs.auxiliary.RC.attributes.LocalPort=1201
jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
diff --git a/xdocs/RemoteHttpCacheProperties.xml b/xdocs/RemoteHttpCacheProperties.xml
index 21c0141..3dfb158 100644
--- a/xdocs/RemoteHttpCacheProperties.xml
+++ b/xdocs/RemoteHttpCacheProperties.xml
@@ -100,8 +100,8 @@
<source>
<![CDATA[
# This remote client does not receive
-jcs.auxiliary.RC=org.apache.commons.jcs.auxiliary.remote.http.client.RemoteCacheFactory
-jcs.auxiliary.RC.attributes=org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+jcs.auxiliary.RC=org.apache.commons.jcs3.auxiliary.remote.http.client.RemoteCacheFactory
+jcs.auxiliary.RC.attributes=org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RC.attributes.FailoverServers=localhost:1101,localhost:1102
jcs.auxiliary.RC.attributes.LocalPort=1201
jcs.auxiliary.RC.attributes.RemoveUponRemotePut=false
diff --git a/xdocs/UsingJCSBasicWeb.xml b/xdocs/UsingJCSBasicWeb.xml
index 7e139e3..08f11f3 100644
--- a/xdocs/UsingJCSBasicWeb.xml
+++ b/xdocs/UsingJCSBasicWeb.xml
@@ -111,7 +111,6 @@
<source><![CDATA[
package com.genericbookstore.data;
-import java.io.Serializable;
import java.util.Date;
public class BookVObj implements Serializable
@@ -141,9 +140,10 @@
<source><![CDATA[
package com.genericbookstore.data;
-import org.apache.commons.jcs.JCS;
+import org.apache.commons.jcs3.JCS;
+import org.apache.commons.jcs3.access.CacheAccess;
// in case we want to set some special behavior
-import org.apache.commons.jcs.engine.behavior.IElementAttributes;
+import org.apache.commons.jcs3.engine.behavior.IElementAttributes;
public class BookVObjManager
{
@@ -363,10 +363,10 @@
# sets the default aux value for any non configured caches
jcs.default=DC,RFailover
jcs.default.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=3600
jcs.default.elementattributes.IdleTime=1800
@@ -380,10 +380,10 @@
# Regions preconfigured for caching
jcs.region.bookCache=DC,RFailover
jcs.region.bookCache.cacheattributes=
- org.apache.commons.jcs.engine.CompositeCacheAttributes
+ org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.bookCache.cacheattributes.MaxObjects=1200
jcs.region.bookCache.cacheattributes.MemoryCacheName=
- org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+ org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.region.bookCache.elementattributes.IsEternal=false
jcs.region.bookCache.elementattributes.MaxLife=7200
jcs.region.bookCache.elementattributes.IdleTime=1800
@@ -395,9 +395,9 @@
# Primary Disk Cache -- faster than the rest because of memory key storage
jcs.auxiliary.DC=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=
- org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+ org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=/usr/opt/bookstore/raf
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=10000
@@ -405,9 +405,9 @@
# Remote RMI Cache set up to failover
jcs.auxiliary.RFailover=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheFactory
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.RFailover.attributes=
- org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes
+ org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL
jcs.auxiliary.RFailover.attributes.FailoverServers=scriptserver:1102
jcs.auxiliary.RFailover.attributes.GetOnly=false
diff --git a/xdocs/download_jcs.xml b/xdocs/download_jcs.xml
old mode 100755
new mode 100644
index ba217dd..894b23a
--- a/xdocs/download_jcs.xml
+++ b/xdocs/download_jcs.xml
@@ -1,142 +1,144 @@
-<?xml version="1.0"?>
-<!--
-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.
--->
-<!--
- +======================================================================+
- |**** ****|
- |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
- |**** DO NOT EDIT DIRECTLY ****|
- |**** ****|
- +======================================================================+
- | TEMPLATE FILE: download-page-template.xml |
- | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
- +======================================================================+
- | |
- | 1) Re-generate using: mvn commons:download-page |
- | |
- | 2) Set the following properties in the component's pom: |
- | - commons.componentid (required, alphabetic, lower case) |
- | - commons.release.version (required) |
- | - commons.release.name (required) |
- | - commons.binary.suffix (optional) |
- | (defaults to "-bin", set to "" for pre-maven2 releases) |
- | - commons.release.desc (optional) |
- | - commons.release.subdir (optional) |
- | |
- | - commons.release.2/3.version (conditional) |
- | - commons.release.2/3.name (conditional) |
- | - commons.release.2/3.binary.suffix (optional) |
- | - commons.release.2/3.desc (optional) |
- | - commons.release.2/3.subdir (optional) |
- | |
- | 3) Example Properties |
- | (commons.release.name inherited by parent: |
- | ${project.artifactId}-${commons.release.version} |
- | |
- | <properties> |
- | <commons.componentid>math</commons.componentid> |
- | <commons.release.version>1.2</commons.release.version> |
- | </properties> |
- | |
- +======================================================================+
--->
-<document>
- <properties>
- <title>Download Apache Commons JCS</title>
- <author email="dev@commons.apache.org">Apache Commons Documentation Team</author>
- </properties>
- <body>
- <section name="Download Apache Commons JCS">
- <subsection name="Using a Mirror">
- <p>
- We recommend you use a mirror to download our release
- builds, but you <strong>must</strong> <a href="http://www.apache.org/info/verification.html">verify the integrity</a> of
- the downloaded files using signatures downloaded from our main
- distribution directories. Recent releases (48 hours) may not yet
- be available from all the mirrors.
- </p>
-
- <p>
- You are currently using <b>[preferred]</b>. If you
- encounter a problem with this mirror, please select another
- mirror. If all mirrors are failing, there are <i>backup</i>
- mirrors (at the end of the mirrors list) that should be
- available.
- <br></br>
- [if-any logo]<a href="[link]"><img align="right" src="[logo]" border="0"></img></a>[end]
- </p>
-
- <form action="[location]" method="get" id="SelectMirror">
- <p>
- Other mirrors:
- <select name="Preferred">
- [if-any http]
- [for http]<option value="[http]">[http]</option>[end]
- [end]
- [if-any ftp]
- [for ftp]<option value="[ftp]">[ftp]</option>[end]
- [end]
- [if-any backup]
- [for backup]<option value="[backup]">[backup] (backup)</option>[end]
- [end]
- </select>
- <input type="submit" value="Change"></input>
- </p>
- </form>
-
- <p>
- It is essential that you
- <a href="https://www.apache.org/info/verification.html">verify the integrity</a>
- of downloaded files, preferably using the <code>PGP</code> signature (<code>*.asc</code> files);
- failing that using the <code>MD5</code> hash (<code>*.md5</code> checksum files).
- </p>
- <p>
- The <a href="https://www.apache.org/dist/commons/KEYS">KEYS</a>
- file contains the public PGP keys used by Apache Commons developers
- to sign releases.
- </p>
- </subsection>
- </section>
- <section name="Apache Commons JCS 2.1 (Java 6.0+)">
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: download-page-template.xml |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ | |
+ | 1) Re-generate using: mvn commons-build:download-page |
+ | |
+ | 2) Set the following properties in the component's pom: |
+ | - commons.componentid (required, alphabetic, lower case) |
+ | - commons.release.version (required) |
+ | - commons.release.name (required) |
+ | - commons.binary.suffix (optional) |
+ | (defaults to "-bin", set to "" for pre-maven2 releases) |
+ | - commons.release.desc (optional) |
+ | - commons.release.subdir (optional) |
+ | - commons.release.hash (optional, lowercase, default sha512) |
+ | |
+ | - commons.release.[234].version (conditional) |
+ | - commons.release.[234].name (conditional) |
+ | - commons.release.[234].binary.suffix (optional) |
+ | - commons.release.[234].desc (optional) |
+ | - commons.release.[234].subdir (optional) |
+ | - commons.release.[234].hash (optional, lowercase, [sha512])|
+ | |
+ | 3) Example Properties |
+ | (commons.release.name inherited by parent: |
+ | ${project.artifactId}-${commons.release.version} |
+ | |
+ | <properties> |
+ | <commons.componentid>math</commons.componentid> |
+ | <commons.release.version>1.2</commons.release.version> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Download Apache Commons JCS</title>
+ <author email="dev@commons.apache.org">Apache Commons Documentation Team</author>
+ </properties>
+ <body>
+ <section name="Download Apache Commons JCS">
+ <subsection name="Using a Mirror">
+ <p>
+ We recommend you use a mirror to download our release
+ builds, but you <strong>must</strong> <a href="https://www.apache.org/info/verification.html">verify the integrity</a> of
+ the downloaded files using signatures downloaded from our main
+ distribution directories. Recent releases (48 hours) may not yet
+ be available from all the mirrors.
+ </p>
+
+ <p>
+ You are currently using <b>[preferred]</b>. If you
+ encounter a problem with this mirror, please select another
+ mirror. If all mirrors are failing, there are <i>backup</i>
+ mirrors (at the end of the mirrors list) that should be
+ available.
+ <br></br>
+ [if-any logo]<a href="[link]"><img align="right" src="[logo]" border="0"></img></a>[end]
+ </p>
+
+ <form action="[location]" method="get" id="SelectMirror">
+ <p>
+ Other mirrors:
+ <select name="Preferred">
+ [if-any http]
+ [for http]<option value="[http]">[http]</option>[end]
+ [end]
+ [if-any ftp]
+ [for ftp]<option value="[ftp]">[ftp]</option>[end]
+ [end]
+ [if-any backup]
+ [for backup]<option value="[backup]">[backup] (backup)</option>[end]
+ [end]
+ </select>
+ <input type="submit" value="Change"></input>
+ </p>
+ </form>
+
+ <p>
+ It is essential that you
+ <a href="https://www.apache.org/info/verification.html">verify the integrity</a>
+ of downloaded files, preferably using the <code>PGP</code> signature (<code>*.asc</code> files);
+ failing that using the <code>SHA512</code> hash (<code>*.sha512</code> checksum files).
+ </p>
+ <p>
+ The <a href="https://www.apache.org/dist/commons/KEYS">KEYS</a>
+ file contains the public PGP keys used by Apache Commons developers
+ to sign releases.
+ </p>
+ </subsection>
+ </section>
+ <section name="Apache Commons JCS 3.0 (Java 8+)">
<subsection name="Binaries">
<table>
<tr>
- <td><a href="[preferred]/commons/jcs/binaries/commons-jcs-dist-2.1-bin.tar.gz">commons-jcs-dist-2.1-bin.tar.gz</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs-dist-2.1-bin.tar.gz.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs-dist-2.1-bin.tar.gz.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/jcs/binaries/commons-jcs3-dist-3.0-bin.tar.gz">commons-jcs3-dist-3.0-bin.tar.gz</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs3-dist-3.0-bin.tar.gz.sha512">sha512</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs3-dist-3.0-bin.tar.gz.asc">pgp</a></td>
</tr>
<tr>
- <td><a href="[preferred]/commons/jcs/binaries/commons-jcs-dist-2.1-bin.zip">commons-jcs-dist-2.1-bin.zip</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs-dist-2.1-bin.zip.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs-dist-2.1-bin.zip.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/jcs/binaries/commons-jcs3-dist-3.0-bin.zip">commons-jcs3-dist-3.0-bin.zip</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs3-dist-3.0-bin.zip.sha512">sha512</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/binaries/commons-jcs3-dist-3.0-bin.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
<subsection name="Source">
<table>
<tr>
- <td><a href="[preferred]/commons/jcs/source/commons-jcs-dist-2.1-src.tar.gz">commons-jcs-dist-2.1-src.tar.gz</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs-dist-2.1-src.tar.gz.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs-dist-2.1-src.tar.gz.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/jcs/source/commons-jcs3-dist-3.0-src.tar.gz">commons-jcs3-dist-3.0-src.tar.gz</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs3-dist-3.0-src.tar.gz.sha512">sha512</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs3-dist-3.0-src.tar.gz.asc">pgp</a></td>
</tr>
<tr>
- <td><a href="[preferred]/commons/jcs/source/commons-jcs-dist-2.1-src.zip">commons-jcs-dist-2.1-src.zip</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs-dist-2.1-src.zip.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs-dist-2.1-src.zip.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/jcs/source/commons-jcs3-dist-3.0-src.zip">commons-jcs3-dist-3.0-src.zip</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs3-dist-3.0-src.zip.sha512">sha512</a></td>
+ <td><a href="https://www.apache.org/dist/commons/jcs/source/commons-jcs3-dist-3.0-src.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
diff --git a/xdocs/faq.fml b/xdocs/faq.fml
index 64e4851..308bd17 100644
--- a/xdocs/faq.fml
+++ b/xdocs/faq.fml
@@ -43,8 +43,9 @@
<answer>
<p>
By default JCS looks for a cache.ccf file in the
- classpath. The documentation describes
- how to configure the cache.
+ classpath. The
+ <a href="LocalCacheConfig.html">documentation</a>
+ describes how to configure the cache.
</p>
</answer>
</faq>
@@ -84,6 +85,20 @@
</p>
</answer>
</faq>
+
+ <faq id="shutdown">
+ <question>
+ How do I shut down JCS properly?
+ </question>
+ <answer>
+ <p>
+ As of version 3.0, you can simply call
+ </p>
+ <code>
+ JCS.shutdown();
+ </code>
+ </answer>
+ </faq>
</part>
<part id="general-questions">
@@ -111,7 +126,7 @@
<p>
You can download the admin jsp
<a
- href="http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/admin/JCSAdmin.jsp?view=log">
+ href="https://raw.githubusercontent.com/apache/commons-jcs/master/commons-jcs-core/src/main/java/org/apache/commons/jcs3/admin/JCSAdmin.jsp">
here
</a>
.
@@ -123,15 +138,8 @@
<question>Where can I get the source?</question>
<answer>
<p>
- You can view the source
- <a
- href="http://svn.apache.org/viewcvs.cgi/commons/proper/jcs/trunk/">
- here
- </a>
- or get the source code from subversion with <code>svn co
- http://svn.apache.org/repos/asf/commons/proper/jcs/trunk</code>.
- The tagged releases are available with <code>svn co.</code> ex.
- https://svn.apache.org/repos/asf/commons/proper/jcs/tags/commons-jcs-2.0
+ See the information about the
+ <a href="scm.html">Source Repository</a>
</p>
</answer>
</faq>
@@ -140,12 +148,10 @@
<answer>
<p>
You first need to install
- <a href="http://maven.apache.org/">Maven 2</a>
- The download is available at
- http://maven.apache.org/download.html.
+ <a href="http://maven.apache.org/">Maven</a>
After installing run
"mvn test" which compiles and tests the entire package.
- To build a jar run "mvn install".
+ To build a jar run "mvn package".
</p>
</answer>
</faq>
diff --git a/xdocs/getting_started/intro.xml b/xdocs/getting_started/intro.xml
index c13fa4b..e0898d6 100644
--- a/xdocs/getting_started/intro.xml
+++ b/xdocs/getting_started/intro.xml
@@ -151,13 +151,13 @@
<![CDATA[
# DEFAULT CACHE REGION
jcs.default=DC
-jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
-jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.default.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
-jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.default.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=21600
jcs.default.elementattributes.IdleTime=1800
@@ -167,19 +167,19 @@
# PRE-DEFINED CACHE REGIONS
jcs.region.testCache1=DC
-jcs.region.testCache1.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+jcs.region.testCache1.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
jcs.region.testCache1.cacheattributes.MaxObjects=1000
-jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
+jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.commons.jcs3.engine.memory.lru.LRUMemoryCache
jcs.region.testCache1.cacheattributes.UseMemoryShrinker=false
jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
-jcs.region.testCache1.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
+jcs.region.testCache1.elementattributes=org.apache.commons.jcs3.engine.ElementAttributes
jcs.region.testCache1.elementattributes.IsEternal=false
# AVAILABLE AUXILIARY CACHES
-jcs.auxiliary.DC=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
-jcs.auxiliary.DC.attributes=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
+jcs.auxiliary.DC=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheFactory
+jcs.auxiliary.DC.attributes=org.apache.commons.jcs3.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=${user.dir}/jcs_swap
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000
jcs.auxiliary.DC.attributes.MaxKeySize=1000000
@@ -214,9 +214,9 @@
<source>
<![CDATA[
import java.io.Serializable;
-import org.apache.commons.jcs.JCS;
-import org.apache.commons.jcs.access.CacheAccess;
-import org.apache.commons.jcs.access.exception.CacheException;
+import org.apache.commons.jcs3.JCS;
+import org.apache.commons.jcs3.access.CacheAccess;
+import org.apache.commons.jcs3.access.exception.CacheException;
public class JcsExample
{
diff --git a/xdocs/issue-tracking.xml b/xdocs/issue-tracking.xml
new file mode 100644
index 0000000..26abe58
--- /dev/null
+++ b/xdocs/issue-tracking.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: issue-tracking-template.xml |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ | |
+ | 1) Re-generate using: mvn commons-build:jira-page |
+ | |
+ | 2) Set the following properties in the component's pom: |
+ | - commons.jira.id (required, alphabetic, upper case) |
+ | - commons.jira.pid (required, numeric) |
+ | |
+ | 3) Example Properties |
+ | |
+ | <properties> |
+ | <commons.jira.id>MATH</commons.jira.id> |
+ | <commons.jira.pid>12310485</commons.jira.pid> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Apache Commons JCS Issue tracking</title>
+ <author email="dev@commons.apache.org">Apache Commons Documentation Team</author>
+ </properties>
+ <body>
+
+ <section name="Apache Commons JCS Issue tracking">
+ <p>
+ Apache Commons JCS uses <a href="https://issues.apache.org/jira/">ASF JIRA</a> for tracking issues.
+ See the <a href="https://issues.apache.org/jira/browse/JCS">Apache Commons JCS JIRA project page</a>.
+ </p>
+
+ <p>
+ To use JIRA you may need to <a href="https://issues.apache.org/jira/secure/Signup!default.jspa">create an account</a>
+ (if you have previously created/updated Commons issues using Bugzilla an account will have been automatically
+ created and you can use the <a href="https://issues.apache.org/jira/secure/ForgotPassword!default.jspa">Forgot Password</a>
+ page to get a new password).
+ </p>
+
+ <p>
+ If you would like to report a bug, or raise an enhancement request with
+ Apache Commons JCS please do the following:
+ <ol>
+ <li><a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=${commons.jira.pid}&sorter/field=issuekey&sorter/order=DESC&status=1&status=3&status=4">Search existing open bugs</a>.
+ If you find your issue listed then please add a comment with your details.</li>
+ <li><a href="mail-lists.html">Search the mailing list archive(s)</a>.
+ You may find your issue or idea has already been discussed.</li>
+ <li>Decide if your issue is a bug or an enhancement.</li>
+ <li>Submit either a <a href="https://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=${commons.jira.pid}&issuetype=1&priority=4&assignee=-1">bug report</a>
+ or <a href="https://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=${commons.jira.pid}&issuetype=4&priority=4&assignee=-1">enhancement request</a>.</li>
+ </ol>
+ </p>
+
+ <p>
+ Please also remember these points:
+ <ul>
+ <li>the more information you provide, the better we can help you</li>
+ <li>test cases are vital, particularly for any proposed enhancements</li>
+ <li>the developers of Apache Commons JCS are all unpaid volunteers</li>
+ </ul>
+ </p>
+
+ <p>
+ For more information on subversion and creating patches see the
+ <a href="https://www.apache.org/dev/contributors.html">Apache Contributors Guide</a>.
+ </p>
+
+ <p>
+ You may also find these links useful:
+ <ul>
+ <li><a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=${commons.jira.pid}&sorter/field=issuekey&sorter/order=DESC&status=1&status=3&status=4">All Open Apache Commons JCS bugs</a></li>
+ <li><a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=${commons.jira.pid}&sorter/field=issuekey&sorter/order=DESC&status=5&status=6">All Resolved Apache Commons JCS bugs</a></li>
+ <li><a href="https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=${commons.jira.pid}&sorter/field=issuekey&sorter/order=DESC">All Apache Commons JCS bugs</a></li>
+ </ul>
+ </p>
+ </section>
+ </body>
+</document>
diff --git a/xdocs/mail-lists.xml b/xdocs/mail-lists.xml
new file mode 100644
index 0000000..f19151a
--- /dev/null
+++ b/xdocs/mail-lists.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: mail-lists-template.xml |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ | |
+ | 1) Re-generate using: mvn commons-build:mail-page |
+ | |
+ | 2) Set the following properties in the component's pom: |
+ | - commons.componentid (required, alphabetic, lower case) |
+ | |
+ | 3) Example Properties |
+ | |
+ | <properties> |
+ | <commons.componentid>math</commons.componentid> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Apache Commons JCS Mailing Lists</title>
+ <author email="dev@commons.apache.org">Apache Commons Documentation Team</author>
+ </properties>
+ <body>
+
+ <section name="Overview">
+ <p>
+ <a href="index.html">Apache Commons JCS</a> shares mailing lists with all the other
+ <a href="https://commons.apache.org/components.html">Commons Components</a>.
+ To make it easier for people to only read messages related to components they are interested in,
+ the convention in Commons is to prefix the subject line of messages with the component's name,
+ for example:
+ <ul>
+ <li>[jcs] Problem with the ...</li>
+ </ul>
+ </p>
+ <p>
+ Questions related to the usage of Apache Commons JCS should be posted to the
+ <a href="https://mail-archives.apache.org/mod_mbox/commons-user/">User List</a>.
+ <br />
+ The <a href="https://mail-archives.apache.org/mod_mbox/commons-dev/">Developer List</a>
+ is for questions and discussion related to the development of Apache Commons JCS.
+ <br />
+ Please do not cross-post; developers are also subscribed to the user list.
+ <br />
+ You must be subscribed to post to the mailing lists. Follow the Subscribe links below
+ to subscribe.
+ </p>
+ <p>
+ <strong>Note:</strong> please don't send patches or attachments to any of the mailing lists.
+ Patches are best handled via the <a href="issue-tracking.html">Issue Tracking</a> system.
+ Otherwise, please upload the file to a public server and include the URL in the mail.
+ </p>
+ </section>
+
+ <section name="Apache Commons JCS Mailing Lists">
+ <p>
+ <strong>Please prefix the subject line of any messages for <a href="index.html">Apache Commons JCS</a>
+ with <i>[jcs]</i></strong> - <i>thanks!</i>
+ <br />
+ <br />
+ </p>
+
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Subscribe</th>
+ <th>Unsubscribe</th>
+ <th>Post</th>
+ <th>Archive</th>
+ <th>Other Archives</th>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons User List</strong>
+ <br /><br />
+ Questions on using Apache Commons JCS.
+ <br /><br />
+ </td>
+ <td><a href="mailto:user-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:user-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><a href="mailto:user@commons.apache.org?subject=[jcs]">Post</a></td>
+ <td><a href="https://mail-archives.apache.org/mod_mbox/commons-user/">mail-archives.apache.org</a></td>
+ <td><a href="https://markmail.org/list/org.apache.commons.users/">markmail.org</a><br />
+ <a href="https://www.mail-archive.com/user@commons.apache.org/">www.mail-archive.com</a><br />
+ <a href="https://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons Developer List</strong>
+ <br /><br />
+ Discussion of development of Apache Commons JCS.
+ <br /><br />
+ </td>
+ <td><a href="mailto:dev-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:dev-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><a href="mailto:dev@commons.apache.org?subject=[jcs]">Post</a></td>
+ <td><a href="https://mail-archives.apache.org/mod_mbox/commons-dev/">mail-archives.apache.org</a></td>
+ <td><a href="https://markmail.org/list/org.apache.commons.dev/">markmail.org</a><br />
+ <a href="https://www.mail-archive.com/dev@commons.apache.org/">www.mail-archive.com</a><br />
+ <a href="https://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons Issues List</strong>
+ <br /><br />
+ Only for e-mails automatically generated by the <a href="issue-tracking.html">issue tracking</a> system.
+ <br /><br />
+ </td>
+ <td><a href="mailto:issues-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:issues-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><i>read only</i></td>
+ <td><a href="https://mail-archives.apache.org/mod_mbox/commons-issues/">mail-archives.apache.org</a></td>
+ <td><a href="https://markmail.org/list/org.apache.commons.issues/">markmail.org</a><br />
+ <a href="https://www.mail-archive.com/issues@commons.apache.org/">www.mail-archive.com</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons Commits List</strong>
+ <br /><br />
+ Only for e-mails automatically generated by the <a href="scm.html">source control</a> sytem.
+ <br /><br />
+ </td>
+ <td><a href="mailto:commits-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:commits-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><i>read only</i></td>
+ <td><a href="https://mail-archives.apache.org/mod_mbox/commons-commits/">mail-archives.apache.org</a></td>
+ <td><a href="https://markmail.org/list/org.apache.commons.commits/">markmail.org</a><br />
+ <a href="https://www.mail-archive.com/commits@commons.apache.org/">www.mail-archive.com</a>
+ </td>
+ </tr>
+
+ </table>
+
+ </section>
+ <section name="Apache Mailing Lists">
+ <p>
+ Other mailing lists which you may find useful include:
+ </p>
+
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Subscribe</th>
+ <th>Unsubscribe</th>
+ <th>Post</th>
+ <th>Archive</th>
+ <th>Other Archives</th>
+ </tr>
+ <tr>
+ <td>
+ <strong>Apache Announce List</strong>
+ <br /><br />
+ General announcements of Apache project releases.
+ <br /><br />
+ </td>
+ <td><a class="externalLink" href="mailto:announce-subscribe@apache.org">Subscribe</a></td>
+ <td><a class="externalLink" href="mailto:announce-unsubscribe@apache.org">Unsubscribe</a></td>
+ <td><i>read only</i></td>
+ <td><a class="externalLink" href="https://mail-archives.apache.org/mod_mbox/www-announce/">mail-archives.apache.org</a></td>
+ <td><a class="externalLink" href="https://markmail.org/list/org.apache.announce/">markmail.org</a><br />
+ <a class="externalLink" href="https://old.nabble.com/Apache-News-and-Announce-f109.html">old.nabble.com</a><br />
+ <a class="externalLink" href="https://www.mail-archive.com/announce@apache.org/">www.mail-archive.com</a><br />
+ <a class="externalLink" href="https://news.gmane.org/gmane.comp.apache.announce">news.gmane.org</a>
+ </td>
+ </tr>
+ </table>
+
+ </section>
+ </body>
+</document>