Package com.hazelcast.spi.discovery
Enum DiscoveryStrategyFactory.DiscoveryStrategyLevel
- java.lang.Object
-
- java.lang.Enum<DiscoveryStrategyFactory.DiscoveryStrategyLevel>
-
- com.hazelcast.spi.discovery.DiscoveryStrategyFactory.DiscoveryStrategyLevel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DiscoveryStrategyFactory.DiscoveryStrategyLevel>
- Enclosing interface:
- DiscoveryStrategyFactory
public static enum DiscoveryStrategyFactory.DiscoveryStrategyLevel extends java.lang.Enum<DiscoveryStrategyFactory.DiscoveryStrategyLevel>
Level of the discovery strategy.Discovery strategies can have different levels. They can be at the level of Cloud Virtual Machines, for example, AWS EC2 Instance or GCP Virtual Machine. They can also be at the level of some specific platform or framework, like Kubernetes.
It decides on the priority in the auto detection mechanism. As an example, let's take Kubernetes environment installed on AWS EC2 instances. In this case two plugins are auto-detected: hazelcast-aws and hazelcast-kubernetes. This level decides which one to pick:
- hazelcast-aws implements level
CLOUD_VM
- hazelcast-kubernetes implements level
PLATFORM
PLATFORM
has higher priority thanCLOUD_VM
, so hazelcast-kubernetes plugin is selected.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPriority()
static DiscoveryStrategyFactory.DiscoveryStrategyLevel
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DiscoveryStrategyFactory.DiscoveryStrategyLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final DiscoveryStrategyFactory.DiscoveryStrategyLevel UNKNOWN
Level unknown, lowest priority.
-
CLOUD_VM
public static final DiscoveryStrategyFactory.DiscoveryStrategyLevel CLOUD_VM
VM Machine level, for example, hazelcast-aws or hazelcast-azure.
-
PLATFORM
public static final DiscoveryStrategyFactory.DiscoveryStrategyLevel PLATFORM
Platform level, for example, hazelcast-kubernetes.
-
CUSTOM
public static final DiscoveryStrategyFactory.DiscoveryStrategyLevel CUSTOM
Custom strategy level, highest priority.
-
-
Method Detail
-
values
public static DiscoveryStrategyFactory.DiscoveryStrategyLevel[] 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 (DiscoveryStrategyFactory.DiscoveryStrategyLevel c : DiscoveryStrategyFactory.DiscoveryStrategyLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DiscoveryStrategyFactory.DiscoveryStrategyLevel valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getPriority
public int getPriority()
-
-