Code example for ScheduledThreadPoolExecutor

Methods: schedule

0
	public ScheduledFuture<?> scheduleEffect(Runnable r, long delay) {
		try { 
			if (delay < 0) {
				delay = 0;
			} 
			return _effectsScheduledThreadPool.schedule(r, delay,
					TimeUnit.MILLISECONDS);
		} catch (RejectedExecutionException e) {
			return null; /* shutdown, ignore */ 
		} 
	} 
 
	public ScheduledFuture<?> scheduleEffectAtFixedRate(Runnable r, long initial,
			long delay) {
		try { 
			if (delay < 0) {
				delay = 0;
			} 
			if (initial < 0) {
				initial = 0;