Class EmbeddedStorageConfiguration
- java.lang.Object
-
- one.microstream.storage.embedded.configuration.types.EmbeddedStorageConfiguration
-
public final class EmbeddedStorageConfiguration extends Object
Static utility class containing various utility methods to create and load storage configurations.- Since:
- 05.00.00
- See Also:
EmbeddedStorageConfigurationBuilder
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EmbeddedStorageConfigurationBuilderBuilder()Creates a newEmbeddedStorageConfigurationBuilderinstance.static StringDefaultResourceName()The default name of the storage configuration resource.static EmbeddedStorageFoundation.CreatorFoundationCreator(Configuration configuration)Creates a newEmbeddedStorageFoundation.Creatorbased on aConfiguration.static EmbeddedStorageConfigurationBuilderload()Tries to load the default storage configuration properties file.static EmbeddedStorageConfigurationBuilderload(String path)Tries to load the storage configuration file frompath.static EmbeddedStorageConfigurationBuilderload(String path, Charset charset)Tries to load the storage configuration file frompath.static EmbeddedStorageConfigurationBuilderload(Charset charset)Tries to load the default storage configuration properties file.static EmbeddedStorageConfigurationBuilderload(ConfigurationLoader loader, ConfigurationParser parser)Tries to load the storage configuration based on a given loader and parser.static StringPathProperty()The property name which is used to hand the external configuration file path to the application.
-
-
-
Method Detail
-
PathProperty
public static String PathProperty()
The property name which is used to hand the external configuration file path to the application.Either as system property or in the context's configuration, e.g. Spring's application.properties.
- Returns:
- "microstream.storage.configuration.path"
-
DefaultResourceName
public static String DefaultResourceName()
The default name of the storage configuration resource.- Returns:
- "microstream-storage.properties"
- See Also:
load()
-
Builder
public static EmbeddedStorageConfigurationBuilder Builder()
Creates a newEmbeddedStorageConfigurationBuilderinstance.This is a synonym for
EmbeddedStorageConfigurationBuilder.New().- Returns:
- a newly created
EmbeddedStorageConfigurationBuilder - See Also:
EmbeddedStorageConfigurationBuilder.New()
-
load
public static EmbeddedStorageConfigurationBuilder load()
Tries to load the default storage configuration properties file.The resource name is either set via the system property "microstream.storage.configuration.path" or the default name "microstream-storage.properties".
The search order is as described in
ConfigurationLoader.New(String).- Returns:
- the loaded configuration builder
- Throws:
ConfigurationExceptionNoConfigurationFound- if no configuration can be found at the given path- See Also:
PathProperty(),DefaultResourceName()
-
load
public static EmbeddedStorageConfigurationBuilder load(String path)
Tries to load the storage configuration file frompath.Depending on the file suffix either the XML or the INI loader is used.
The search order is as described in
ConfigurationLoader.New(String).- Parameters:
path- the path to load the configuration from- Returns:
- the loaded configuration builder
- Throws:
ConfigurationExceptionNoConfigurationFound- if no configuration can be found at the given path- See Also:
PathProperty(),DefaultResourceName()
-
load
public static EmbeddedStorageConfigurationBuilder load(Charset charset)
Tries to load the default storage configuration properties file.The resource name is either set via the system property "microstream.storage.configuration.path" or the default name "microstream-storage.properties".
The search order is as described in
ConfigurationLoader.New(String).- Parameters:
charset- the charset used to parse the configuration- Returns:
- the loaded configuration builder
- Throws:
ConfigurationExceptionNoConfigurationFound- if no configuration can be found at the given path- See Also:
PathProperty(),DefaultResourceName()
-
load
public static EmbeddedStorageConfigurationBuilder load(String path, Charset charset)
Tries to load the storage configuration file frompath.Depending on the file suffix either the XML or the INI loader is used.
The search order is as described in
ConfigurationLoader.New(String).- Parameters:
path- the path to load the configuration fromcharset- the charset used to parse the configuration- Returns:
- the loaded configuration builder
- Throws:
ConfigurationExceptionNoConfigurationFound- if no configuration can be found at the given path- See Also:
PathProperty(),DefaultResourceName()
-
load
public static EmbeddedStorageConfigurationBuilder load(ConfigurationLoader loader, ConfigurationParser parser)
Tries to load the storage configuration based on a given loader and parser.- Parameters:
loader- the loader to useparser- the parser to use- Returns:
- the loaded configuration builder
-
FoundationCreator
public static EmbeddedStorageFoundation.Creator FoundationCreator(Configuration configuration)
Creates a newEmbeddedStorageFoundation.Creatorbased on aConfiguration.- Parameters:
configuration- the configuration the foundation will be based on- Returns:
- a new
EmbeddedStorageFoundation.Creator
-
-