DESCRIPTION

Added getl operation

Getl works with both ascii and binary. Unit test will be added in a future commit
but this code has been tested thoughly.

Change-Id: I9859d8e3752c519bd0bcf67009a0a3999f5cbbf2


COMMENTS

author: Kenny Maynard
date: 2011-06-05 03:18:02.930000000

Uploaded patch set 3.

-------------------------------------
author: Kenny Maynard
date: 2011-06-05 03:20:18.869000000

Patch Set 3: Verified

Fixed Blair's comments

-------------------------------------
author: Noah Dean
date: 2011-06-05 07:42:06.487000000

Patch Set 3: Looks good to me, but someone else must approve

(2 inline comments)

I think it's mostly OK.  I'd like to know if we can make something just a bit better there, not a big deal otherwise.  I do think the (new Integer()) thing can be done better.

Line:115, src/main/java/net/spy/memcached/protocol/ascii/BaseGetOpImpl.java -> The nested class cast exception capture for flow control seems bad.  Even though I started it, can we see if there's a better way?

Line:158, src/main/java/net/spy/memcached/protocol/ascii/BaseGetOpImpl.java -> byte[] e = KeyUtil.getKeyBytes(String.valueOf(exp));

-------------------------------------
author: Andreas Short
date: 2011-06-05 17:53:12.087000000

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

(2 inline comments)

Looks good overall.  I agree with Dustin on the ClassCastException thing, but I say fix it in the future, not now.

My only reason for a -1 here is that just a few more words would save people a lot of hassle.  They can probably assume the unit is seconds, but have no idea what the default max is.

Also, is there more here we should be doing to guard against generating traffic with things that don't make sense?  The server always needs to validate, but the client can do so faster.

Line:993, src/main/java/net/spy/memcached/MemcachedClient.java -> Range and units should be documented.  Integer wouldn't tell me much.  The javadoc should tell me what the default max on the server is.

Line:13, src/main/java/net/spy/memcached/protocol/ascii/GetlOperationImpl.java -> maybe I missed it, but I don't see anywhere in the heirarchy a guard against an unreasonable expiration.  I think getl is tunable on the server side, but we can probably enforce the default here without sending anything over the network.

-------------------------------------
author: Kenny Maynard
date: 2011-06-05 20:10:25.679000000

Patch Set 3: (1 inline comment)



Line:13, src/main/java/net/spy/memcached/protocol/ascii/GetlOperationImpl.java -> I disagree on having a guard here. As you mentioned the default timeout is configurable so it wouldn't make sense to decide the max timeout is always 30 seconds. Also, setting the timeout greater than 30 seconds isn't an error. The server automatically resets the timeout to 30 seconds. Maybe a warning log message here would be useful?

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