DESCRIPTION

SPY-55: Add JMX support

Change-Id: Ibb2a31ebfa2dbcf18a2df7ea0d4a791dd73129f0


COMMENTS

author: Andreas Short
date: 2012-07-11 06:02:02.622000000

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

(7 inline comments)

Generally, this is pretty awesome.  

I have some nitpicks, some of which are performance related and in this case pretty important.  

There's also a class being added that doesn't seem to be used.

One awesome addition though, but maybe is hard to instrument, would be counting the number of times a connection is dropped.  It may also be useful to count the number of times a connection could not be established.  These would be really useful in many environments.

Line:39, src/main/java/net/spy/memcached/management/Stats.java -> minor, but should be volatile probably

Line:43, src/main/java/net/spy/memcached/management/Stats.java -> a long is only good enough for 29 million years of operations at 10k ops/s!  :)

Line:282, src/main/java/net/spy/memcached/MemcachedClient.java -> Why the change to final?  Doesn't hurt, but not really needed either.

Line:291, src/main/java/net/spy/memcached/MemcachedClient.java -> Since this is an enum comparison, a switch here would be faster and more memory efficient.  Leave the default in the switch to the set since it'll be the most common case.

This kind of thing is pretty important in these hot code paths.

Line:311, src/main/java/net/spy/memcached/MemcachedClient.java -> I presume added because of the one above, right?

Line:1701, src/main/java/net/spy/memcached/MemcachedClient.java -> At least for now, we don't need the second compare and jump.  It's really just an if/else needed.

Line:90, src/main/java/net/spy/memcached/management/OperationStatsImpl.java -> the get() resets them?

-------------------------------------
author: Kenny Maynard
date: 2012-08-01 22:35:20.986000000

Patch Set 1: (7 inline comments)



Line:39, src/main/java/net/spy/memcached/management/Stats.java -> Will change this.

Line:43, src/main/java/net/spy/memcached/management/Stats.java -> I can make it an atomic int if you think that would be better.

Line:282, src/main/java/net/spy/memcached/MemcachedClient.java -> StoreType is part of an inner class so it needs to be final here.

Line:291, src/main/java/net/spy/memcached/MemcachedClient.java -> I will double check this, but I think Java simply wouldn't let me do a switch-case here.

Line:311, src/main/java/net/spy/memcached/MemcachedClient.java -> Yes, this is added because of the one above.

Line:1701, src/main/java/net/spy/memcached/MemcachedClient.java -> I will change this.

Line:90, src/main/java/net/spy/memcached/management/OperationStatsImpl.java -> This is also wrong and I will fix this.

-------------------------------------
author: Kenny Maynard
date: 2013-06-13 20:21:49.977000000

Patch Set 1: Abandoned

Natasha Sullivan is already working on another version of this so I am going to abandon this change.

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