From ada7af983f4d4032fedea8036ec8f4652d1ac595 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:15:44 +1000 Subject: [PATCH] Added conditional config idea --- .../ConditionalStorageBackendConfig.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/main/java/me/cortex/voxy/common/storage/other/ConditionalStorageBackendConfig.java diff --git a/src/main/java/me/cortex/voxy/common/storage/other/ConditionalStorageBackendConfig.java b/src/main/java/me/cortex/voxy/common/storage/other/ConditionalStorageBackendConfig.java new file mode 100644 index 00000000..ffa1992c --- /dev/null +++ b/src/main/java/me/cortex/voxy/common/storage/other/ConditionalStorageBackendConfig.java @@ -0,0 +1,23 @@ +package me.cortex.voxy.common.storage.other; + +import me.cortex.voxy.common.storage.StorageBackend; +import me.cortex.voxy.common.storage.config.ConfigBuildCtx; +import me.cortex.voxy.common.storage.config.Serialization; +import me.cortex.voxy.common.storage.config.StorageConfig; +import org.apache.commons.lang3.NotImplementedException; + +import java.util.ArrayList; +import java.util.List; + +//A conditional storage backend depending on build time config, this enables conditional backends depending on the +// dimension as an example +public class ConditionalStorageBackendConfig extends StorageConfig { + @Override + public StorageBackend build(ConfigBuildCtx ctx) { + throw new NotImplementedException(); + } + + public static String getConfigTypeName() { + return "ConditionalConfig"; + } +}