On Mon, Dec 19, 2011 at 9:22 AM, Charles Oliver Nutter
<head...@headius.com> wrote:
> 2. AbstractRubyHash
>
> This is the long-talked-about refactoring of RubyHash into an abstract
> half and an implementation half.
>
> The experiment is here: https://github.com/headius/jruby/tree/abstract_hash
>
> It does not yet compile, but it creates a new abstract class
> AbstractRubyHash that contains nearly all the Ruby-facing logic.
> RubyHash then extends that and implements a set of abstract methods
> for our current Hash implementation.
>
> Once made to compile, this could be the basis for a set of
> Hash-lookalike classes that wrap any java.util.Map class, such as
> ConcurrentHashMap. That would be very powerful.


AbstractRubyHash looks good. Once this implementation comes in,
MapJavaProxy class can have much simpler implementation.

More than that, how do you think about changing RubyHashEntry class

    public static final class RubyHashEntry implements Map.Entry {
    ...
    }

to ConcurrentLikedQueue<Map.Entry> or other classes of concurrent
package? I can't say anything about performance at this moment, but at
least thread safety will get better.

-Yoko

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to