public static PurgeRequest readFrom(DataInputStream stream, ClusterMap map) throws IOException {
    short version = stream.readShort();
    if (version == PURGE_MESSAGE_REQUEST_VERSION_1) {
      return PurgeRequest_V1.readFrom(stream, map);
    }
    throw new IllegalStateException("Unknown Purge Request version " + version);
  }
Helper to construct PurgeRequest from a stream
@param stream the stream to read data from
@param map the {@link ClusterMap} to use
@return a TtlUpdateRequest based on data read off of the stream
@throws IOException if there were any problems reading the stream
ambry-protocol/src/main/java/com/github/ambry/protocol/PurgeRequest.java