Package org.apache.solr.common.cloud

# Class ReplicaPosition

java.lang.Object
org.apache.solr.common.cloud.ReplicaPosition

All Implemented Interfaces:
  `Comparable<ReplicaPosition>`

public class ReplicaPosition extends Object implements Comparable<ReplicaPosition>

## Field Summary

Fields
Modifier and Type
Field
Description
`final String`
`collection`
`final int`
`index`
`String`
`node`
`final String`
`shard`
`final Replica.Type`
`type`

## Constructor Summary

Constructors
Constructor
Description
`ReplicaPosition(String collection, String shard, int replicaIdx, Replica.Type type)`
`ReplicaPosition(String collection, String shard, int replicaIdx, Replica.Type type, String node)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(ReplicaPosition that)`
`ReplicaPosition`
`setNode(String node)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### collection

public final String collection

### shard

public final String shard

### index

public final int index

### type

public final Replica.Type type

### node

public String node

## Constructor Details

### ReplicaPosition

public ReplicaPosition(String collection, String shard, int replicaIdx, Replica.Type type)

### ReplicaPosition

public ReplicaPosition(String collection, String shard, int replicaIdx, Replica.Type type, String node)

## Method Details

### compareTo

public int compareTo(ReplicaPosition that)

Specified by:
  `compareTo` in interface `Comparable<ReplicaPosition>`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### setNode

public ReplicaPosition setNode(String node)