This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 65ab398f567254b52cbb2f6739ab9857676b91d5
Author: David Smiley <[email protected]>
AuthorDate: Tue Apr 15 00:09:56 2025 -0400

    Deprecation: DocCollection.getNumNrtReplicas etc.
    
    Why: needless convenience methods, and the Object return type is unfortunate
    note: getNumReplicas returns 'int' now; won't take to 9x
---
 solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java 
b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
index 6000f308373..4b03e96b50e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
@@ -548,6 +548,7 @@ public class DocCollection extends ZkNodeProps implements 
Iterable<Slice> {
    * @return the number of replicas of type {@link 
org.apache.solr.common.cloud.Replica.Type#NRT}
    *     this collection was created with
    */
+  @Deprecated
   public Integer getNumNrtReplicas() {
     return getNumReplicas(Replica.Type.NRT);
   }
@@ -556,6 +557,7 @@ public class DocCollection extends ZkNodeProps implements 
Iterable<Slice> {
    * @return the number of replicas of type {@link 
org.apache.solr.common.cloud.Replica.Type#TLOG}
    *     this collection was created with
    */
+  @Deprecated
   public Integer getNumTlogReplicas() {
     return getNumReplicas(Replica.Type.TLOG);
   }
@@ -564,6 +566,7 @@ public class DocCollection extends ZkNodeProps implements 
Iterable<Slice> {
    * @return the number of replicas of type {@link 
org.apache.solr.common.cloud.Replica.Type#PULL}
    *     this collection was created with
    */
+  @Deprecated
   public Integer getNumPullReplicas() {
     return getNumReplicas(Replica.Type.PULL);
   }
@@ -571,7 +574,7 @@ public class DocCollection extends ZkNodeProps implements 
Iterable<Slice> {
   /**
    * @return the number of replicas of a given type this collection was 
created with
    */
-  public Integer getNumReplicas(Replica.Type type) {
+  public int getNumReplicas(Replica.Type type) {
     return numReplicas.get(type);
   }
 

Reply via email to