public ByteBuffer serialize(final CachedSubscriptionPollResponse response) throws IOException {
    try {
      if (Objects.isNull(response)) {
        throw new IOException("null response when serializing");
      }
      return this.cache.get(response);
    } catch (final Exception e) {
      LOGGER.warn(
          "SubscriptionEventBinaryCache raised an exception while serializing CachedSubscriptionPollResponse: {}",
          response,
          e);
      throw new IOException(e);
    }
  }
This class is used to control memory usage of cache {@link SubscriptionPollResponse} in {@link
CachedSubscriptionPollResponse}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/cache/SubscriptionPollResponseCache.java