Home / Function/ operationComplete() — netty Function Reference

operationComplete() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  a0e3ca45_7007_bd76_d79f_81a640f79d24["operationComplete()"]
  d8460a0c_276c_cf7c_d74b_b4ef6c2be6d1["AcquireListener"]
  a0e3ca45_7007_bd76_d79f_81a640f79d24 -->|defined in| d8460a0c_276c_cf7c_d74b_b4ef6c2be6d1
  9ac1ba40_078b_abc6_6da9_14f7a9e33ed8["close()"]
  a0e3ca45_7007_bd76_d79f_81a640f79d24 -->|calls| 9ac1ba40_078b_abc6_6da9_14f7a9e33ed8
  21d08587_1275_d708_de67_34ff59c3d946["decrementAndRunTaskQueue()"]
  a0e3ca45_7007_bd76_d79f_81a640f79d24 -->|calls| 21d08587_1275_d708_de67_34ff59c3d946
  f449fa2c_e258_1aba_423a_5369445ba398["runTaskQueue()"]
  a0e3ca45_7007_bd76_d79f_81a640f79d24 -->|calls| f449fa2c_e258_1aba_423a_5369445ba398
  style a0e3ca45_7007_bd76_d79f_81a640f79d24 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/pool/FixedChannelPool.java lines 405–433

        @Override
        public void operationComplete(Future<Channel> future) throws Exception {
            try {
                assert executor.inEventLoop();

                if (closed) {
                    if (future.isSuccess()) {
                        // Since the pool is closed, we have no choice but to close the channel
                        future.getNow().close();
                    }
                    originalPromise.setFailure(new IllegalStateException("FixedChannelPool was closed"));
                    return;
                }

                if (future.isSuccess()) {
                    originalPromise.setSuccess(future.getNow());
                } else {
                    if (acquired) {
                        decrementAndRunTaskQueue();
                    } else {
                        runTaskQueue();
                    }

                    originalPromise.setFailure(future.cause());
                }
            } catch (Throwable cause) {
                originalPromise.tryFailure(cause);
            }
        }

Domain

Subdomains

Frequently Asked Questions

What does operationComplete() do?
operationComplete() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/pool/FixedChannelPool.java.
Where is operationComplete() defined?
operationComplete() is defined in transport/src/main/java/io/netty/channel/pool/FixedChannelPool.java at line 405.
What does operationComplete() call?
operationComplete() calls 3 function(s): close, decrementAndRunTaskQueue, runTaskQueue.

Analyze Your Own Codebase

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

Try Supermodel Free