aspose file tools*
The moose likes Java in General and the fly likes Making a class synchronized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Making a class synchronized" Watch "Making a class synchronized" New topic
Author

Making a class synchronized

ragi singh
Ranch Hand

Joined: Mar 10, 2010
Posts: 198

hi all ,

can anyone elaborate as to how we can make a class synchronized.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

ragi singh wrote:hi all ,

can anyone elaborate as to how we can make a class synchronized.


Why would you want to synchronize a class? Are you talking about synchronizing the access to the class data/fields. There are lot of similar posts in this forum- Threads and Synchronization. And its the forum for all the Threads and Synchronization related queries.


Mohamed Sanaulla | My Blog
Nuwan Arambage
Ranch Hand

Joined: May 05, 2010
Posts: 76
right , there are several post out there to learn synchronization in java....
For you knowledge, as programmers we never think of synchronizing a whole class.

It is important to note that best practice is to synchronize the code of block you required since synchronization is a performance hit

Hope you understand.

regards ,
Nuwan Armabage


Thinker
Nuwan Arambage
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Making a class synchronized