InstanceRole Class

public final class InstanceRole
extends ExpandableStringEnum<InstanceRole>

New role of managed instance in a distributed availability group, can be Primary or Secondary.

Field Summary

Modifier and Type Field and Description
static final InstanceRole PRIMARY

Static value Primary for InstanceRole.

static final InstanceRole SECONDARY

Static value Secondary for InstanceRole.

Constructor Summary

Constructor Description
InstanceRole()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of InstanceRole value.

Method Summary

Modifier and Type Method and Description
static InstanceRole fromString(String name)

Creates or finds a InstanceRole from its string representation.

static Collection<InstanceRole> values()

Gets known InstanceRole values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

PRIMARY

public static final InstanceRole PRIMARY

Static value Primary for InstanceRole.

SECONDARY

public static final InstanceRole SECONDARY

Static value Secondary for InstanceRole.

Constructor Details

InstanceRole

@Deprecated
public InstanceRole()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of InstanceRole value.

Method Details

fromString

public static InstanceRole fromString(String name)

Creates or finds a InstanceRole from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding InstanceRole.

values

public static Collection<InstanceRole> values()

Gets known InstanceRole values.

Returns:

known InstanceRole values.

Applies to