Skip to content

Commit 65ab398

Browse files
committed
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
1 parent 50655d0 commit 65ab398

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ public int hashCode() {
548548
* @return the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#NRT}
549549
* this collection was created with
550550
*/
551+
@Deprecated
551552
public Integer getNumNrtReplicas() {
552553
return getNumReplicas(Replica.Type.NRT);
553554
}
@@ -556,6 +557,7 @@ public Integer getNumNrtReplicas() {
556557
* @return the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#TLOG}
557558
* this collection was created with
558559
*/
560+
@Deprecated
559561
public Integer getNumTlogReplicas() {
560562
return getNumReplicas(Replica.Type.TLOG);
561563
}
@@ -564,14 +566,15 @@ public Integer getNumTlogReplicas() {
564566
* @return the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#PULL}
565567
* this collection was created with
566568
*/
569+
@Deprecated
567570
public Integer getNumPullReplicas() {
568571
return getNumReplicas(Replica.Type.PULL);
569572
}
570573

571574
/**
572575
* @return the number of replicas of a given type this collection was created with
573576
*/
574-
public Integer getNumReplicas(Replica.Type type) {
577+
public int getNumReplicas(Replica.Type type) {
575578
return numReplicas.get(type);
576579
}
577580

0 commit comments

Comments
 (0)