Package examples.util.definition

Examples of examples.util.definition.ThreadPoolDefinition


    }

    public static void main(String[] args) {
        // need to test the method in a concurrent environment,
        // A therefore the use of a thread pool
        ThreadPoolDefinition def = new ThreadPoolDefinition();
        def.setBounded(true);
        def.setMaxSize(10);
        def.setMinSize(2);
        def.setInitSize(2);
        def.setKeepAliveTime(6000);
        def.setWaitWhenBlocked(true);
        AsynchronousManager.getInstance().initialize(def);

        final Target target = new Target();
        for (int i = 0; i < 2; i++) {
            AsynchronousManager.getInstance().execute(new Runnable() {
View Full Code Here


    }

    public static void main(String[] args) {
        // need to test the method in a concurrent environment,
        // A therefore the use of a thread pool
        ThreadPoolDefinition def = new ThreadPoolDefinition();
        def.setBounded(true);
        def.setMaxSize(10);
        def.setMinSize(2);
        def.setInitSize(2);
        def.setKeepAliveTime(6000);
        def.setWaitWhenBlocked(true);
        AsynchronousManager.getInstance().initialize(def);

        final Target target = new Target();
        for (int i = 0; i < 2; i++) {
            AsynchronousManager.getInstance().execute(new Runnable() {
View Full Code Here

    }

    public static void main(String[] args) {
        // need to test the method in a concurrent environment,
        // A therefore the use of a thread pool
        ThreadPoolDefinition def = new ThreadPoolDefinition();
        def.setBounded(true);
        def.setMaxSize(10);
        def.setMinSize(2);
        def.setInitSize(2);
        def.setKeepAliveTime(6000);
        def.setWaitWhenBlocked(true);
        AsynchronousManager.getInstance().initialize(def);

        final Target target = new Target();
        for (int i = 0; i < 2; i++) {
            AsynchronousManager.getInstance().execute(new Runnable() {
View Full Code Here

TOP

Related Classes of examples.util.definition.ThreadPoolDefinition

Copyright © 2018 www.massapicom. 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.