You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "HaiyuanZhao (Jira)" <ji...@apache.org> on 2021/04/05 13:11:00 UTC

[jira] [Created] (KAFKA-12615) Correct comments for the method Selector.clear

HaiyuanZhao created KAFKA-12615:
-----------------------------------

             Summary: Correct comments for the method Selector.clear
                 Key: KAFKA-12615
                 URL: https://issues.apache.org/jira/browse/KAFKA-12615
             Project: Kafka
          Issue Type: Improvement
          Components: build
            Reporter: HaiyuanZhao
            Assignee: HaiyuanZhao


{code:java}

/**
 * Clears all the results from the previous poll. This is invoked by Selector at the start of
 * a poll() when all the results from the previous poll are expected to have been handled.
 * <p>
 * SocketServer uses {@link #clearCompletedSends()} and {@link #clearCompletedSends()} to
 * clear `completedSends` and `completedReceives` as soon as they are processed to avoid
 * holding onto large request/response buffers from multiple connections longer than necessary.
 * Clients rely on Selector invoking {@link #clear()} at the start of each poll() since memory usage
 * is less critical and clearing once-per-poll provides the flexibility to process these results in
 * any order before the next poll.
 */
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)