org.apache.solr.cloud

## Class SolrCloudTestCase.Builder

- java.lang.Object
- - org.apache.solr.cloud.SolrCloudTestCase.Builder

- Enclosing class:
    SolrCloudTestCase

      protected static class SolrCloudTestCase.Builder
      extends Object

  Builder class for a MiniSolrCloudCluster

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder(int nodeCount, Path baseDir)` Create a builder

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SolrCloudTestCase.Builder` | `addConfig(String configName, Path configPath)` Upload a collection config before tests start
    `void` | `configure()` Configure and run the `MiniSolrCloudCluster`
    `SolrCloudTestCase.Builder` | `withJettyConfig(org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)` Use a `JettyConfig` to configure the cluster's jetty servers
    `SolrCloudTestCase.Builder` | `withProperty(String propertyName, String propertyValue)` Set a cluster property
    `SolrCloudTestCase.Builder` | `withSolrXml(Path solrXml)` Read solr.xml from the provided path
    `SolrCloudTestCase.Builder` | `withSolrXml(String solrXml)` Use the provided string as solr.xml content

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder(int nodeCount,
                         Path baseDir)

      Create a builder
      Parameters:
        `nodeCount` - the number of nodes in the cluster
        `baseDir` - a base directory for the cluster

  - ### Method Detail

    - #### withJettyConfig

          public SolrCloudTestCase.Builder withJettyConfig(org.apache.solr.client.solrj.embedded.JettyConfig jettyConfig)

      Use a `JettyConfig` to configure the cluster's jetty servers

    - #### withSolrXml

          public SolrCloudTestCase.Builder withSolrXml(String solrXml)

      Use the provided string as solr.xml content

    - #### withSolrXml

          public SolrCloudTestCase.Builder withSolrXml(Path solrXml)

      Read solr.xml from the provided path

    - #### addConfig

          public SolrCloudTestCase.Builder addConfig(String configName,
                                                     Path configPath)

      Upload a collection config before tests start
      Parameters:
        `configName` - the config name
        `configPath` - the path to the config files

    - #### withProperty

          public SolrCloudTestCase.Builder withProperty(String propertyName,
                                                        String propertyValue)

      Set a cluster property
      Parameters:
        `propertyName` - the property name
        `propertyValue` - the property value

    - #### configure

          public void configure()
                         throws Exception

      Configure and run the `MiniSolrCloudCluster`
      Throws:
        `Exception` - if an error occurs on startup

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.