You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rj...@apache.org on 2014/12/31 06:55:16 UTC
svn commit: r1648657 - in /lucene/dev/trunk/lucene: CHANGES.txt
core/src/java/org/apache/lucene/util/Accountables.java
Author: rjernst
Date: Wed Dec 31 05:55:15 2014
New Revision: 1648657
URL: http://svn.apache.org/r1648657
Log:
LUCENE-6147: Make the core Accountables.namedAccountable function public
Modified:
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/Accountables.java
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1648657&r1=1648656&r2=1648657&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Wed Dec 31 05:55:15 2014
@@ -323,6 +323,9 @@ API Changes
incrementToken(). You must call reset() now on this filter instead of doing it a-priori on the
input(), which previously didn't work. (David Smiley, Robert Muir)
+* LUCENE-6147: Make the core Accountables.namedAccountable function public
+ (Ryan Ernst)
+
Bug Fixes
* LUCENE-5650: Enforce read-only access to any path outside the temporary
Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/Accountables.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/Accountables.java?rev=1648657&r1=1648656&r2=1648657&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/Accountables.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/Accountables.java Wed Dec 31 05:55:15 2014
@@ -112,15 +112,17 @@ public class Accountables {
}
/**
- * Returns an accountable with the provided description, bytes, and children.
+ * Returns an accountable with the provided description, children and bytes.
* <p>
* The resource descriptions are constructed in this format:
* {@code description [toString()]}
* <p>
* This is a point-in-time type safe view: consumers
- * will not be able to cast or manipulate the resources in any way..
+ * will not be able to cast or manipulate the resources in any way, provided
+ * that the passed in children Accountables (and all their descendants) were created
+ * with one of the namedAccountable functions.
*/
- private static Accountable namedAccountable(final String description, final Iterable<Accountable> children, final long bytes) {
+ public static Accountable namedAccountable(final String description, final Iterable<Accountable> children, final long bytes) {
return new Accountable() {
@Override
public long ramBytesUsed() {