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

Methods
`static boolean` `isAutoAddReplicas(ZkStateReader reader, String collection)`
`static boolean` `waitForAllActiveAndLive(ZkStateReader zkStateReader, int timeoutInMs)` Wait to see *all* cores live and active.
`static boolean` `waitForAllActiveAndLive(ZkStateReader zkStateReader, String collection, int timeoutInMs)` Wait to see *all* cores live and active.
`static boolean` `waitForAllNotLive(ZkStateReader zkStateReader, int timeoutInMs)`
`static boolean` `waitForAllNotLive(ZkStateReader zkStateReader, String collection, int timeoutInMs)`
`static boolean` `waitToSeeLive(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

#### waitForAllActiveAndLive

    public static boolean waitForAllActiveAndLive(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

#### waitForAllActiveAndLive

    public static boolean waitForAllActiveAndLive(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

#### waitToSeeLive

    public static boolean waitToSeeLive(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

#### waitForAllNotLive

    public static boolean waitForAllNotLive(ZkStateReader zkStateReader,
                            int timeoutInMs)

#### waitForAllNotLive

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

#### isAutoAddReplicas

    public static boolean isAutoAddReplicas(ZkStateReader reader,
                            String collection)