[SNMP4J] SNMP4J on Java.net!

Mathias Bogaert m.bogaert at memenco.com
Sun Apr 23 11:03:34 CEST 2006


Matthieu,

ConcurrentHashMap is good enough. I don't wanna add any other  
dependencies to SNMP4J. Just JDK 1.5. Thanks anyway for the info.

Cheers,

Mathias

On 22 Apr 2006, at 23:17, Matthieu Casanova wrote:

> I agree with you, ConcurrentHashMap are not synchronized maps, I  
> didn't check a lot how it works, but it seems really different.
> I don't think there would be a lot of differences between Hashtable  
> and Collections.synchronizedMap (new HashMap()).
> I don't know if it could be useful but there are some libraries  
> like trove4j that can take primitive types as key or value.
> And there is also a library http://javolution.org/ that has nice  
> concepts.
> Like a map that is not synchronized but can be use in multithread  
> environment if you use a lot of reading and few writing. In fact it  
> has a map that is not synchronized, and when you write into it, it  
> is simply recopied. I don't know if it could be useful for snmp4j  
> but this api could give some ideas
>
> Matthieu
>
> 2006/4/22, Mathias Bogaert <m.bogaert at memenco.com>:
> Frank,
>
> Test it for yourself. Actually, Collections.synchronizedMap(new
> HashMap()) has different semantics than ConcurrentHashMap, so beware.
>
> Cheers,
>
> Mathias
>
> On 21 Apr 2006, at 19:43, Frank Fock wrote:
>
> > Hi Mathias,
> >
> > 30% is a strong figure. Is this really the overall performance
> > improvement? I would guess that a speed improvement of about
> > 3% from Hashtable to ConcurrentHashMap would be a lot.
> > I thought SNMP4J does not spend that much time with Hashtables.
> >
> > If this is true, I should consider replacing Hashtable by
> > Collections.synchronizedMap(new HashMap()).
> >
> > Any comments?
> >
> > Best regards,
> > Frank
> >
> > Mathias Bogaert wrote:
> >> Yes,
> >> And the new concurrency API...I replaced Hashtable with
> >> ConcurrentHashMap
> >> and got 30% better troughput.
> >> Mathias
> >>> Hi, what the main thing that java 1.5 improve
> >>> Generics, autoboxing, annotations ? Something else ?
> >>>
> >>> Matthieu
> >>>
> >>> 2006/4/20, Mathias Bogaert < m.bogaert at memenco.com>:
> >>>> Guys,
> >>>>
> >>>> I've imported SNMP4J 1.7 in the Java.net subversion. The idea  
> is to
> >>>> move SNMP4J to JDK 1.5 with the help of the community.
> >>>>
> >>>> If anyone wants to contribute, please join the project.
> >>>>
> >>>> Cheers,
> >>>>
> >>>> Mathias
> >>>> _______________________________________________
> >>>> SNMP4J mailing list
> >>>> SNMP4J at agentpp.org
> >>>> http://lists.agentpp.org/mailman/listinfo/snmp4j
> >>>>
> >> _______________________________________________
> >> SNMP4J mailing list
> >> SNMP4J at agentpp.org
> >> http://lists.agentpp.org/mailman/listinfo/snmp4j
> >
> > --
> > AGENT++
> > http://www.agentpp.com
> > http://www.mibexplorer.com
> > http://www.mibdesigner.com
> >
> >
> >
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>




More information about the SNMP4J mailing list