S
ShadowMan
Hi all,
according to your opionion, what is the best way to configure a Singleton
through an external fileName.
I have two solutions:
- using a static method that configures a Singleton and return its instance
Example: Singleton singleton = Singleton.init(fileName);
- use a public (not static) method to call directly on instance
Example:
Singleton singleton = Singleton.getInstance();
singleton.init(fileName)
I have to use it on a clustered environment..
according to your opionion, what is the best way to configure a Singleton
through an external fileName.
I have two solutions:
- using a static method that configures a Singleton and return its instance
Example: Singleton singleton = Singleton.init(fileName);
- use a public (not static) method to call directly on instance
Example:
Singleton singleton = Singleton.getInstance();
singleton.init(fileName)
I have to use it on a clustered environment..