> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WorkerList

> WorkerList — Kinetica Java API

<div className="kinetica-javadoc">
  <div className="header">
    <div className="sub-title"><span className="package-label-in-type">Package</span> <a href="/content/api/java/com/gpudb/package-summary">com.gpudb</a></div>
    <h1 title="Class WorkerList" className="title">Class WorkerList</h1>
  </div>

  <div className="inheritance" title="Inheritance Tree">
    <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">java.lang.Object</a>

    <div className="inheritance">
      <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" className="external-link">java.util.AbstractCollection</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>>

      <div className="inheritance">
        <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractList.html" title="class or interface in java.util" className="external-link">java.util.AbstractList</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>>

        <div className="inheritance">
          <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" className="external-link">java.util.ArrayList</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>>
          <div className="inheritance">com.gpudb.WorkerList</div>
        </div>
      </div>
    </div>
  </div>

  <div className="section class-description" id="class-description">
    <div className="dl notes">
      <div className="dt">All Implemented Interfaces:</div>
      <div className="dd"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" className="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" className="external-link">Cloneable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" className="external-link">Iterable</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" className="external-link">Collection</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/RandomAccess.html" title="class or interface in java.util" className="external-link">RandomAccess</a></code></div>
    </div>

    <div className="dl notes">
      <div className="dt">Direct Known Subclasses:</div>
      <div className="dd"><code><a href="/content/api/java/com/gpudb/BulkInserter.WorkerList" title="class in com.gpudb">BulkInserter.WorkerList</a></code></div>
    </div>

    <hr />

    <div className="type-signature"><span className="modifiers">public class </span><span className="element-name type-name-label">WorkerList</span> <span className="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" className="external-link">ArrayList</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>></span></div>

    <div className="block">
      A list of worker URLs to use for multi-head ingest and retrieval.
      <p>The addresses belong to the <span className="b">connection</span>, not to this list. A <a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb"><code>GPUdb</code></a> instance discovers each cluster's rank addresses, applies <a href="/content/api/java/com/gpudb/GPUdbBase.Options#setHostnameRegex(java.lang.String)"><code>the connection's hostname regex</code></a> to them, and keeps the result per cluster; this class is a view onto that, held by a <a href="/content/api/java/com/gpudb/BulkInserter" title="class in com.gpudb"><code>BulkInserter</code></a> or <a href="/content/api/java/com/gpudb/RecordRetriever" title="class in com.gpudb"><code>RecordRetriever</code></a>. </p>
      <p>It does not resolve or filter addresses of its own. A filter has no coherent meaning here, because it cannot survive a failover: one tuned for a cluster's addressing may match nothing on the next, and multi-head objects fail over with the connection. Set the regex on the connection instead, where it is applied to every cluster as that cluster is discovered. </p>
      <p>The one choice that <span className="i">is</span> meaningful per object is declining multi-head altogether -- see <a href="#%3Cinit%3E()"><code>WorkerList()</code></a>. That names an intent rather than an address, and an intent transfers across clusters where a list of addresses does not. </p>
      <p>Note entry <code>i</code> of this list is rank <code>i + 1</code>; the head rank is not a member, and a rank removed from the cluster keeps its slot as <code>null</code>. The worker indices in the shard routing table are rank numbers, so compacting the list would silently misroute every rank above the hole.</p>
    </div>

    <div className="dl notes">
      <div className="dt">See Also:</div>

      <div className="dd">
        <ul className="tag-list">
          <li><a href="/content/api/java/serialized-form#com.gpudb.WorkerList">Serialized Form</a></li>
        </ul>
      </div>
    </div>
  </div>

  <div className="section summary">
    <ul className="summary-list">
      <li>
        <div className="section field-summary" id="field-summary">
          <h2>Field Summary</h2>

          <div className="inherited-list">
            <h3 id="fields-inherited-from-class-java.util.AbstractList">Fields inherited from class java.util.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractList.html" title="class or interface in java.util" className="external-link">AbstractList</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractList.html#modCount" title="class or interface in java.util" className="external-link">modCount</a></code>
          </div>
        </div>
      </li>

      <li>
        <div className="section constructor-summary" id="constructor-summary">
          <h2>Constructor Summary</h2>
          <div className="caption"><span>Constructors</span></div>

          <div className="summary-table two-column-summary">
            <div className="table-header col-first">Constructor</div>
            <div className="table-header col-last">Description</div>
            <div className="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" className="member-name-link">WorkerList</a>()</code></div>

            <div className="col-last even-row-color">
              <div className="block">Creates an empty <a href="/content/api/java/com/gpudb/WorkerList" title="class in com.gpudb"><code>WorkerList</code></a>, which declines multi-head operations for the <a href="/content/api/java/com/gpudb/BulkInserter" title="class in com.gpudb"><code>BulkInserter</code></a> or <a href="/content/api/java/com/gpudb/RecordRetriever" title="class in com.gpudb"><code>RecordRetriever</code></a> it is given to.</div>
            </div>

            <div className="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(com.gpudb.GPUdb)" className="member-name-link">WorkerList</a><wbr />(<a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb">GPUdb</a> gpudb)</code></div>

            <div className="col-last odd-row-color">
              <div className="block">Creates a <a href="/content/api/java/com/gpudb/WorkerList" title="class in com.gpudb"><code>WorkerList</code></a> from the worker rank addresses the given connection has already discovered for the cluster it is currently on.</div>
            </div>

            <div className="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(com.gpudb.GPUdb,java.lang.String)" className="member-name-link">WorkerList</a><wbr />(<a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb">GPUdb</a> gpudb, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> ipPrefix)</code></div>

            <div className="col-last even-row-color">
              <div className="block">
                <span className="deprecated-label">Deprecated.</span>
                <div className="deprecation-comment">the prefix is ignored; see <a href="#%3Cinit%3E(com.gpudb.GPUdb,java.util.regex.Pattern)"><code>WorkerList(GPUdb, Pattern)</code></a> for why, and <a href="/content/api/java/com/gpudb/GPUdbBase.Options#setHostnameRegex(java.lang.String)"><code>GPUdbBase.Options.setHostnameRegex(java.lang.String)</code></a> for the replacement.</div>
              </div>
            </div>

            <div className="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(com.gpudb.GPUdb,java.util.regex.Pattern)" className="member-name-link">WorkerList</a><wbr />(<a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb">GPUdb</a> gpudb, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" className="external-link">Pattern</a> ipRegex)</code></div>

            <div className="col-last odd-row-color">
              <div className="block">
                <span className="deprecated-label">Deprecated.</span>
                <div className="deprecation-comment">the regex is ignored.</div>
              </div>
            </div>

            <div className="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.util.List)" className="member-name-link">WorkerList</a><wbr />(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>> urls)</code></div>

            <div className="col-last even-row-color">
              <div className="block">
                <span className="deprecated-label">Deprecated.</span>
                <div className="deprecation-comment">for internal use.</div>
              </div>
            </div>
          </div>
        </div>
      </li>

      <li>
        <div className="section method-summary" id="method-summary">
          <h2>Method Summary</h2>

          <div id="method-summary-table">
            <div className="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabIndex="0" className="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabIndex="-1" className="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabIndex="-1" className="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabIndex="-1" className="table-tab">Deprecated Methods</button></div>

            <div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
              <div className="summary-table three-column-summary">
                <div className="table-header col-first">Modifier and Type</div>
                <div className="table-header col-second">Method</div>
                <div className="table-header col-last">Description</div>
                <div className="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" className="external-link">Pattern</a></code></div>
                <div className="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#getIpRegex()" className="member-name-link">getIpRegex</a>()</code></div>

                <div className="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
                  <div className="block">
                    <span className="deprecated-label">Deprecated.</span>
                    <div className="deprecation-comment">a worker list has no regex of its own.</div>
                  </div>
                </div>

                <div className="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
                <div className="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isMultiHeadEnabled()" className="member-name-link">isMultiHeadEnabled</a>()</code></div>

                <div className="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
                  <div className="block">Whether multi-head operations can be used with this list.</div>
                </div>
              </div>
            </div>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-java.util.ArrayList">Methods inherited from class java.util.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" className="external-link">ArrayList</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#add(int,E)" title="class or interface in java.util" className="external-link">add</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#add(E)" title="class or interface in java.util" className="external-link">add</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#addAll(int,java.util.Collection)" title="class or interface in java.util" className="external-link">addAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#addAll(java.util.Collection)" title="class or interface in java.util" className="external-link">addAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#clear()" title="class or interface in java.util" className="external-link">clear</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#clone()" title="class or interface in java.util" className="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#contains(java.lang.Object)" title="class or interface in java.util" className="external-link">contains</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#ensureCapacity(int)" title="class or interface in java.util" className="external-link">ensureCapacity</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#equals(java.lang.Object)" title="class or interface in java.util" className="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#forEach(java.util.function.Consumer)" title="class or interface in java.util" className="external-link">forEach</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#get(int)" title="class or interface in java.util" className="external-link">get</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#hashCode()" title="class or interface in java.util" className="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#indexOf(java.lang.Object)" title="class or interface in java.util" className="external-link">indexOf</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#isEmpty()" title="class or interface in java.util" className="external-link">isEmpty</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#iterator()" title="class or interface in java.util" className="external-link">iterator</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#lastIndexOf(java.lang.Object)" title="class or interface in java.util" className="external-link">lastIndexOf</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#listIterator()" title="class or interface in java.util" className="external-link">listIterator</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#listIterator(int)" title="class or interface in java.util" className="external-link">listIterator</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#remove(int)" title="class or interface in java.util" className="external-link">remove</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#remove(java.lang.Object)" title="class or interface in java.util" className="external-link">remove</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#removeAll(java.util.Collection)" title="class or interface in java.util" className="external-link">removeAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#removeIf(java.util.function.Predicate)" title="class or interface in java.util" className="external-link">removeIf</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#removeRange(int,int)" title="class or interface in java.util" className="external-link">removeRange</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#replaceAll(java.util.function.UnaryOperator)" title="class or interface in java.util" className="external-link">replaceAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#retainAll(java.util.Collection)" title="class or interface in java.util" className="external-link">retainAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#set(int,E)" title="class or interface in java.util" className="external-link">set</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#size()" title="class or interface in java.util" className="external-link">size</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#sort(java.util.Comparator)" title="class or interface in java.util" className="external-link">sort</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#spliterator()" title="class or interface in java.util" className="external-link">spliterator</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#subList(int,int)" title="class or interface in java.util" className="external-link">subList</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#toArray()" title="class or interface in java.util" className="external-link">toArray</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#toArray(T%5B%5D)" title="class or interface in java.util" className="external-link">toArray</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/ArrayList.html#trimToSize()" title="class or interface in java.util" className="external-link">trimToSize</a></code>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-java.util.AbstractCollection">Methods inherited from class java.util.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" className="external-link">AbstractCollection</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#containsAll(java.util.Collection)" title="class or interface in java.util" className="external-link">containsAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#toString()" title="class or interface in java.util" className="external-link">toString</a></code>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" className="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" className="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" className="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" className="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" className="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" className="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" className="external-link">wait</a></code>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-java.util.Collection">Methods inherited from interface java.util.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" className="external-link">Collection</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#parallelStream()" title="class or interface in java.util" className="external-link">parallelStream</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#stream()" title="class or interface in java.util" className="external-link">stream</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#toArray(java.util.function.IntFunction)" title="class or interface in java.util" className="external-link">toArray</a></code>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-java.util.List">Methods inherited from interface java.util.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html#containsAll(java.util.Collection)" title="class or interface in java.util" className="external-link">containsAll</a></code>
          </div>
        </div>
      </li>
    </ul>
  </div>

  <div className="section details">
    <ul className="details-list">
      <li>
        <div className="section constructor-details" id="constructor-detail">
          <h2>Constructor Details</h2>

          <ul className="member-list">
            <li>
              <div className="section detail" id="<init>()">
                <h3>WorkerList</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="element-name">WorkerList</span>()</div>

                <div className="block">
                  Creates an empty <a href="/content/api/java/com/gpudb/WorkerList" title="class in com.gpudb"><code>WorkerList</code></a>, which declines multi-head operations for the <a href="/content/api/java/com/gpudb/BulkInserter" title="class in com.gpudb"><code>BulkInserter</code></a> or <a href="/content/api/java/com/gpudb/RecordRetriever" title="class in com.gpudb"><code>RecordRetriever</code></a> it is given to.
                  <p>That object will route through the head node for its lifetime. The choice is authoritative: it is not undone when the worker list is rebuilt after a failover or a shard rebalance. </p>
                  <p>This is the way to decline multi-head for a single object while keeping the connection's fail-over. Disabling auto-discovery is not equivalent -- it also stops the client discovering the other clusters in an HA ring, so it costs fail-over as well. </p>
                  <p>Nothing inside the API may use this constructor: it is a caller's way of expressing an intent, and an internal use would silently pin its own list to head-node-only.</p>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="<init>(java.util.List)">
                <h3>WorkerList</h3>
                <div className="member-signature"><span className="annotations"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" className="external-link">@Deprecated</a> </span><span className="modifiers">public</span> <span className="element-name">WorkerList</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URL.html" title="class or interface in java.net" className="external-link">URL</a>> urls)</span></div>

                <div className="deprecation-block">
                  <span className="deprecated-label">Deprecated.</span>
                  <div className="deprecation-comment">for internal use. Pass <code>null</code> to a <a href="/content/api/java/com/gpudb/BulkInserter" title="class in com.gpudb"><code>BulkInserter</code></a> or <a href="/content/api/java/com/gpudb/RecordRetriever" title="class in com.gpudb"><code>RecordRetriever</code></a> to use the connection's own addresses, or <a href="#%3Cinit%3E()"><code>WorkerList()</code></a> to decline multi-head.</div>
                </div>

                <div className="block">
                  Creates a <a href="/content/api/java/com/gpudb/WorkerList" title="class in com.gpudb"><code>WorkerList</code></a> populated with the given URLs.
                  <p>The list is honored as given, but is <span className="b">not maintained</span>: after the connection fails over or back, the object adopts that cluster's addresses instead, because a list of one cluster's rank addresses says nothing about another's.</p>
                </div>

                <div className="dl notes">
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>urls</code> - the worker rank URLs, with <code>null</code> in the slot of any rank removed from the cluster</div>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="<init>(com.gpudb.GPUdb)">
                <h3>WorkerList</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="element-name">WorkerList</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb">GPUdb</a> gpudb)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

                <div className="block">
                  Creates a <a href="/content/api/java/com/gpudb/WorkerList" title="class in com.gpudb"><code>WorkerList</code></a> from the worker rank addresses the given connection has already discovered for the cluster it is currently on.
                  <p>This reads the connection's addresses; it does not query the server or re-resolve them. They were filtered through the connection's hostname regex when that cluster was discovered, so they already reflect it. </p>
                  <p>If the connection has no worker addresses for the current cluster -- multi-head is off at the server, or the cluster advertises none this client can use -- the list is empty and the object using it operates through the head node.</p>
                </div>

                <div className="dl notes">
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>gpudb</code> - the <a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb"><code>GPUdb</code></a> instance whose addresses to use</div>
                  <div className="dt">Throws:</div>
                  <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - never thrown; retained for source compatibility</div>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="<init>(com.gpudb.GPUdb,java.util.regex.Pattern)">
                <h3>WorkerList</h3>
                <div className="member-signature"><span className="annotations"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" className="external-link">@Deprecated</a> </span><span className="modifiers">public</span> <span className="element-name">WorkerList</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb">GPUdb</a> gpudb, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" className="external-link">Pattern</a> ipRegex)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

                <div className="deprecation-block">
                  <span className="deprecated-label">Deprecated.</span>
                  <div className="deprecation-comment">the regex is ignored. Address filtering belongs on the connection -- see <a href="/content/api/java/com/gpudb/GPUdbBase.Options#setHostnameRegex(java.lang.String)"><code>GPUdbBase.Options.setHostnameRegex(java.lang.String)</code></a> -- because a filter at this scope cannot survive a failover: one tuned for a cluster's addressing may match nothing on the next. This constructor behaves as <a href="#%3Cinit%3E(com.gpudb.GPUdb)"><code>WorkerList(GPUdb)</code></a>.</div>
                </div>

                <div className="dl notes">
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>gpudb</code> - the <a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb"><code>GPUdb</code></a> instance whose addresses to use</div>
                  <div className="dd"><code>ipRegex</code> - ignored</div>
                  <div className="dt">Throws:</div>
                  <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - never thrown; retained for source compatibility</div>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="<init>(com.gpudb.GPUdb,java.lang.String)">
                <h3>WorkerList</h3>
                <div className="member-signature"><span className="annotations"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" className="external-link">@Deprecated</a> </span><span className="modifiers">public</span> <span className="element-name">WorkerList</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb">GPUdb</a> gpudb, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> ipPrefix)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

                <div className="deprecation-block">
                  <span className="deprecated-label">Deprecated.</span>
                  <div className="deprecation-comment">the prefix is ignored; see <a href="#%3Cinit%3E(com.gpudb.GPUdb,java.util.regex.Pattern)"><code>WorkerList(GPUdb, Pattern)</code></a> for why, and <a href="/content/api/java/com/gpudb/GPUdbBase.Options#setHostnameRegex(java.lang.String)"><code>GPUdbBase.Options.setHostnameRegex(java.lang.String)</code></a> for the replacement.</div>
                </div>

                <div className="dl notes">
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>gpudb</code> - the <a href="/content/api/java/com/gpudb/GPUdb" title="class in com.gpudb"><code>GPUdb</code></a> instance whose addresses to use</div>
                  <div className="dd"><code>ipPrefix</code> - ignored</div>
                  <div className="dt">Throws:</div>
                  <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - never thrown; retained for source compatibility</div>
                </div>
              </div>
            </li>
          </ul>
        </div>
      </li>

      <li>
        <div className="section method-details" id="method-detail">
          <h2>Method Details</h2>

          <ul className="member-list">
            <li>
              <div className="section detail" id="getIpRegex()">
                <h3>getIpRegex</h3>
                <div className="member-signature"><span className="annotations"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" className="external-link">@Deprecated</a> </span><span className="modifiers">public</span> <span className="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" className="external-link">Pattern</a></span> <span className="element-name">getIpRegex</span>()</div>

                <div className="deprecation-block">
                  <span className="deprecated-label">Deprecated.</span>
                  <div className="deprecation-comment">a worker list has no regex of its own. Addresses are filtered by the connection; see <a href="/content/api/java/com/gpudb/GPUdbBase.Options#getHostnameRegex()"><code>GPUdbBase.Options.getHostnameRegex()</code></a>.</div>
                </div>

                <div className="dl notes">
                  <div className="dt">Returns:</div>
                  <div className="dd">always <code>null</code></div>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="isMultiHeadEnabled()">
                <h3>isMultiHeadEnabled</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="return-type">boolean</span> <span className="element-name">isMultiHeadEnabled</span>()</div>
                <div className="block">Whether multi-head operations can be used with this list.</div>

                <div className="dl notes">
                  <div className="dt">Returns:</div>
                  <div className="dd">whether the list names any worker rank</div>
                </div>
              </div>
            </li>
          </ul>
        </div>
      </li>
    </ul>
  </div>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.