blob: c895f75d13eb4266bcdb35b6da956992968f59e8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include <cstdint>
#include <string_view>
namespace zen {
enum class HubInstanceState : uint32_t
{
// Stable states - possible to initiate state change to a different stable state via the transitioning states
Unprovisioned, // Initial state; process not running
Provisioned, // Process running and serving requests
Hibernated, // Process stopped, data preserved; can be woken
Crashed, // Process died unexpectedly while Provisioned; recovery pending
// Transitioning states - there is explicit ownership during this state and it may not be stolen
Provisioning, // Unprovisioned -> Provisioned (Hydrating and spawning process)
Hibernating, // Provisioned -> Hibernated (Shutting down process, preserving data on disk)
Waking, // Hibernated -> Provisioned (Starting process from preserved data)
Deprovisioning, // Provisioned/Hibernated/Crashed -> Unprovisioned (Shutting down process and cleaning up data)
Recovering, // Crashed -> Provisioned/Deprovisioned (Attempting in-place restart after a crash)
};
std::string_view ToString(HubInstanceState State);
} // namespace zen
|