DESCRIPTION

Added Sync Command

The sync command allow the user of spymemcached to test to see
whether or not an item has been persisted to disk. It is also
capable of checking to see if an item has been replicated to a
given number of servers and to see if the item has been mutated

Change-Id: Ie875c3d1a590037251f7112e8b93d7734dd6a7b1


COMMENTS

author: Kenny Maynard
date: 2011-06-17 02:27:16.309000000

Uploaded patch set 6.

-------------------------------------
author: Andreas Short
date: 2011-07-09 23:48:46.706000000

Patch Set 6: Do not submit

(12 inline comments)

I'll leave it to you on whether or not the refactoring out of common code should be done now, but at least some of the logging and bits in the OperationImpl need to be corrected for now.

I'm not stressing on the formatting too much, but it is a bit inconsistent.

Line:83, src/main/java/net/spy/memcached/protocol/ascii/AsciiOperationFactory.java -> "ASCII protocol"

Line:1773, src/main/java/net/spy/memcached/MemcachedClient.java -> Funny formatting here, no space after =?

Line:1779, src/main/java/net/spy/memcached/MemcachedClient.java -> inconsistent formatting here.  I won't sweat it just yet, but ...

Line:1782, src/main/java/net/spy/memcached/MemcachedClient.java -> this whole separating a collection into nodes is a common pattern we should extract to something.  :/

Line:1813, src/main/java/net/spy/memcached/MemcachedClient.java -> unsuccessful get?  Is that really what you want to warn about?

Line:1826, src/main/java/net/spy/memcached/MemcachedClient.java -> So much common code with getBulk().  No way to reuse?

Line:24, src/main/java/net/spy/memcached/protocol/binary/SyncOperationImpl.java -> This is pretty inefficient.  Near as I can tell, this is really array access, but every SyncOperationImpl will have it's own copy of a hashmap of integers of status containing a bool and a string.  The JVM will optimize away some of this, but still.

Line:128, src/main/java/net/spy/memcached/protocol/binary/SyncOperationImpl.java -> trailing whitespace.

Line:134, src/main/java/net/spy/memcached/protocol/binary/SyncOperationImpl.java -> We create all the possible OperationStatus objects, just to return one of them?

Better to have a private factory method which takes the int and switches on it?

Line:2, src/main/java/net/spy/memcached/internal/SyncRequest.java -> I know these are just generic accessors, but at least the class could use some javadoc.

Line:14, src/main/java/net/spy/memcached/internal/SyncRequest.java -> inconsistent formatting

Line:5, src/main/java/net/spy/memcached/internal/SyncResponse.java -> Again, the class could use some javadoc.

-------------------------------------
author: Kenny Maynard
date: 2011-07-12 22:34:15.074000000

Patch Set 6: (10 inline comments)



Line:83, src/main/java/net/spy/memcached/protocol/ascii/AsciiOperationFactory.java -> Done

Line:1773, src/main/java/net/spy/memcached/MemcachedClient.java -> Done

Line:1782, src/main/java/net/spy/memcached/MemcachedClient.java -> I'd rather leave things like this and refactor later.

Line:1813, src/main/java/net/spy/memcached/MemcachedClient.java -> This is how it is done in bulkGet

Line:24, src/main/java/net/spy/memcached/protocol/binary/SyncOperationImpl.java -> Gone.

Line:128, src/main/java/net/spy/memcached/protocol/binary/SyncOperationImpl.java -> Done

Line:134, src/main/java/net/spy/memcached/protocol/binary/SyncOperationImpl.java -> Switching now done here.

Line:2, src/main/java/net/spy/memcached/internal/SyncRequest.java -> Done

Line:14, src/main/java/net/spy/memcached/internal/SyncRequest.java -> Done

Line:5, src/main/java/net/spy/memcached/internal/SyncResponse.java -> Done

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