Re: [cp-patches] [RFA/JDWP] ReferenceKey

2005-06-21 Thread Keith Seitz
On Mon, 2005-06-20 at 09:04 -0600, Tom Tromey wrote: > > "Keith" == Keith Seitz <[EMAIL PROTECTED]> writes: > > Keith> Unfortunately, with the WeakHashMap, there is no way to get the keys > put > Keith> into a ReferenceQueue (that I can see at least). Consequently, I'll > Keith> never know wh

Re: [cp-patches] [RFA/JDWP] ReferenceKey

2005-06-20 Thread Tom Tromey
> "Keith" == Keith Seitz <[EMAIL PROTECTED]> writes: Keith> Unfortunately, with the WeakHashMap, there is no way to get the keys put Keith> into a ReferenceQueue (that I can see at least). Consequently, I'll Keith> never know when to clean up the idTable unless I iterate over the table, Keith>

Re: [cp-patches] [RFA/JDWP] ReferenceKey

2005-06-19 Thread Archie Cobbs
Keith Seitz wrote: One minor snafu -- maybe someone sees a way around this. In order to facilitate the two types of needed lookups, we keep around the two tables I mentioned: oidTable maps from Object (ReferenceKey) to ObjectId idTable maps from Long (numerical ID) to ObjectId iodTable is used

Re: [cp-patches] [RFA/JDWP] ReferenceKey

2005-06-17 Thread Keith Seitz
On Fri, 2005-06-17 at 13:19 -0700, Keith Seitz wrote: > > - Could java.util.WeakHashMap be used instead of writing your own? > >See java.lang.VMString.intern() for an example. > > Yeah, that's a good question. Originally, I wrote this thing using a > Hashtable and SoftReferences, and the table

Re: [cp-patches] [RFA/JDWP] ReferenceKey

2005-06-17 Thread Keith Seitz
On Fri, 2005-06-17 at 14:47 -0500, Archie Cobbs wrote: > Coupla questions. Disclaimer: I haven't really been paying attention, > so ignore me if these are stupid irrelevant.. Nothing is irrelevant: I'm a Java newbie. > - Could java.util.WeakHashMap be used instead of writing your own? >See ja

Re: [cp-patches] [RFA/JDWP] ReferenceKey

2005-06-17 Thread Archie Cobbs
Keith Seitz wrote: Okay, here'e where the weirdness starts. The ID manager (not yet submitted) keeps a table which map objects to IDs. This is used to quickly lookup Objects to see if they have an ID associated with them already. The ReferenceKey class is a SoftReference class with some logic to

[cp-patches] [RFA/JDWP] ReferenceKey

2005-06-17 Thread Keith Seitz
Hi, Okay, here'e where the weirdness starts. The ID manager (not yet submitted) keeps a table which map objects to IDs. This is used to quickly lookup Objects to see if they have an ID associated with them already. The ReferenceKey class is a SoftReference class with some logic to allow the ID ma