You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Simplify file manager registry factory pattern
The current factory pattern used with the `AbstractManager` registry is unnecessarily complex. It relies on:
* **Stateless factory classes** to create managers of each type,
* **Separate `FactoryData` parameter objects** to pass construction data
#### What this PR does
This PR simplifies the registry factory mechanism by:
* Replacing the factory classes with **inline lambda factories**
* Allowing **stateful factory lambdas**, removing boilerplate `FactoryData` classes in most cases
* Keeping factory logic **localized and easier to follow** within the registry call site
This is a **pure refactoring**, it does not change behavior. It improves code readability and maintainability by reducing indirection and eliminating unnecessary types.
#### Notes
`FactoryData` parameter objects are still used where necessary:
* **`RollingFileManager`** and **`RollingRandomAccessFileManager`** still require parameter objects since they update state on each retrieval, not just during initialization.
* Other managers still pass `Configuration` through `ConfigurationFactoryData` to access `getLoggerContext()`, which remains useful.
* fix: add reference to PR number
* Apply suggestions from code review
Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
---------
Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
0 commit comments