Package io.netty.channel.local

Examples of io.netty.channel.local.LocalChannel.deregister()


        // Each task should be executed every 100ms.
        // Will give them additional 50ms to execute ten times.
        Thread.sleep(50 + 10 * 100);

        // Deregister must stop future execution of scheduled tasks.
        assertTrue(channel.deregister().sync().isSuccess());

        for (Queue<Long> timestamps : timestampsPerTask) {
            String message = String.format("size: %d, minSize: 10", timestamps.size());
            assertTrue(message, timestamps.size() >= 10);
            verifyTimestampDeltas(timestamps, TimeUnit.MICROSECONDS.toNanos(90));
View Full Code Here


                firstRun = false;
            }

            Thread.sleep(250);

            assertTrue(channel.deregister().sync().isSuccess());

            String message = String.format("size: %d, minSize: 2", timestamps.size());
            assertTrue(message, timestamps.size() >= 2);
            verifyTimestampDeltas(timestamps, TimeUnit.MILLISECONDS.toNanos(90));
            timestamps.clear();
View Full Code Here

                }
            }, 100, 200, TimeUnit.MILLISECONDS);
        }

        assertTrue(((PausableEventExecutor) channel.eventLoop()).isAcceptingNewTasks());
        ChannelFuture deregisterFuture = channel.deregister();
        assertFalse(((PausableEventExecutor) channel.eventLoop()).isAcceptingNewTasks());

        assertTrue(deregisterFuture.sync().isSuccess());

        timestamps.clear();
View Full Code Here

                assertTrue(loopB.inEventLoop());
            }
        }, 1, TimeUnit.SECONDS);

        assertTrue(((PausableEventExecutor) channel.eventLoop()).isAcceptingNewTasks());
        ChannelFuture deregisterFuture = channel.deregister();
        assertFalse(((PausableEventExecutor) channel.eventLoop()).isAcceptingNewTasks());

        assertTrue(deregisterFuture.sync().isSuccess());

        Thread.sleep(1000);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.