DESCRIPTION

Add a configuration provider for bucket updates.

Change-Id: I202aa38d5c600f1e40febca02f303398a4600977


COMMENTS

author: Andreas Short
date: 2011-06-07 04:34:41.074000000

Uploaded patch set 5.

-------------------------------------
author: Asher Vang
date: 2011-06-07 06:48:41.659000000

Patch Set 5: Looks good to me, approved

Could need some cleanup, but let's do that as part of the overhaul..

-------------------------------------
author: Noah Dean
date: 2011-06-07 07:23:39.135000000

Patch Set 5: I would prefer that you didn't submit this

(8 inline comments)

There's something kind of strange floating in the pool.

Line:20, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Is it possible for this to change?

Line:22, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Is there a good reason to not pass in initial buckets here?

Line:40, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> I really think this should be removed.  It's dead code.

Line:20, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> This should be removed since it's dead code.

Line:23, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> I think it'd be good for this to by properly typed just to be consistent.

    private final AtomicReference<Map<String, Bucket>> currentBuckets =
        new AtomicReference<Map<String, Bucket>>();

Line:53, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> This can never be null (yay final!).  Realizing this should probably be currentBuckets.get(), I think it's better to just not ever have this object enter an invalid state so we don't need such checks.

Line:60, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> return Collections.<String, Bucket>unmodifiableMap(currentBuckets.get());

Line:72, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Should type this HashMap, too.  Java makes you type a lot or gives warnings.

-------------------------------------
author: Andreas Short
date: 2011-06-07 22:31:30.519000000

Patch Set 5: (8 inline comments)



Line:20, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> no

Line:22, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> The original code was trying to isolate the "finding of the buckets" to one place.  It could probably be redone.  Leaving this for now.

Line:40, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Done

Line:20, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Done

Line:23, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Done

Line:53, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Filing a bug on this one and the previous.

Line:60, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Done

Line:72, src/main/java/net/spy/memcached/vbucket/config/Pool.java -> Done

-------------------------------------
