Sets the replica members for the {@code partitionId}.
10449
void updateReplicas(int partitionId, PartitionReplica[] replicas) {
        InternalPartitionImpl partition = partitions[partitionId];
        partition.setReplicas(replicas);
    }
696787
public synchronized long[] updateReplicas(List<Long> replicas, Map<Integer, Long> partitionMasters) {
        return updateReplicasInternal(replicas, partitionMasters, null);
    }
617762
public void populate() throws Exception {
        for (int i = 0, cnt = _partition.getIdCount(); i < cnt; i++) {
            int memberId = _partition.getIdStart() + i;
            _partition.set(memberId, createDataForMember(memberId), System.nanoTime());
        }
        _partition.sync();
    }
693761
@NonNull
    public ReplicatorConfiguration setReplicatorType(@NonNull ReplicatorType replicatorType) {
        if (replicatorType == null) { throw new IllegalArgumentException("replicatorType cannot be null."); }
        if (readonly) { throw new IllegalStateException("ReplicatorConfiguration is readonly mode."); }
        this.replicatorType = replicatorType;
        return getReplicatorConfiguration();
    }
1324678
public void addPartition(RedisClusterNode partition) {

        LettuceAssert.notNull(partition, "Partition must not be null");

        synchronized (partitions) {
            slotCache = EMPTY;
            partitions.add(partition);
        }
    }
60835
public int getNodeIdForZoneNary(int zoneId, int zoneNary, int partitionId) {
        List<Integer> replicatingNodeIds = getReplicationNodeList(partitionId);

        int zoneNAry = -1;
        for(int replicatingNodeId: replicatingNodeIds) {
            Node replicatingNode = cluster.getNodeById(replicatingNodeId);
            // bump up the counter if we encounter a replica in the given zone
            if(replicatingNode.getZoneId() == zoneId) {
                zoneNAry++;
            }
            // when the counter matches up with the replicaNumber we need, we
            // are done.
            if(zoneNAry == zoneNary) {
                return replicatingNode.getId();
            }
        }
        if(zoneNAry == 0) {
            throw new VoldemortException("Could not find any replicas for the partition "
                                         + partitionId + " in given zone " + zoneId);
        } else {
            throw new VoldemortException("Could not find " + zoneNary
                                         + " replicas for the partition " + partitionId
                                         + " in given zone " + zoneId + ". Only found " + zoneNAry);
        }
    }
862561
public void setPartitionInputList(java.util.Collection<PartitionInput> partitionInputList) {
        if (partitionInputList == null) {
            this.partitionInputList = null;
            return;
        }

        this.partitionInputList = new java.util.ArrayList<PartitionInput>(partitionInputList);
    }
279992
public void setPartitionValueList(java.util.Collection<String> partitionValueList) {
        if (partitionValueList == null) {
            this.partitionValueList = null;
            return;
        }

        this.partitionValueList = new java.util.ArrayList<String>(partitionValueList);
    }
797866
public void setErrors(java.util.Collection<PartitionError> errors) {
        if (errors == null) {
            this.errors = null;
            return;
        }

        this.errors = new java.util.ArrayList<PartitionError>(errors);
    }
942408
public void reloadPartitions() {

        if (partitions == null) {
            initializePartitions();
            partitions.updateCache();
        } else {

            Partitions loadedPartitions = loadPartitions();
            if (TopologyComparators.isChanged(getPartitions(), loadedPartitions)) {

                logger.debug("Using a new cluster topology");

                List<RedisClusterNode> before = new ArrayList<RedisClusterNode>(getPartitions());
                List<RedisClusterNode> after = new ArrayList<RedisClusterNode>(loadedPartitions);

                getResources().eventBus().publish(new ClusterTopologyChangedEvent(before, after));
            }

            this.partitions.reload(loadedPartitions.getPartitions());
        }

        updatePartitionsInConnections();
    }
784729
private <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, Keys<T> keys) {
		KeySelector<T, K> keySelector = KeySelectorUtil.getSelectorForOneKey(keys, partitioner, getType(), getExecutionConfig());

		return setConnectionType(
				new CustomPartitionerWrapper<>(
						clean(partitioner),
						clean(keySelector)));
	}
917631
def replicated_partitions
      result, mutex = [], Mutex.new
      threads = cluster.partitions.map do |partition|
        Thread.new do
          Thread.abort_on_exception = true
          select = partition.replicas.include?(self)
          mutex.synchronize { result << partition } if select
        end
      end
      threads.each(&:join)
      result
    end
268869
public void setPartitionsToGet(java.util.Collection<PartitionValueList> partitionsToGet) {
        if (partitionsToGet == null) {
            this.partitionsToGet = null;
            return;
        }

        this.partitionsToGet = new java.util.ArrayList<PartitionValueList>(partitionsToGet);
    }
152137
public void setPartitionValues(java.util.Collection<String> partitionValues) {
        if (partitionValues == null) {
            this.partitionValues = null;
            return;
        }

        this.partitionValues = new java.util.ArrayList<String>(partitionValues);
    }
588496
public void setReplicaGlobalSecondaryIndexSettings(java.util.Collection<ReplicaGlobalSecondaryIndexSettingsDescription> replicaGlobalSecondaryIndexSettings) {
        if (replicaGlobalSecondaryIndexSettings == null) {
            this.replicaGlobalSecondaryIndexSettings = null;
            return;
        }

        this.replicaGlobalSecondaryIndexSettings = new java.util.ArrayList<ReplicaGlobalSecondaryIndexSettingsDescription>(replicaGlobalSecondaryIndexSettings);
    }
351254
public PartitionInput withParameters(java.util.Map<String, String> parameters) {
        setParameters(parameters);
        return this;
    }
1241842
public void setReplicaSettings(java.util.Collection<ReplicaSettingsDescription> replicaSettings) {
        if (replicaSettings == null) {
            this.replicaSettings = null;
            return;
        }

        this.replicaSettings = new java.util.ArrayList<ReplicaSettingsDescription>(replicaSettings);
    }