Interface ElementRegistry

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
MutableElementRegistry
All Known Implementing Classes:
ElementScopedElementRegistry, RootElementRegistry

public interface ElementRegistry extends AutoCloseable
Represents a registry for Element instances. Inside an Element, there is a shared registry available by using the ServiceLoader to find an instance of ElementRegistrySupplier. This provides access to registries in a hierarchy while allowing for visibility into other Element instances. When searching the hierarchy, by name, the registry searches for all registered at its level, and then up to the parent level and so forth until the root level. The Stream returned from the find(String) method will always return the closest first. Note, instances of ElementRegistry must be thread-safe and may implement thread safety using a locking strategy.