Enum WorkerLifecycleStatus
- java.lang.Object
-
- java.lang.Enum<WorkerLifecycleStatus>
-
- com.snowflake.connectors.taskreactor.worker.registry.WorkerLifecycleStatus
-
- All Implemented Interfaces:
Serializable
,Comparable<WorkerLifecycleStatus>
public enum WorkerLifecycleStatus extends Enum<WorkerLifecycleStatus>
Lifecycle status for each worker stored in aWORKER_REGISTRY
table.Once a worker becomes
ACTIVE
, meaning that all SQL objects are created for it (i.e. queue table + stream + task), it gets aWorkerStatus
assigned.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVE
Worker is created and fully operational.DELETED
Worker is deleted.DELETING
Set by theDispatcher
when starting deleting worker objects.PROVISIONING
Set by theDispatcher
when starting creating worker objects.REQUESTED
WorkerOrchestrator
sets this status right after the user increased the number of workers.UP_FOR_DELETION
WorkerOrchestrator
sets this status right after the user decreased the number of workers.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WorkerLifecycleStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static WorkerLifecycleStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ACTIVE
public static final WorkerLifecycleStatus ACTIVE
Worker is created and fully operational.
-
REQUESTED
public static final WorkerLifecycleStatus REQUESTED
WorkerOrchestrator
sets this status right after the user increased the number of workers.REQUESTED
workers have no queue table, stream and task created yet.
-
PROVISIONING
public static final WorkerLifecycleStatus PROVISIONING
Set by theDispatcher
when starting creating worker objects.
-
UP_FOR_DELETION
public static final WorkerLifecycleStatus UP_FOR_DELETION
WorkerOrchestrator
sets this status right after the user decreased the number of workers.UP_FOR_DELETION
workers still have queue table, stream and task existing, however no new work would be assigned to them anymore.If the worker is currently processing, it won't be deleted until it stops.
-
DELETING
public static final WorkerLifecycleStatus DELETING
Set by theDispatcher
when starting deleting worker objects.
-
DELETED
public static final WorkerLifecycleStatus DELETED
Worker is deleted. No queue table, stream nor task exist for a worker and it cannot get any work assigned.
-
-
Method Detail
-
values
public static WorkerLifecycleStatus[] 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 (WorkerLifecycleStatus c : WorkerLifecycleStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WorkerLifecycleStatus 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 nameNullPointerException
- if the argument is null
-
-