org.apache.solr.common.cloud

## Class ClusterStateUtil

- java.lang.Object
- - org.apache.solr.common.cloud.ClusterStateUtil

-     public class ClusterStateUtil
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClusterStateUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `getLiveAndActiveReplicaCount(ZkStateReader zkStateReader, String collection)`
    `static boolean` | `isAutoAddReplicas(ZkStateReader reader, String collection)`
    `static boolean` | `waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader, int timeoutInMs)` Wait to see *all* cores live and active.
    `static boolean` | `waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader, String collection, int timeoutInMs)` Wait to see *all* cores live and active.
    `static boolean` | `waitForAllReplicasNotLive(ZkStateReader zkStateReader, int timeoutInMs)`
    `static boolean` | `waitForAllReplicasNotLive(ZkStateReader zkStateReader, String collection, int timeoutInMs)`
    `static boolean` | `waitForLiveAndActiveReplicaCount(ZkStateReader zkStateReader, String collection, int replicaCount, int timeoutInMs)`
    `static boolean` | `waitToSeeLiveReplica(ZkStateReader zkStateReader, String collection, String coreNodeName, String baseUrl, int timeoutInMs)` Wait to see an entry in the ClusterState with a specific coreNodeName and baseUrl.

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

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

- - ### Constructor Detail

    - #### ClusterStateUtil

          public ClusterStateUtil()

  - ### Method Detail

    - #### waitForAllActiveAndLiveReplicas

          public static boolean waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader,
                                                                int timeoutInMs)

      Wait to see *all* cores live and active.
      Parameters:
        `zkStateReader` - to use for ClusterState
        `timeoutInMs` - how long to wait before giving up
      Returns:
        false if timed out

    - #### waitForAllActiveAndLiveReplicas

          public static boolean waitForAllActiveAndLiveReplicas(ZkStateReader zkStateReader,
                                                                String collection,
                                                                int timeoutInMs)

      Wait to see *all* cores live and active.
      Parameters:
        `zkStateReader` - to use for ClusterState
        `collection` - to look at
        `timeoutInMs` - how long to wait before giving up
      Returns:
        false if timed out

    - #### waitToSeeLiveReplica

          public static boolean waitToSeeLiveReplica(ZkStateReader zkStateReader,
                                                     String collection,
                                                     String coreNodeName,
                                                     String baseUrl,
                                                     int timeoutInMs)

      Wait to see an entry in the ClusterState with a specific coreNodeName and baseUrl.
      Parameters:
        `zkStateReader` - to use for ClusterState
        `collection` - to look in
        `coreNodeName` - to wait for
        `baseUrl` - to wait for
        `timeoutInMs` - how long to wait before giving up
      Returns:
        false if timed out

    - #### waitForAllReplicasNotLive

          public static boolean waitForAllReplicasNotLive(ZkStateReader zkStateReader,
                                                          int timeoutInMs)

    - #### waitForAllReplicasNotLive

          public static boolean waitForAllReplicasNotLive(ZkStateReader zkStateReader,
                                                          String collection,
                                                          int timeoutInMs)

    - #### getLiveAndActiveReplicaCount

          public static int getLiveAndActiveReplicaCount(ZkStateReader zkStateReader,
                                                         String collection)

    - #### waitForLiveAndActiveReplicaCount

          public static boolean waitForLiveAndActiveReplicaCount(ZkStateReader zkStateReader,
                                                                 String collection,
                                                                 int replicaCount,
                                                                 int timeoutInMs)

    - #### isAutoAddReplicas

          public static boolean isAutoAddReplicas(ZkStateReader reader,
                                                  String collection)

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