diff --git a/src/main/java/net/spy/memcached/MemcachedConnection.java b/src/main/java/net/spy/memcached/MemcachedConnection.java index a7286eab7..9c551472b 100644 --- a/src/main/java/net/spy/memcached/MemcachedConnection.java +++ b/src/main/java/net/spy/memcached/MemcachedConnection.java @@ -1153,9 +1153,9 @@ public CountDownLatch broadcastOperation(final BroadcastOpFactory of, final CountDownLatch latch=new CountDownLatch(locator.getAll().size()); for(MemcachedNode node : nodes) { Operation op = of.newOp(node, latch); + op.setHandlingNode(node); op.initialize(); node.addOp(op); - op.setHandlingNode(node); addedQueue.offer(node); } Selector s=selector.wakeup(); diff --git a/src/main/java/net/spy/memcached/MemcachedNode.java b/src/main/java/net/spy/memcached/MemcachedNode.java index 534537355..9aff33d88 100644 --- a/src/main/java/net/spy/memcached/MemcachedNode.java +++ b/src/main/java/net/spy/memcached/MemcachedNode.java @@ -199,6 +199,11 @@ public interface MemcachedNode { */ boolean enabledMGetOp(); + /** + * Check the enable SpaceSeparate operation. + */ + boolean enabledSpaceSeparate(); + /** * Get the number of bytes remaining to write. */ diff --git a/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java b/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java index 23065a021..a7f7a6e17 100644 --- a/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java +++ b/src/main/java/net/spy/memcached/MemcachedNodeROImpl.java @@ -149,6 +149,10 @@ public void setSk(SelectionKey to) { public boolean enabledMGetOp() { throw new UnsupportedOperationException(); } + public boolean enabledSpaceSeparate() { + throw new UnsupportedOperationException(); + } + public void setupResend(boolean cancelWrite, String cause) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/net/spy/memcached/collection/BTreeGetBulk.java b/src/main/java/net/spy/memcached/collection/BTreeGetBulk.java index 45ebc26c0..0d0c35cc6 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeGetBulk.java +++ b/src/main/java/net/spy/memcached/collection/BTreeGetBulk.java @@ -19,7 +19,9 @@ import java.util.List; public interface BTreeGetBulk { - + + public void setKeySeparator(String keySeparator); + public String getSpaceSeparatedKeys(); public String getRepresentKey(); diff --git a/src/main/java/net/spy/memcached/collection/BTreeGetBulkImpl.java b/src/main/java/net/spy/memcached/collection/BTreeGetBulkImpl.java index 899373053..0c4a2c641 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeGetBulkImpl.java +++ b/src/main/java/net/spy/memcached/collection/BTreeGetBulkImpl.java @@ -25,6 +25,7 @@ public abstract class BTreeGetBulkImpl implements BTreeGetBulk { private static final String command = "bop mget"; + private String keySeparator; private String spaceSeparatedKeys; protected String str; @@ -67,6 +68,10 @@ protected BTreeGetBulkImpl(List keyList, long from, long to, this.reverse = (from > to); } + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } + public String getSpaceSeparatedKeys() { if (spaceSeparatedKeys != null) { return spaceSeparatedKeys; @@ -77,7 +82,7 @@ public String getSpaceSeparatedKeys() { for (int i = 0; i < numkeys; i++) { sb.append(keyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); diff --git a/src/main/java/net/spy/memcached/collection/BTreeSMGet.java b/src/main/java/net/spy/memcached/collection/BTreeSMGet.java index b7d16eaa7..aa226835a 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeSMGet.java +++ b/src/main/java/net/spy/memcached/collection/BTreeSMGet.java @@ -21,7 +21,9 @@ public interface BTreeSMGet { public int headerCount = 4; - + + public void setKeySeparator(String keySeparator); + public String getSpaceSeparatedKeys(); public String getRepresentKey(); diff --git a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkey.java b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkey.java index 0752236f0..6813743ae 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkey.java +++ b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkey.java @@ -29,6 +29,7 @@ public class BTreeSMGetWithByteTypeBkey implements BTreeSMGet { protected String str; protected List keyList; + private String keySeparator; private String spaceSeparatedKeys; protected int lenKeys; @@ -59,6 +60,10 @@ public BTreeSMGetWithByteTypeBkey(List keyList, byte[] from, this.smgetMode = smgetMode; this.reverse = BTreeUtil.compareByteArraysInLexOrder(from, to) > 0; } + + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } public String getSpaceSeparatedKeys() { if (spaceSeparatedKeys != null) { @@ -70,7 +75,7 @@ public String getSpaceSeparatedKeys() { for (int i = 0; i < numkeys; i++) { sb.append(keyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); diff --git a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkeyOld.java b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkeyOld.java index 1c0cfb7d3..105b73f37 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkeyOld.java +++ b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithByteTypeBkeyOld.java @@ -28,6 +28,7 @@ public class BTreeSMGetWithByteTypeBkeyOld implements BTreeSMGet { protected String str; protected List keyList; + private String keySeparator; private String spaceSeparatedKeys; protected int lenKeys; @@ -57,6 +58,10 @@ public BTreeSMGetWithByteTypeBkeyOld(List keyList, byte[] from, this.count = count; this.reverse = BTreeUtil.compareByteArraysInLexOrder(from, to) > 0; } + + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } public String getSpaceSeparatedKeys() { if (spaceSeparatedKeys != null) { @@ -68,7 +73,7 @@ public String getSpaceSeparatedKeys() { for (int i = 0; i < numkeys; i++) { sb.append(keyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); diff --git a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkey.java b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkey.java index 0071e6614..02406172e 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkey.java +++ b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkey.java @@ -29,6 +29,7 @@ public class BTreeSMGetWithLongTypeBkey implements BTreeSMGet { protected String str; protected List keyList; + private String keySeparator; private String spaceSeparatedKeys; protected int lenKeys; @@ -62,7 +63,11 @@ public BTreeSMGetWithLongTypeBkey(List keyList, long from, long to, this.smgetMode = smgetMode; this.reverse = (from > to); } - + + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } + public String getSpaceSeparatedKeys() { if (spaceSeparatedKeys != null) { return spaceSeparatedKeys; @@ -73,7 +78,7 @@ public String getSpaceSeparatedKeys() { for (int i = 0; i < numkeys; i++) { sb.append(keyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); diff --git a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkeyOld.java b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkeyOld.java index 6507b9503..251bffbce 100644 --- a/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkeyOld.java +++ b/src/main/java/net/spy/memcached/collection/BTreeSMGetWithLongTypeBkeyOld.java @@ -28,6 +28,7 @@ public class BTreeSMGetWithLongTypeBkeyOld implements BTreeSMGet { protected String str; protected List keyList; + private String keySeparator; private String spaceSeparatedKeys; protected int lenKeys; @@ -60,7 +61,11 @@ public BTreeSMGetWithLongTypeBkeyOld(List keyList, long from, long to, this.count = count; this.reverse = (from > to); } - + + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } + public String getSpaceSeparatedKeys() { if (spaceSeparatedKeys != null) { return spaceSeparatedKeys; @@ -71,7 +76,7 @@ public String getSpaceSeparatedKeys() { for (int i = 0; i < numkeys; i++) { sb.append(keyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); diff --git a/src/main/java/net/spy/memcached/collection/MapDelete.java b/src/main/java/net/spy/memcached/collection/MapDelete.java index a838d1685..3de75188c 100644 --- a/src/main/java/net/spy/memcached/collection/MapDelete.java +++ b/src/main/java/net/spy/memcached/collection/MapDelete.java @@ -22,17 +22,13 @@ public class MapDelete extends CollectionDelete { private static final String command = "mop delete"; protected List mkeyList; + private String keySeparator; private String spaceSeparatedKeys; protected byte[] additionalArgs; public MapDelete(List mkeyList, boolean noreply) { this.mkeyList = mkeyList; this.noreply = noreply; - if (mkeyList.size() == 0) { - this.additionalArgs = null; - } else { - this.additionalArgs = getSpaceSeparatedMkeys().getBytes(); - } } public MapDelete(List mkeyList, boolean noreply, boolean dropIfEmpty) { @@ -40,6 +36,10 @@ public MapDelete(List mkeyList, boolean noreply, boolean dropIfEmpty) { this.dropIfEmpty = dropIfEmpty; } + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } + public String getSpaceSeparatedMkeys() { if (spaceSeparatedKeys != null) { return spaceSeparatedKeys; @@ -50,7 +50,7 @@ public String getSpaceSeparatedMkeys() { for (int i = 0; i < numkeys; i++) { sb.append(mkeyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); @@ -64,6 +64,12 @@ public byte[] getAdditionalArgs() { public String stringify() { if (str != null) return str; + if (mkeyList.size() == 0) { + additionalArgs = null; + } else { + additionalArgs = getSpaceSeparatedMkeys().getBytes(); + } + StringBuilder b = new StringBuilder(); if (additionalArgs == null) { b.append("0"); diff --git a/src/main/java/net/spy/memcached/collection/MapGet.java b/src/main/java/net/spy/memcached/collection/MapGet.java index 23c43d54d..b1e24e92c 100644 --- a/src/main/java/net/spy/memcached/collection/MapGet.java +++ b/src/main/java/net/spy/memcached/collection/MapGet.java @@ -24,6 +24,7 @@ public class MapGet extends CollectionGet { protected List mkeyList; protected byte[] data; + private String keySeparator; private String spaceSeparatedKeys; protected byte[] additionalArgs; @@ -31,11 +32,6 @@ public MapGet(List mkeyList, boolean delete) { this.headerCount = 2; this.mkeyList = mkeyList; this.delete = delete; - if (mkeyList.size() == 0) { - this.additionalArgs = null; - } else { - this.additionalArgs = getSpaceSeparatedMkeys().getBytes(); - } } public MapGet(List mkeyList, boolean delete, boolean dropIfEmpty) { @@ -43,6 +39,10 @@ public MapGet(List mkeyList, boolean delete, boolean dropIfEmpty) { this.dropIfEmpty = dropIfEmpty; } + public void setKeySeparator(String keySeparator) { + this.keySeparator = keySeparator; + } + public String getSpaceSeparatedMkeys() { if (spaceSeparatedKeys != null) { return spaceSeparatedKeys; @@ -53,7 +53,7 @@ public String getSpaceSeparatedMkeys() { for (int i = 0; i < numkeys; i++) { sb.append(mkeyList.get(i)); if ((i + 1) < numkeys) { - sb.append(" "); + sb.append(keySeparator); } } spaceSeparatedKeys = sb.toString(); @@ -68,6 +68,12 @@ public byte[] getAddtionalArgs() { public String stringify() { if (str != null) return str; + if (mkeyList.size() == 0) { + additionalArgs = null; + } else { + additionalArgs = getSpaceSeparatedMkeys().getBytes(); + } + StringBuilder b = new StringBuilder(); if (additionalArgs == null) { b.append("0"); diff --git a/src/main/java/net/spy/memcached/protocol/TCPMemcachedNodeImpl.java b/src/main/java/net/spy/memcached/protocol/TCPMemcachedNodeImpl.java index 6d7c32cc2..98a50117c 100644 --- a/src/main/java/net/spy/memcached/protocol/TCPMemcachedNodeImpl.java +++ b/src/main/java/net/spy/memcached/protocol/TCPMemcachedNodeImpl.java @@ -68,6 +68,7 @@ public abstract class TCPMemcachedNodeImpl extends SpyObject private String version=null; private boolean isAsciiProtocol=true; private boolean enabledMGetOp=false; + private boolean enabledSpaceSeparate = false; // operation Future.get timeout counter private final AtomicInteger continuousTimeout = new AtomicInteger(0); @@ -555,6 +556,7 @@ public final SelectionKey getSk() { public final void setVersion(String vr) { version = vr; setEnableMGetOp(); + setEnableSpaceSeparate(); } /* (non-javadoc) @@ -578,11 +580,34 @@ private final void setEnableMGetOp() { } } + + /* (non-javadoc) + * @see net.spy.memcached.MemcachedNode#setEnableSpaceSeparate(java.lang.Boolean) + */ + private final void setEnableSpaceSeparate() { + if (isAsciiProtocol) { + StringTokenizer tokens = new StringTokenizer(version, "."); + int majorVersion = Integer.parseInt(tokens.nextToken()); + int minorVersion = Integer.parseInt(tokens.nextToken()); + if (version.contains("E")) { + enabledSpaceSeparate = (majorVersion > 0 || (majorVersion == 0 && minorVersion > 6)); + } else { + enabledSpaceSeparate = (majorVersion > 1 || (majorVersion == 1 && minorVersion > 10)); + } + } + } + /* (non-javadoc) * @see net.spy.memcached.MemcachedNode#enabledMGetOp() */ public final boolean enabledMGetOp() { return enabledMGetOp; } + + /* (non-javadoc) + * @see net.spy.memcached.MemcachedNode#enabledSpaceSeparate() + */ + public final boolean enabledSpaceSeparate() { return enabledSpaceSeparate; } + /* (non-Javadoc) * @see net.spy.memcached.MemcachedNode#getBytesRemainingInBuffer() */ @@ -757,13 +782,13 @@ private BlockingQueue getAllOperations() { public void addAllOpToInputQ(BlockingQueue allOp) { for (Operation op : allOp) { + op.setHandlingNode(this); if (op.getState() == OperationState.WRITING && op.getBuffer() != null) { op.getBuffer().reset(); // buffer offset reset } else { op.initialize(); // write completed or not yet initialized op.resetState(); // reset operation state } - op.setHandlingNode(this); op.setMoved(true); } addOpCount += allOp.size(); diff --git a/src/main/java/net/spy/memcached/protocol/ascii/BTreeGetBulkOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/BTreeGetBulkOperationImpl.java index 851f2659a..fe2cda8df 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/BTreeGetBulkOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/BTreeGetBulkOperationImpl.java @@ -225,6 +225,11 @@ private final void readValue(ByteBuffer bb) { public void initialize() { String cmd = getBulk.getCommand(); + if (getHandlingNode() == null || getHandlingNode().enabledSpaceSeparate()) { + getBulk.setKeySeparator(" "); + } else { + getBulk.setKeySeparator(","); + } String args = getBulk.stringify(); ByteBuffer bb = ByteBuffer.allocate(cmd.length() + args.length() diff --git a/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationImpl.java index 6587d2411..fe9c1d850 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationImpl.java @@ -382,6 +382,11 @@ else if (smGet instanceof BTreeSMGetWithByteTypeBkey) public void initialize() { String cmd = smGet.getCommand(); + if (getHandlingNode() == null || getHandlingNode().enabledSpaceSeparate()) { + smGet.setKeySeparator(" "); + } else { + smGet.setKeySeparator(","); + } String args = smGet.stringify(); ByteBuffer bb = ByteBuffer.allocate(cmd.length() + args.length() diff --git a/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationOldImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationOldImpl.java index 3eb3f4a4d..702cd2b8b 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationOldImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/BTreeSortMergeGetOperationOldImpl.java @@ -279,6 +279,11 @@ private final void readMissedKeys(ByteBuffer bb) { public void initialize() { String cmd = smGet.getCommand(); + if (getHandlingNode() == null || getHandlingNode().enabledSpaceSeparate()) { + smGet.setKeySeparator(" "); + } else { + smGet.setKeySeparator(","); + } String args = smGet.stringify(); ByteBuffer bb = ByteBuffer.allocate(cmd.length() + args.length() diff --git a/src/main/java/net/spy/memcached/protocol/ascii/CollectionDeleteOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/CollectionDeleteOperationImpl.java index fa76b914d..9521cf3dc 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/CollectionDeleteOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/CollectionDeleteOperationImpl.java @@ -99,6 +99,14 @@ assert getState() == OperationState.READING @Override public void initialize() { String cmd = collectionDelete.getCommand(); + if (collectionDelete instanceof MapDelete) { + MapDelete mapDelete = (MapDelete)collectionDelete; + if (getHandlingNode() == null || getHandlingNode().enabledSpaceSeparate()) { + mapDelete.setKeySeparator(" "); + } else { + mapDelete.setKeySeparator(","); + } + } String args = collectionDelete.stringify(); byte[] additionalArgs = collectionDelete.getAdditionalArgs(); diff --git a/src/main/java/net/spy/memcached/protocol/ascii/CollectionGetOperationImpl.java b/src/main/java/net/spy/memcached/protocol/ascii/CollectionGetOperationImpl.java index ac392ef78..7272e00c3 100644 --- a/src/main/java/net/spy/memcached/protocol/ascii/CollectionGetOperationImpl.java +++ b/src/main/java/net/spy/memcached/protocol/ascii/CollectionGetOperationImpl.java @@ -232,6 +232,14 @@ public final void handleRead(ByteBuffer bb) { public void initialize() { String cmd = collectionGet.getCommand(); + if (collectionGet instanceof MapGet) { + MapGet mapGet = (MapGet)collectionGet; + if (getHandlingNode() == null || getHandlingNode().enabledSpaceSeparate()) { + mapGet.setKeySeparator(" "); + } else { + mapGet.setKeySeparator(","); + } + } String args = collectionGet.stringify(); byte[] additionalArgs = collectionGet.getAddtionalArgs(); diff --git a/src/test/java/net/spy/memcached/MockMemcachedNode.java b/src/test/java/net/spy/memcached/MockMemcachedNode.java index c8023c5e5..3274df195 100644 --- a/src/test/java/net/spy/memcached/MockMemcachedNode.java +++ b/src/test/java/net/spy/memcached/MockMemcachedNode.java @@ -114,6 +114,9 @@ public void setVersion(String vr) { } public String getVersion() {return null;} public boolean enabledMGetOp() {return false;} + public boolean enabledSpaceSeparate() { + return false; + } public int getBytesRemainingToWrite() {return 0;} public int writeSome() throws IOException {return 0;} public void fixupOps() { diff --git a/src/test/manual/net/spy/memcached/emptycollection/ProtocolMapDeleteTest.java b/src/test/manual/net/spy/memcached/emptycollection/ProtocolMapDeleteTest.java index eb5bdc56c..6a79581d8 100644 --- a/src/test/manual/net/spy/memcached/emptycollection/ProtocolMapDeleteTest.java +++ b/src/test/manual/net/spy/memcached/emptycollection/ProtocolMapDeleteTest.java @@ -34,30 +34,41 @@ public void testStringfy() { mkeyList2.add("mkey2"); // default setting : dropIfEmpty = true - Assert.assertEquals("4 1 drop", - (new MapDelete(mkeyList, false)).stringify()); - - Assert.assertEquals("4 1", - (new MapDelete(mkeyList, false, false)).stringify()); - Assert.assertEquals("4 1 drop", - (new MapDelete(mkeyList, false, true)).stringify()); - - Assert.assertEquals("11 2", (new MapDelete(mkeyList2, false, - false)).stringify()); - Assert.assertEquals("11 2 drop", (new MapDelete(mkeyList2, - false, true)).stringify()); - - Assert.assertEquals("4 1 drop noreply", - (new MapDelete(mkeyList, true)).stringify()); - - Assert.assertEquals("4 1 noreply", (new MapDelete(mkeyList, true, - false)).stringify()); - Assert.assertEquals("4 1 drop noreply", (new MapDelete(mkeyList, - true, true)).stringify()); - - Assert.assertEquals("11 2 noreply", (new MapDelete(mkeyList2, - true, false)).stringify()); - Assert.assertEquals("11 2 drop noreply", (new MapDelete(mkeyList2, - true, true)).stringify()); + MapDelete mapDelete; + mapDelete = new MapDelete(mkeyList, false); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("4 1 drop", mapDelete.stringify()); + + mapDelete = new MapDelete(mkeyList, false, false); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("4 1", mapDelete.stringify()); + mapDelete = new MapDelete(mkeyList, false, true); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("4 1 drop", mapDelete.stringify()); + + mapDelete = new MapDelete(mkeyList2, false, false); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("11 2", mapDelete.stringify()); + mapDelete = new MapDelete(mkeyList2, false, true); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("11 2 drop", mapDelete.stringify()); + + mapDelete = new MapDelete(mkeyList, true); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("4 1 drop noreply", mapDelete.stringify()); + + mapDelete = new MapDelete(mkeyList, true, false); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("4 1 noreply", mapDelete.stringify()); + mapDelete = new MapDelete(mkeyList, true, true); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("4 1 drop noreply", mapDelete.stringify()); + + mapDelete = new MapDelete(mkeyList2, true, false); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("11 2 noreply", mapDelete.stringify()); + mapDelete = new MapDelete(mkeyList2, true, true); + mapDelete.setKeySeparator(" "); + Assert.assertEquals("11 2 drop noreply", mapDelete.stringify()); } } \ No newline at end of file