org.apache.solr.common.cloud

## Enum Slice.State

- java.lang.Object
- - java.lang.Enum<Slice.State>
  - - org.apache.solr.common.cloud.Slice.State

All Implemented Interfaces:
  Serializable, Comparable<Slice.State>

Enclosing class:
  Slice

    public static enum Slice.State
    extends Enum<Slice.State>

The slice's state.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ACTIVE` The normal/default state of a shard.
`CONSTRUCTION` When a shard is split, the new sub-shards are put in that state while the split operation is in progress.
`INACTIVE` A shard is put in that state after it has been successfully split.
`RECOVERY` Sub-shards of a split shard are put in that state, when they need to create replicas in order to meet the collection's replication factor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Slice.State` `getState(String stateStr)` Converts the state string to a State instance.
`String` `toString()`
`static Slice.State` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static Slice.State[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### ACTIVE

    public static final Slice.State ACTIVE

The normal/default state of a shard.

#### INACTIVE

    public static final Slice.State INACTIVE

A shard is put in that state after it has been successfully split. See the reference guide for more details.

#### CONSTRUCTION

    public static final Slice.State CONSTRUCTION

When a shard is split, the new sub-shards are put in that state while the split operation is in progress. It's also used when the shard is undergoing data restoration. A shard in this state still receives update requests from the parent shard leader, however does not participate in distributed search.

#### RECOVERY

    public static final Slice.State RECOVERY

Sub-shards of a split shard are put in that state, when they need to create replicas in order to meet the collection's replication factor. A shard in that state still receives update requests from the parent shard leader, however does not participate in distributed search.

### Method Detail

#### values

    public static Slice.State[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (Slice.State c : Slice.State.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static Slice.State valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
  `NullPointerException` - if the argument is null

#### toString

    public String toString()

Overrides:
  `toString` in class `Enum<Slice.State>`

#### getState

    public static Slice.State getState(String stateStr)

Converts the state string to a State instance.