private boolean hasTooManyPrefetchedGlobalEvent() {
    // The number of prefetched events in the current prefetching queue > floor(t / number of
    // prefetching queues), where t is an adjustable parameter.
    return prefetchingQueue.getPrefetchedEventCount()
            * SubscriptionAgent.broker().getPrefetchingQueueCount()
        > PREFETCH_EVENT_GLOBAL_COUNT_THRESHOLD;
  }
The {@link SubscriptionPrefetchingQueueStates} manages the state of a {@link
SubscriptionPrefetchingQueue}. It determines whether prefetching should occur based on memory
availability, poll request rates, and missing prefetch rates.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueueStates.java