public void handle()

in folsom/src/main/java/com/spotify/folsom/client/ascii/SetRequest.java [145:178]


  public void handle(final AsciiResponse response, final HostAndPort server) throws IOException {
    switch (response.type) {
      case STORED:
        succeed(MemcacheStatus.OK);
        return;
      case NOT_STORED:
        succeed(MemcacheStatus.ITEM_NOT_STORED);
        return;
      case VALUE_TOO_LARGE:
        succeed(MemcacheStatus.VALUE_TOO_LARGE);
        return;
      case OUT_OF_MEMORY:
        succeed(MemcacheStatus.OUT_OF_MEMORY);
        return;
      case EXISTS:
        succeed(MemcacheStatus.KEY_EXISTS);
        return;
      case NOT_FOUND:
        if (operation == Operation.APPEND || operation == Operation.PREPEND) {
          succeed(MemcacheStatus.ITEM_NOT_STORED);
        } else {
          succeed(MemcacheStatus.KEY_NOT_FOUND);
        }
        return;
      case CLIENT_ERROR:
        MemcacheAuthenticationException exception =
            new MemcacheAuthenticationException(
                "Authentication required by server. Client not authenticated.");
        fail(exception, server);
        return;
      default:
        throw new IOException("Unexpected line: " + response.type);
    }
  }