com.jdroid.java.concurrent
Class ExecutorUtils

java.lang.Object
  extended by com.jdroid.java.concurrent.ExecutorUtils

public final class ExecutorUtils
extends Object


Constructor Summary
ExecutorUtils()
           
 
Method Summary
static void execute(Runnable runnable)
           
static void executeWithLowPriority(Runnable runnable)
           
static void schedule(Runnable runnable, Long delaySeconds)
           
static ScheduledFuture<?> schedule(Runnable runnable, Long delaySeconds, Long period)
           
static void scheduleInMillis(Runnable runnable, Long delayMilliSeconds)
           
static void sleep(int seconds)
           
static void sleepInMillis(long millis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutorUtils

public ExecutorUtils()
Method Detail

execute

public static void execute(Runnable runnable)
Parameters:
runnable - The Runnable task

executeWithLowPriority

public static void executeWithLowPriority(Runnable runnable)

schedule

public static void schedule(Runnable runnable,
                            Long delaySeconds)

schedule

public static ScheduledFuture<?> schedule(Runnable runnable,
                                          Long delaySeconds,
                                          Long period)

scheduleInMillis

public static void scheduleInMillis(Runnable runnable,
                                    Long delayMilliSeconds)

sleep

public static void sleep(int seconds)
Parameters:
seconds - The time to sleep in seconds.

sleepInMillis

public static void sleepInMillis(long millis)
Parameters:
millis - The time to sleep in milliseconds.


Copyright © 2014. All rights reserved.