Package org.spongepowered.configurate.reference

File watcher and infrastructure to support dynamically updating configurations.

There are three core components of this package:

  • The WatchServiceListener provides a reactive interface to listen to filesystem changes
  • ConfigurationReferences can either be manually updated, or attached to a watch service, and hold a loader plus a loaded node, to pass around a reference to a root node while allowing for reloads.
  • Value references can be retrieved from configuration references, and provide an always up-to-date reference to a deserialized value within a configuration node

These components are designed to work together, but the watch listener can be used independently from the other components for any situation where file watching is necessary.