hunk.code_window:     RAY_CHECK(placement_group_schedule_table_ != nullptr);
       return *placement_group_schedule_table_;
     }
     GcsHeartbeatTable &HeartbeatTable() {
       RAY_CHECK(heartbeat_table_ != nullptr);
       return *heartbeat_table_;
     }
     GcsResourceUsageBatchTable &HeartbeatBatchTable() {
       RAY_CHECK(resource_usage_batch_table_ != nullptr);
       return *resource_usage_batch_table_;
     }
  
hunk.labels: keep keep keep keep replace replace replace replace replace keep keep keep keep keep
hunk.file_path: src/ray/gcs/gcs_server/gcs_table_storage.h
hunk.type: replace
file: package io.ray.serve;
  
  import com.google.common.base.Preconditions;
  import java.io.Serializable;
  import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
  
  /** Configuration options for a backend, to be set by the user. */
  public class BackendConfig implements Serializable {
  
    private static final long serialVersionUID = 244486384449779141L;
  
    /**
     * The number of processes to start up that will handle requests to this backend. Defaults to 1.
     */
    private int numReplicas = 1;
  
    /**
     * The maximum number of queries that will be sent to a replica of this backend without receiving
     * a response. Defaults to 100.
     */
    private int maxConcurrentQueries = 100;
  
    /**
     * Arguments to pass to the reconfigure method of the backend. The reconfigure method is called if
     * user_config is not None.
     */
    private Object userConfig;
  
    /**
     * Duration that backend workers will wait until there is no more work to be done before shutting
     * down. Defaults to 2s.
     */
    private long experimentalGracefulShutdownWaitLoopS = 2;
  
    /**
     * Controller waits for this duration to forcefully kill the replica for shutdown. Defaults to
     * 20s.
     */
    private long experimentalGracefulShutdownTimeoutS = 20;
  
    @Override
    public String toString() {
      return ReflectionToStringBuilder.toString(this);
    }
  
    public int getNumReplicas() {
      return numReplicas;
    }
  
    public void setNumReplicas(int numReplicas) {
      this.numReplicas = numReplicas;
    }
  
    public int getMaxConcurrentQueries() {
      return maxConcurrentQueries;
    }
  
    public void setMaxConcurrentQueries(int maxConcurrentQueries) {
      Preconditions.checkArgument(maxConcurrentQueries > 0, "max_concurrent_queries must be > 0");
      this.maxConcurrentQueries = maxConcurrentQueries;
    }
  
    public Object getUserConfig() {
      return userConfig;
    }
  
    public void setUserConfig(Object userConfig) {
      this.userConfig = userConfig;
    }
  
    public long getExperimentalGracefulShutdownWaitLoopS() {
      return experimentalGracefulShutdownWaitLoopS;
    }
  
    public void setExperimentalGracefulShutdownWaitLoopS(long experimentalGracefulShutdownWaitLoopS) {
      this.experimentalGracefulShutdownWaitLoopS = experimentalGracefulShutdownWaitLoopS;
    }
  
    public long getExperimentalGracefulShutdownTimeoutS() {
      return experimentalGracefulShutdownTimeoutS;
    }
  
    public void setExperimentalGracefulShutdownTimeoutS(long experimentalGracefulShutdownTimeoutS) {
      this.experimentalGracefulShutdownTimeoutS = experimentalGracefulShutdownTimeoutS;
    }
  }
  