Package groovyx.gpars.util

Examples of groovyx.gpars.util.GeneralTimer


     * Otherwise a new instance of java.util.Timer will be created, wrapped inside a GeneralTimer instance and returned.
     *
     * @return A timer instance to use to handle timeouts (actors, GParsPool, GParsExecutorsPool)
     */
    public static GeneralTimer retrieveDefaultTimer(final String name, final boolean daemon) {
        final GeneralTimer timer;
        if (timerFactory != null) {
            timer = timerFactory.createTimer(name, daemon);
        } else {
            timer = new GeneralTimer() {

                @Override
                public void schedule(final Runnable task, final long timeout) {
                    Timer.timer.schedule(task, timeout, TimeUnit.MILLISECONDS);
                }
View Full Code Here

TOP

Related Classes of groovyx.gpars.util.GeneralTimer

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.