diff --git a/src/java/org/apache/solr/util/RefCounted.java b/src/java/org/apache/solr/util/RefCounted.java index c9686c85523..508fb01df90 100644 --- a/src/java/org/apache/solr/util/RefCounted.java +++ b/src/java/org/apache/solr/util/RefCounted.java @@ -39,6 +39,10 @@ public abstract class RefCounted { this.resource = resource; } + public int getRefcount() { + return refcount.get(); + } + public final RefCounted incref() { refcount.incrementAndGet(); return this;