public void visit(Command command) {
// Encode prev command
if (this.prevCommand != null) {
// first n-1 send setq command
BinaryStoreCommand setqCmd = new BinaryStoreCommand(
this.prevCommand.getKey(), this.prevCommand.getKeyBytes(),
CommandType.SET, null, this.prevCommand.getExpTime(),
this.prevCommand.getCas(),
// set noreply to be true
this.prevCommand.getValue(), true,
this.prevCommand.getTranscoder());
// We must set the opaque to get error message.
int opaque = OpaqueGenerater.getInstance().getNextValue();
setqCmd.setOpaque(opaque);
setqCmd.encode();
this.totalBytes += setqCmd.getIoBuffer().remaining();
this.bufferList.add(setqCmd.getIoBuffer());
// GC friendly
setqCmd.setIoBuffer(MemcachedHandler.EMPTY_BUF);
setqCmd.setValue(null);
this.prevCommand.setValue(null);
this.prevCommand.setIoBuffer(MemcachedHandler.EMPTY_BUF);
if (this.mergeCommands == null) {
this.mergeCommands = new HashMap<Object, Command>();
}