@Override
  public void run() {
    RequestReader request = new RequestReader(socket, protocol);
    while (!Thread.currentThread().isInterrupted()) {
      try {
        Command command = request.readCommand();
        if (logger.fineEnabled()) {
          logger.fine("processing command:" + command);
        }
        ByteBuffer reply =
            command.getCommandProcessor().processCommand(request, protocol, cache);
        if (reply != null) {
          request.sendReply(reply);
        }
        if (command == Command.QUIT || command == Command.QUITQ) {
          socket.close();
          break;
        }
      } catch (ClientError e) {
        request.sendException(e);
      } catch (IllegalArgumentException e) {
        // thrown by Command.valueOf() when there is no matching command
        request.sendException(e);
      } catch (CacheClosedException cc) {
        Thread.currentThread().interrupt();
      } catch (IOException e) {
        Thread.currentThread().interrupt();
      }
    }
    logger.fine("Connection handler " + Thread.currentThread().getName() + " terminating");
  }
One instance of ConnectionHandle is created for each client that connects to
{@link GemFireMemcachedServer} and is responsible for reading requests and sending responses to
this client.
geode-memcached/src/main/java/org/apache/geode/internal/memcached/ConnectionHandler.java