jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes thread safe class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "thread safe class " Watch "thread safe class " New topic
Author

thread safe class

Shrawan Bhageria
Ranch Hand

Joined: Jun 20, 2005
Posts: 52
Dear All,

Please let me know

How i make class thread Safe like Vector class.

Regards,

Sharwan
Burkhard Hassel
Ranch Hand

Joined: Aug 25, 2006
Posts: 1274
Hi cowboys,


you have to synchronize all methods that manipulate members of that class.
But this is only a very brief answer, your question implies to much to be answered in a forum in my opinion.
Have a look at CHAPTER 17
Threads and Locks
of the language specification:
http://java.sun.com/docs/books/jls/second_edition/html/memory.doc.html#30206

Yours,
Bu.


all events occur in real time
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: thread safe class