org.apache.lucene.search

## Class ShardSearchingTestBase.NodeState

- java.lang.Object
- - org.apache.lucene.search.ShardSearchingTestBase.NodeState

- All Implemented Interfaces:
    Closeable, AutoCloseable
  Enclosing class:
    ShardSearchingTestBase

      protected final class ShardSearchingTestBase.NodeState
      extends Object
      implements Closeable

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ShardSearchingTestBase.NodeState.ShardIndexSearcher` Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `long[]` | `currentNodeVersions`
    `Directory` | `dir`
    `SearcherManager` | `mgr`
    `int` | `myNodeID`
    `SearcherLifetimeManager` | `searchers`
    `IndexWriter` | `writer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NodeState(Random random, int nodeID, int numNodes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ShardSearchingTestBase.NodeState.ShardIndexSearcher` | `acquire()`
    `ShardSearchingTestBase.NodeState.ShardIndexSearcher` | `acquire(long[] nodeVersions)`
    `void` | `close()`
    `void` | `initSearcher(long[] nodeVersions)`
    `void` | `release(ShardSearchingTestBase.NodeState.ShardIndexSearcher s)`
    `void` | `reopen()`
    `void` | `updateNodeVersion(int nodeID, long version)`

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

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

- - ### Field Detail

    - #### dir

          public final Directory dir

    - #### writer

          public final IndexWriter writer

    - #### searchers

          public final SearcherLifetimeManager searchers

    - #### mgr

          public final SearcherManager mgr

    - #### myNodeID

          public final int myNodeID

    - #### currentNodeVersions

          public final long[] currentNodeVersions

  - ### Constructor Detail

    - #### NodeState

          public NodeState(Random random,
                           int nodeID,
                           int numNodes)
                    throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### initSearcher

          public void initSearcher(long[] nodeVersions)
                            throws IOException

      Throws:
        `IOException`

    - #### updateNodeVersion

          public void updateNodeVersion(int nodeID,
                                        long version)
                                 throws IOException

      Throws:
        `IOException`

    - #### acquire

          public ShardSearchingTestBase.NodeState.ShardIndexSearcher acquire()

    - #### release

          public void release(ShardSearchingTestBase.NodeState.ShardIndexSearcher s)
                       throws IOException

      Throws:
        `IOException`

    - #### acquire

          public ShardSearchingTestBase.NodeState.ShardIndexSearcher acquire(long[] nodeVersions)

    - #### reopen

          public void reopen()
                      throws IOException

      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

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