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
I'm trying to write a Builder pattern for PipelineIteration to make it flexible. I'd need to do injector.getInstance() for other dependencies of the class (Not sure if there's another cleaner approach). Is keeping a static reference to the injector in WorkhorseFactory a good approach for this? (Something like https://gist.github.com/Sanrag/5dfb106e89a4c4c54891 )
The text was updated successfully, but these errors were encountered:
Can you explain the underlying need for this change? It'd help me understand what to propose. Alternatively, have you looked up "Guice factory" with scoping for common patterns? Alternatively, there is assisted injection which can build scoped factories. Not sure this helps, but maybe? Assuming the scoping works, I presume the factory approach will be fine.
I'm trying to make PipelineIteration flexible, so that you can choose what stages to execute depending on what you are tuning. However, to build an instance of PipelineIteration, you need some additional instances too - like PipelineSynchronizer and MetricExporter. I'm trying to find the best way to get them to the Builder class.
I'm trying to write a Builder pattern for PipelineIteration to make it flexible. I'd need to do injector.getInstance() for other dependencies of the class (Not sure if there's another cleaner approach). Is keeping a static reference to the injector in WorkhorseFactory a good approach for this? (Something like https://gist.github.com/Sanrag/5dfb106e89a4c4c54891 )
The text was updated successfully, but these errors were encountered: