public Optional<ByteBuffer> trySerialize(final CachedSubscriptionPollResponse response) {
    try {
      if (Objects.isNull(response)) {
        throw new IOException("null response when serializing");
      }
      return Optional.of(serialize(response));
    } catch (final IOException e) {
      LOGGER.warn(
          "Subscription: something unexpected happened when serializing CachedSubscriptionPollResponse: {}",
          response,
          e);
      return Optional.empty();
    }
  }
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