Vanlightly opened a new pull request #2876: URL: https://github.com/apache/bookkeeper/pull/2876
### Motivation To have DI on the bookie, it's better to have a single constructor that takes all the injected implementations. With a single constructor, there's only one place modify in production code when we want to inject something, rather than having the bookie need to know how to create a "default" version (which often breaks encapsulation). If we need convenience constructors for tests, they should live in the tests. ### Changes The principle changes are: - remove the BookieImpl constructor which takes only a ServerConfiguration and chooses default values for the other ijectable dependencies. - add a TestBookieImpl for use in tests which has a constructor that matches the one removed from BookieImpl. This is one of many preliminary PRs with refactorings required for the "BP-46 Running without journal" work. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
