// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/ClientException.java
// public class ClientException extends Exception {
//   private static final long serialVersionUID = -7032182229500031385L;
// 
//   public ClientException() {
//     super();
//   }
// 
//   public ClientException(Throwable cause) {
//     super(cause);
//   }
// 
//   public ClientException(String reason) {
//     super(reason);
//   }
// 
//   public ClientException(String reason, Throwable cause) {
//     super(reason, cause);
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/Connection.java
// public class Connection {
//   public Socket sock;
// 
//   public ExtInputStream in;
// 
//   public OutputStream out;
// 
//   /**
//    * Construct a connection to a ROMA process.
//    * 
//    * @param sock
//    *          - a socket of the ROMA process to connect to
//    * @throws IOException
//    *           - if creating this connection fails
//    */
//   public Connection(final Socket sock) throws IOException {
//     this.sock = sock;
//     this.in = new ExtInputStream(sock.getInputStream());
//     this.out = new BufferedOutputStream(sock.getOutputStream());
//   }
// 
//   public void setTimeout(int timeout) throws SocketException {
// 	  this.sock.setSoTimeout(timeout);
//   }
//   
//   /**
//    * Close this connection.
//    * 
//    * @throws IOException
//    *           - if closing this connection fails
//    */
//   public void close() throws IOException {
//     if (in != null) {
//       in.close();
//     }
//     if (out != null) {
//       out.close();
//     }
//     if (sock != null) {
//       sock.close();
//     }
//   }
// 
//   public static long TIME = 0;
// 
//   public class ExtInputStream extends BufferedInputStream {
// 
//     private byte[] one_byte = new byte[1];
// 
//     ExtInputStream(InputStream in) {
//       super(in);
//     }
// 
//     public void read(int byteLen) throws IOException {
//       for (int i = 0; i < byteLen; ++i) {
//         super.read(one_byte);
//       }
//     }
// 
//     public String readLine() throws IOException {
//       StringBuilder ret = new StringBuilder();
// 
//       long t = System.currentTimeMillis();
// 
//       while (super.read(one_byte) > 0) {
//         if (one_byte[0] == 0x0d) { // \r
//           break;
//         } else {
//           ret.append((char) one_byte[0]);
//         }
//       }
// 
//       TIME = TIME + (System.currentTimeMillis() - t);
// 
//       super.read(one_byte); // \n
//       return ret.toString();
//     }
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/AbstractCommand.java
// public abstract class AbstractCommand implements Command, CommandID {
//   protected Command next;
// 
//   protected AbstractCommand() {
//     this(null);
//   }
// 
//   protected AbstractCommand(Command next) {
//     this.next = next;
//   }
// 
//   public boolean execute(CommandContext context) throws ClientException {
//     try {
//       StringBuilder sb = new StringBuilder();
//       context.put(CommandContext.STRING_DATA, sb);
//       create(context);
//       sendAndReceive(context);
//       return parseResult(context);
//     } catch (IOException e) {
//       throw new ClientException(e);
//     }
//   }
// 
//   protected abstract void create(CommandContext context) throws ClientException;
// 
//   protected abstract void sendAndReceive(CommandContext context)
//       throws IOException, ClientException;
// 
//   protected abstract boolean parseResult(CommandContext context)
//       throws ClientException;
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/CommandContext.java
// public class CommandContext extends HashMap<String, Object> {
//   private static final long serialVersionUID = 3317922575242590794L;
//   public static final String COMMAND_ID = "COMMAND_ID";
//   public static final String RESULT = "RESULT";
//   public static final String CONNECTION = "CONNECTION";
//   public static final String KEY = "KEY";
//   public static final String KEYS = "KEYS";
//   public static final String HASH_NAME = "HASH_NAME";
//   public static final String HASH = "HASH";
//   public static final String VALUE = "VALUE";
//   public static final String EXPIRY = "EXPIRY";
//   public static final String EXCEPTION = "EXCEPTION";
//   public static final String STRING_DATA = "STRING_DATA";
//   public static final String NODE = "NODE";
//   public static final String ROUTING_TABLE = "ROUTINGTABLE";
//   public static final String CONNECTION_POOL = "CONNECTIONPOOL";
//   public static final String CAS_ID = "CAS_ID";
// 
//   public CommandContext() {
//     super();
//   }
// 
//   @Override
//   public String toString() {
//     return super.toString();
//   }
// }


import java.io.IOException;
import jp.co.rakuten.rit.roma.client.ClientException;
import jp.co.rakuten.rit.roma.client.Connection;
import jp.co.rakuten.rit.roma.client.commands.AbstractCommand;
import jp.co.rakuten.rit.roma.client.commands.CommandContext;

package jp.co.rakuten.rit.roma.client.util.commands;



