Experimental feature: Allow for ServiceRegistry "suspend and restore"

Description

I'm needing to be able to capture the state (the registered services) from a started ServiceRegistry to allow for faster re-starts when the configuration doesn't change.

This is to support experiments with improved suspend/resume operations from external tools and integrators.

We've identified a combination of needs to achieve this:

  • refine the semantics of SessionFactoryServiceRegistryImpl#destroy to really clear all of its cached state

  • a resetAndReactivate() method to be introduced on StandardServiceRegistryImpl

  • to expose methods to similarly clear/reset the tree of registries (the parent)

  • to add some additional accessors to MetadataImpl so to be able to create copies of it

  • improve synchronization details on BootstrapServiceRegistryImpl to make it suitable for the new use case

None of this will be public API (nor SPI) at this stage: early prototype, yet need to merge such functionality to allow continuing the exploration of the external tools.

Environment

None

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor
Configure