Article View: borland.public.jbuilder.java.api
Article #510Re: Why Hashtable syncronized get() method?
From: Shankar Unni
Date: Mon, 14 Jul 2003 21:12
Date: Mon, 14 Jul 2003 21:12
9 lines
1563 bytes
1563 bytes
> Someone know why Hashtable.get() method is syncronized?. Because that's how it's always been. Hashtable is a 1.1-era class that's fully synchronized for access, and was retrofitted to the Collection interface for 1.2 and later. Likewise for Vector. Hash*Map* is the new JFC (1.2+) collection class that's unsynchronized by default (and you can synchronize it by wrapping it using Collections.synchronizedMap(map)). Vector's replacement is ArrayList.
Technical Details
Message-ID:
<3f131cea$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f12e93a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,72f3b0bad8fcf374 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-07-14 14:18:40 PST Date: Mon, 14 Jul 2003 14:12:54 -0700 From: Shankar Unni <shankar@cotagesoft.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (Compact) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api Subject: Re: Why Hashtable syncronized get() method? References: <3f12e93a@newsgroups.borland.com> In-Reply-To: <3f12e93a@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 64.165.207.59 Message-ID: <3f131cea$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058217194 64.165.207.59 (14 Jul 2003 14:13:14 -0700) Lines: 10 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail