Enum Class SolrClientType

java.lang.Object
java.lang.Enum<SolrClientType>
com.norconex.committer.solr.SolrClientType
All Implemented Interfaces:
Serializable, Comparable<SolrClientType>, Constable

public enum SolrClientType extends Enum<SolrClientType>
Supported SolrClient types.
Since:
2.4.0
Author:
Pascal Essiembre
  • Enum Constant Details

    • HTTP

      public static final SolrClientType HTTP
      Direct access to a single Solr node via HTTP. Default client type.
    • LB_HTTP

      public static final SolrClientType LB_HTTP
      Simple load-balancing across multiple Solr nodes via HTTP.
    • CONCURRENT_UPDATE

      public static final SolrClientType CONCURRENT_UPDATE
      Optimized for high-volume upserts to a single Solr node.
    • CLOUD

      public static final SolrClientType CLOUD
      Client for use with a SolrCloud cluster via ZooKeeper hosts.
    • HTTP2

      public static final SolrClientType HTTP2
      HTTP/2 variant of HTTP (experimental).
    • LB_HTTP2

      public static final SolrClientType LB_HTTP2
      HTTP/2 variant of LB_HTTP (experimental).
    • CONCURRENT_UPDATE_HTTP2

      public static final SolrClientType CONCURRENT_UPDATE_HTTP2
      HTTP/2 variant of CONCURRENT_UPDATE (experimental).
  • Method Details

    • values

      public static SolrClientType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SolrClientType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SolrClientType>
    • create

      public org.apache.solr.client.solrj.SolrClient create(String solrURL)
      Creates a SolrClient for the given Solr URL.
      Parameters:
      solrURL - the Solr URL (or comma-separated URLs where applicable)
      Returns:
      a new SolrClient instance
    • of

      public static SolrClientType of(String type)
      Returns the SolrClientType matching the given type string (case-insensitive), or null if none match.
      Parameters:
      type - the client type name (e.g. "HttpSolrClient")
      Returns:
      matching SolrClientType, or null