• Post Reply Bookmark Topic Watch Topic
  • New Topic

Enum Singleton queries  RSS feed

 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enum Singleton are considered to be one of the best implementation of Singleton design pattern.
I want to know whether
a. How does Enum singleton provides thread safety ?
a. How does Enum singleton provides safety against Serialization process ?
a. How does Enum singleton provides safety against Reflection process ?
a. How does Enum singleton provides safety against Cloning process ?

Thanks
Abhay Agarwal
 
fred rosenberger
lowercase baba
Bartender
Posts: 12562
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
with over a thousand posts, you should know we generally don't just spit out answers. We expect you to make some effort yourself. Have you tried searching for the answers to these questions? What have you found? What do YOU think the answers are?
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer to one of those questions is "it doesn't". I'll let you figure out which one.
For one of the questions, the provided safety is only partial.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!