类 PeekBlockingQueue<E>

java.lang.Object
org.apache.seatunnel.engine.server.utils.PeekBlockingQueue<E>

public class PeekBlockingQueue<E> extends Object
PeekBlockingQueue implements blocking when peeking. Queues like BlockingQueue only support blocking when take() is called. The original solution used sleep(2000) to check whether there was data in the pending queue. This solution still had performance drawbacks, so it was changed to use peek blocking, which allows tasks to be scheduled more efficiently.

Application scenario: In CoordinatorService, the following process needs to be executed:
1. Peek data from the queue.
2. Check if resources are sufficient.
3. If resources are sufficient, take() the data; otherwise, do not take data from the queue.