Skip to content
Browse files

add TAP Opcodes for start/end checkpoint

Change-Id: Ic90fee141df1485ac55e6fdfc5a922f6a158803b
Reviewed-on: http://review.couchbase.org/13570
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
  • Loading branch information...
1 parent 4fd6985 commit 7cb614f27a3d05af0253e0ae846a738cdcf8c356 @mschoch mschoch committed with mikewied Feb 23, 2012
Showing with 17 additions and 2 deletions.
  1. +17 −2 src/main/java/net/spy/memcached/tapmessage/TapOpcode.java
View
19 src/main/java/net/spy/memcached/tapmessage/TapOpcode.java
@@ -71,7 +71,17 @@
* Defines a vBucket set message to set the state of a vBucket in the
* consumer.
*/
- VBUCKETSET((byte) 0x45);
+ VBUCKETSET((byte) 0x45),
+
+ /**
+ * Defines the start of a checkpoint
+ */
+ START_CHECKPOINT((byte) 0x46),
+
+ /**
+ * Defines the end of a checkpoint
+ */
+ END_CHECKPOINT((byte) 0x47);
/**
* The opcode value.
@@ -110,7 +120,12 @@ public static TapOpcode getOpcodeByByte(byte b) {
return TapOpcode.SASLLIST;
} else if (b == TapOpcode.VBUCKETSET.opcode) {
return TapOpcode.VBUCKETSET;
- } else {
+ } else if (b == TapOpcode.START_CHECKPOINT.opcode) {
+ return TapOpcode.START_CHECKPOINT;
+ } else if (b == TapOpcode.END_CHECKPOINT.opcode) {
+ return TapOpcode.END_CHECKPOINT;
+ }
+ else {
return null;
}
}

0 comments on commit 7cb614f

Please sign in to comment.
Something went wrong with that request. Please try again.