Package org.apache.niolex.commons.seda

Examples of org.apache.niolex.commons.seda.Dispatcher.dispatch()


        System.out.println("Stage 1 - dispatch 5K/s, 100(1ms) : 1(100ms) weight messages; for 30 sec.");

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 5000; ++j) {
                if (j % 100 == 50) {
                    disp.dispatch("input", new WeightMessage(100));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                if (j % 5 == 1) {
                    ThreadUtil.sleep(1);
View Full Code Here


        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 5000; ++j) {
                if (j % 100 == 50) {
                    disp.dispatch("input", new WeightMessage(100));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                if (j % 5 == 1) {
                    ThreadUtil.sleep(1);
                }
            }
View Full Code Here

        System.out.println("Stage 2 - dispatch 1K/s, 1(1ms) : 1(10ms) weight messages; for 30 sec.");

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 1000; ++j) {
                if (j % 2 == 1) {
                    disp.dispatch("input", new WeightMessage(10));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                ThreadUtil.sleep(1);
            }
View Full Code Here

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 1000; ++j) {
                if (j % 2 == 1) {
                    disp.dispatch("input", new WeightMessage(10));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                ThreadUtil.sleep(1);
            }
        }
        group.list();
View Full Code Here

        System.out.println("Stage 3 - dispatch 10K/s, 1(1ms) : 1(10ms) weight messages; for 30 sec.");

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 10000; ++j) {
                if (j % 2 == 1) {
                    disp.dispatch("input", new WeightMessage(10));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                if (j % 10 == 1) {
                    ThreadUtil.sleep(1);
View Full Code Here

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 10000; ++j) {
                if (j % 2 == 1) {
                    disp.dispatch("input", new WeightMessage(10));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                if (j % 10 == 1) {
                    ThreadUtil.sleep(1);
                }
            }
View Full Code Here

        System.out.println("Stage 4 - dispatch 10K/s, 1(1ms) : 1(3ms) weight messages; for 30 sec.");

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 10000; ++j) {
                if (j % 2 == 1) {
                    disp.dispatch("input", new WeightMessage(3));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                if (j % 10 == 1) {
                    ThreadUtil.sleep(1);
View Full Code Here

        for (int i = 0; i < 30; ++i) {
            for (int j = 0; j < 10000; ++j) {
                if (j % 2 == 1) {
                    disp.dispatch("input", new WeightMessage(3));
                } else {
                    disp.dispatch("input", new WeightMessage(1));
                }
                if (j % 10 == 1) {
                    ThreadUtil.sleep(1);
                }
            }
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.