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 of NullPointerException.
  • 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: