Design Patterns
Singleton:One Instance, Used Carefully
Keep a process-wide resource as an enum singleton only when you can name why there must be one, and inject Clock, config, and gateways into OrderProcessor instead of AppContext.getInstance().
Read More