public class DeleteCommand extends AbstractCommand {
  @Override
  public boolean execute(CommandContext context) throws ClientException {

// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/ClientException.java
// public class ClientException extends Exception {
//   private static final long serialVersionUID = -7032182229500031385L;
// 
//   public ClientException() {
//     super();
//   }
// 
//   public ClientException(Throwable cause) {
//     super(cause);
//   }
// 
//   public ClientException(String reason) {
//     super(reason);
//   }
// 
//   public ClientException(String reason, Throwable cause) {
//     super(reason, cause);
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/Connection.java
// public class Connection {
//   public Socket sock;
// 
//   public ExtInputStream in;
// 
//   public OutputStream out;
// 
//   /**
//    * Construct a connection to a ROMA process.
//    * 
//    * @param sock
//    *          - a socket of the ROMA process to connect to
//    * @throws IOException
//    *           - if creating this connection fails
//    */
//   public Connection(final Socket sock) throws IOException {
//     this.sock = sock;
//     this.in = new ExtInputStream(sock.getInputStream());
//     this.out = new BufferedOutputStream(sock.getOutputStream());
//   }
// 
//   public void setTimeout(int timeout) throws SocketException {
// 	  this.sock.setSoTimeout(timeout);
//   }
//   
//   /**
//    * Close this connection.
//    * 
//    * @throws IOException
//    *           - if closing this connection fails
//    */
//   public void close() throws IOException {
//     if (in != null) {
//       in.close();
//     }
//     if (out != null) {
//       out.close();
//     }
//     if (sock != null) {
//       sock.close();
//     }
//   }
// 
//   public static long TIME = 0;
// 
//   public class ExtInputStream extends BufferedInputStream {
// 
//     private byte[] one_byte = new byte[1];
// 
//     ExtInputStream(InputStream in) {
//       super(in);
//     }
// 
//     public void read(int byteLen) throws IOException {
//       for (int i = 0; i < byteLen; ++i) {
//         super.read(one_byte);
//       }
//     }
// 
//     public String readLine() throws IOException {
//       StringBuilder ret = new StringBuilder();
// 
//       long t = System.currentTimeMillis();
// 
//       while (super.read(one_byte) > 0) {
//         if (one_byte[0] == 0x0d) { // \r
//           break;
//         } else {
//           ret.append((char) one_byte[0]);
//         }
//       }
// 
//       TIME = TIME + (System.currentTimeMillis() - t);
// 
//       super.read(one_byte); // \n
//       return ret.toString();
//     }
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/AbstractCommand.java
// public abstract class AbstractCommand implements Command, CommandID {
//   protected Command next;
// 
//   protected AbstractCommand() {
//     this(null);
//   }
// 
//   protected AbstractCommand(Command next) {
//     this.next = next;
//   }
// 
//   public boolean execute(CommandContext context) throws ClientException {
//     try {
//       StringBuilder sb = new StringBuilder();
//       context.put(CommandContext.STRING_DATA, sb);
//       create(context);
//       sendAndReceive(context);
//       return parseResult(context);
//     } catch (IOException e) {
//       throw new ClientException(e);
//     }
//   }
// 
//   protected abstract void create(CommandContext context) throws ClientException;
// 
//   protected abstract void sendAndReceive(CommandContext context)
//       throws IOException, ClientException;
// 
//   protected abstract boolean parseResult(CommandContext context)
//       throws ClientException;
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/CommandContext.java
// public class CommandContext extends HashMap<String, Object> {
//   private static final long serialVersionUID = 3317922575242590794L;
//   public static final String COMMAND_ID = "COMMAND_ID";
//   public static final String RESULT = "RESULT";
//   public static final String CONNECTION = "CONNECTION";
//   public static final String KEY = "KEY";
//   public static final String KEYS = "KEYS";
//   public static final String HASH_NAME = "HASH_NAME";
//   public static final String HASH = "HASH";
//   public static final String VALUE = "VALUE";
//   public static final String EXPIRY = "EXPIRY";
//   public static final String EXCEPTION = "EXCEPTION";
//   public static final String STRING_DATA = "STRING_DATA";
//   public static final String NODE = "NODE";
//   public static final String ROUTING_TABLE = "ROUTINGTABLE";
//   public static final String CONNECTION_POOL = "CONNECTIONPOOL";
//   public static final String CAS_ID = "CAS_ID";
// 
//   public CommandContext() {
//     super();
//   }
// 
//   @Override
//   public String toString() {
//     return super.toString();
//   }
// }


// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/util/commands/DeleteCommand.java
import java.io.IOException;
import jp.co.rakuten.rit.roma.client.ClientException;
import jp.co.rakuten.rit.roma.client.Connection;
import jp.co.rakuten.rit.roma.client.commands.AbstractCommand;
import jp.co.rakuten.rit.roma.client.commands.CommandContext;

package jp.co.rakuten.rit.roma.client.util.commands;



public class DeleteCommand extends AbstractCommand {
  @Override
  public boolean execute(CommandContext context) throws ClientException {

    try {
