aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/hub/storageserverinstance.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver/hub/storageserverinstance.h')
-rw-r--r--src/zenserver/hub/storageserverinstance.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/zenserver/hub/storageserverinstance.h b/src/zenserver/hub/storageserverinstance.h
index a2f3d25d7..23196d835 100644
--- a/src/zenserver/hub/storageserverinstance.h
+++ b/src/zenserver/hub/storageserverinstance.h
@@ -21,10 +21,16 @@ namespace zen {
class StorageServerInstance
{
public:
- StorageServerInstance(ZenServerEnvironment& RunEnvironment,
- std::string_view ModuleId,
- std::filesystem::path FileHydrationPath,
- std::filesystem::path HydrationTempPath);
+ struct Configuration
+ {
+ uint16_t BasePort;
+ std::filesystem::path HydrationTempPath;
+ std::filesystem::path FileHydrationPath;
+ uint32_t HttpThreadCount = 0; // Deduce from core count
+ int CoreLimit = 0; // Use hardware core count
+ };
+
+ StorageServerInstance(ZenServerEnvironment& RunEnvironment, const Configuration& Config, std::string_view ModuleId);
~StorageServerInstance();
void Provision();
@@ -45,15 +51,17 @@ public:
#endif
private:
- void WakeLocked();
- RwLock m_Lock;
- std::string m_ModuleId;
+ void WakeLocked();
+ RwLock m_Lock;
+ const Configuration m_Config;
+ std::string m_ModuleId;
+ ZenServerInstance m_ServerInstance;
+
std::atomic<bool> m_IsProvisioned{false};
std::atomic<bool> m_IsHibernated{false};
- ZenServerInstance m_ServerInstance;
std::filesystem::path m_BaseDir;
+
std::filesystem::path m_TempDir;
- std::filesystem::path m_HydrationPath;
ResourceMetrics m_ResourceMetrics;
#if ZEN_PLATFORM_WINDOWS
JobObject* m_JobObject = nullptr;