|
@@ -23,6 +23,7 @@ import io.milvus.exception.ParamException;
|
|
|
import io.milvus.param.Constant;
|
|
|
import io.milvus.param.ParamUtils;
|
|
|
|
|
|
+import io.milvus.param.collection.LoadCollectionParam;
|
|
|
import lombok.Getter;
|
|
|
import lombok.NonNull;
|
|
|
import java.util.ArrayList;
|
|
@@ -38,6 +39,7 @@ public class LoadPartitionsParam {
|
|
|
private final boolean syncLoad;
|
|
|
private final long syncLoadWaitingInterval;
|
|
|
private final long syncLoadWaitingTimeout;
|
|
|
+ private final int replicaNumber;
|
|
|
|
|
|
private LoadPartitionsParam(@NonNull Builder builder) {
|
|
|
this.collectionName = builder.collectionName;
|
|
@@ -45,6 +47,7 @@ public class LoadPartitionsParam {
|
|
|
this.syncLoad = builder.syncLoad;
|
|
|
this.syncLoadWaitingInterval = builder.syncLoadWaitingInterval;
|
|
|
this.syncLoadWaitingTimeout = builder.syncLoadWaitingTimeout;
|
|
|
+ this.replicaNumber = builder.replicaNumber;
|
|
|
}
|
|
|
|
|
|
public static Builder newBuilder() {
|
|
@@ -72,6 +75,10 @@ public class LoadPartitionsParam {
|
|
|
// this value control the waiting timeout. Unit: second. Default value: 60 seconds.
|
|
|
private Long syncLoadWaitingTimeout = 60L;
|
|
|
|
|
|
+ // replicaNumber:
|
|
|
+ // The replica number to load, default by 1
|
|
|
+ private Integer replicaNumber = 1;
|
|
|
+
|
|
|
private Builder() {
|
|
|
}
|
|
|
|
|
@@ -150,6 +157,17 @@ public class LoadPartitionsParam {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Specify replica number to load
|
|
|
+ *
|
|
|
+ * @param replicaNumber replica number
|
|
|
+ * @return <code>Builder</code>
|
|
|
+ */
|
|
|
+ public Builder withReplicaNumber(@NonNull Integer replicaNumber) {
|
|
|
+ this.replicaNumber = replicaNumber;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Verifies parameters and creates a new {@link LoadPartitionsParam} instance.
|
|
|
*
|