Home / Class/ KQueueEventLoopTest Class — netty Architecture

KQueueEventLoopTest Class — netty Architecture

Architecture documentation for the KQueueEventLoopTest class in KQueueEventLoopTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fa060136_2d52_ceba_b979_1cd230af0c15["KQueueEventLoopTest"]
  b6b71707_db0a_3975_14f4_9c99a9749586["KQueueEventLoopTest.java"]
  fa060136_2d52_ceba_b979_1cd230af0c15 -->|defined in| b6b71707_db0a_3975_14f4_9c99a9749586
  54596c1a_08e0_d781_efb1_9eed4266753f["supportsChannelIteration()"]
  fa060136_2d52_ceba_b979_1cd230af0c15 -->|method| 54596c1a_08e0_d781_efb1_9eed4266753f
  eee741c7_29c1_91fa_1f74_87c1c05f6de4["EventLoopGroup()"]
  fa060136_2d52_ceba_b979_1cd230af0c15 -->|method| eee741c7_29c1_91fa_1f74_87c1c05f6de4
  b33ae73b_d5f6_72b8_27f4_74c7bc54ea46["ServerSocketChannel()"]
  fa060136_2d52_ceba_b979_1cd230af0c15 -->|method| b33ae73b_d5f6_72b8_27f4_74c7bc54ea46
  1ce96b06_b4d3_75ce_063e_c7315cd78f34["serverChannelClass()"]
  fa060136_2d52_ceba_b979_1cd230af0c15 -->|method| 1ce96b06_b4d3_75ce_063e_c7315cd78f34
  fda83d2c_cb6e_02b4_a9d4_a8e67f952900["testScheduleBigDelayNotOverflow()"]
  fa060136_2d52_ceba_b979_1cd230af0c15 -->|method| fda83d2c_cb6e_02b4_a9d4_a8e67f952900

Relationship Graph

Source Code

transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueEventLoopTest.java lines 33–77

public class KQueueEventLoopTest extends AbstractSingleThreadEventLoopTest {

    @Override
    protected boolean supportsChannelIteration() {
        return true;
    }

    @Override
    protected EventLoopGroup newEventLoopGroup() {
        return new KQueueEventLoopGroup();
    }

    @Override
    protected EventLoopGroup newAutoScalingEventLoopGroup() {
        return new KQueueEventLoopGroup(SCALING_MAX_THREADS, (Executor) null, AUTO_SCALING_CHOOSER_FACTORY,
                                        DefaultSelectStrategyFactory.INSTANCE);
    }

    @Override
    protected ServerSocketChannel newChannel() {
        return new KQueueServerSocketChannel();
    }

    @Override
    protected Class<? extends ServerChannel> serverChannelClass() {
        return KQueueServerSocketChannel.class;
    }

    @Test
    public void testScheduleBigDelayNotOverflow() {
        EventLoopGroup group = new KQueueEventLoopGroup(1);

        final EventLoop el = group.next();
        Future<?> future = el.schedule(new Runnable() {
            @Override
            public void run() {
                // NOOP
            }
        }, Long.MAX_VALUE, TimeUnit.MILLISECONDS);

        assertFalse(future.awaitUninterruptibly(1000));
        assertTrue(future.cancel(true));
        group.shutdownGracefully();
    }
}

Frequently Asked Questions

What is the KQueueEventLoopTest class?
KQueueEventLoopTest is a class in the netty codebase, defined in transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueEventLoopTest.java.
Where is KQueueEventLoopTest defined?
KQueueEventLoopTest is defined in transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueEventLoopTest.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free