Module io.jstach.ezkv.kvs
Package io.jstach.ezkv.kvs
@NullMarked
@FakeNonNullByDefault
package io.jstach.ezkv.kvs
Ezkv Key Value loading system that allows loading of key values from URI-based
resources.
Ezkv's core domain is KeyValues
, which can be loaded using
the KeyValuesSystem
. This package provides the necessary
interfaces and classes for loading, parsing, and managing key-value pairs from a
variety of sources including classpath resources, files, and system properties.
Technical Details
- Most classes in this package, with the exception of the
Builder
classes, are immutable and thread-safe. This ensures that instances can be used concurrently across multiple threads without additional synchronization. - By default, null values are not returned or accepted as input in method parameters
unless explicitly marked with
Nullable
. This helps maintain consistency and reduce the risk ofNullPointerException
. - The design prioritizes immutability and thread safety to support reliable, multi-threaded operations and to minimize side effects in application code.
The package also supports extension through the
KeyValuesServiceProvider
interface, which allows for custom
implementations to be loaded using ServiceLoader
. This enables
developers to extend Ezkv with additional media types or URI handling mechanisms.
Key Interfaces and Classes
KeyValuesSystem
- The main entry point for creating and configuring loaders for key-value resources.KeyValuesLoader
- Responsible for loading key-value pairs from configured sources.Variables
- A function that maps keys to values, primarily used for variable interpolation during configuration loading.KeyValuesResource
- Represents a resource containing key-value pairs, with associated metadata for controlling the loading behavior.
- See Also:
-
ClassDescriptionRepresents a key-value pair in the Ezkv configuration system.Enumeration representing flags that can modify the behavior of a
KeyValue
.Metadata associated with aKeyValue
.Represents the source information for aKeyValue
.Represents a collection ofKeyValue
entries with various utility methods for manipulation, transformation, and expansion.A builder for constructingKeyValues
instances from key-value pairs.A facade over various system-level singletons used for loading key-value resources.Key Values Resource focused logging facade and event capture.Interface for loading resources.An exception that indicates an error occurred while trying to interpret key values from a resource.Represents a loader responsible for loadingKeyValues
from configured sources.A builder class for constructing instances ofKeyValuesLoader
.Represents a media type for parsing and formatting key-value pairs.A formatter for writing key-value pairs to an output.A parser for reading key-value pairs from an input source.An exception thrown when an error related to media type handling occurs in the context of key-value parsing or formatting.Represents a resource that contains key-value pairs to be loaded and processed.Builder class for creating instances ofKeyValuesResource
.A service provider interface (SPI) for extending ezkv's capabilities to support additional media types and URI patterns.A service provider interface (SPI) for filtering key values after a resource is loaded.A filter description with filter identifier and expression which is the DSL code that the filter will parse use to do filtering.Provides contextual information to a filter, including the environment and any parameters specified for the filtering operation.A service provider interface for findingKeyValuesLoader
implementations that can handle specificKeyValuesResource
instances.A context provided toKeyValuesServiceProvider.KeyValuesLoaderFinder
implementations to supply necessary dependencies and services for creating aKeyValuesLoader
.A service provider interface for findingKeyValuesMedia
implementations based on various attributes such as file extensions, media types, and URIs.This service provider is for other modules in your application to provide a reference configuration to be overriden and can be loaded using the "provider" URI scheme.A context provided toKeyValuesServiceProvider.KeyValuesProvider
implementations to supply necessary dependencies and services.The main entry point into the Ezkv configuration library.A builder class for constructing instances ofKeyValuesSystem
with customizable components such as environment, loaders, and media finders.Represents a mapping function that associates a key to a value, typically used for variable resolution during interpolation.A builder class for creating compositeVariables
instances by combining multiple sources of key-to-value mappings.A mixin for enums or similar representing parameters that provides some validation on retrieving variables.Represents a specializedVariables
interface that can list all keys it knows about.