Home / Function/ operationComplete() — netty Function Reference

operationComplete() — netty Function Reference

Architecture documentation for the operationComplete() function in WriteTimeoutHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  59da182b_72ed_d838_5542_f6d99ed8cefe["operationComplete()"]
  31b01ed4_f756_395a_3500_81e356092658["WriteTimeoutTask"]
  59da182b_72ed_d838_5542_f6d99ed8cefe -->|defined in| 31b01ed4_f756_395a_3500_81e356092658
  a29cd7e7_658b_eddc_cda5_3a2f3771e34e["removeWriteTimeoutTask()"]
  59da182b_72ed_d838_5542_f6d99ed8cefe -->|calls| a29cd7e7_658b_eddc_cda5_3a2f3771e34e
  style 59da182b_72ed_d838_5542_f6d99ed8cefe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/timeout/WriteTimeoutHandler.java lines 217–234

        @Override
        public void operationComplete(ChannelFuture future) throws Exception {
            // scheduledFuture has already be set when reaching here
            scheduledFuture.cancel(false);

            // Check if its safe to modify the "doubly-linked-list" that we maintain. If its not we will schedule the
            // modification so its picked up by the executor..
            if (ctx.executor().inEventLoop()) {
                removeWriteTimeoutTask(this);
            } else {
                // So let's just pass outself to the executor which will then take care of remove this task
                // from the doubly-linked list. Schedule ourself is fine as the promise itself is done.
                //
                // This fixes https://github.com/netty/netty/issues/11053
                assert promise.isDone();
                ctx.executor().execute(this);
            }
        }

Domain

Subdomains

Frequently Asked Questions

What does operationComplete() do?
operationComplete() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/timeout/WriteTimeoutHandler.java.
Where is operationComplete() defined?
operationComplete() is defined in handler/src/main/java/io/netty/handler/timeout/WriteTimeoutHandler.java at line 217.
What does operationComplete() call?
operationComplete() calls 1 function(s): removeWriteTimeoutTask.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free