All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.util.concurrent.ScheduledThreadPoolExecutor Maven / Gradle / Ivy

package java.util.concurrent;

public class ScheduledThreadPoolExecutor extends ThreadPoolExecutor implements ScheduledExecutorService {
	public ScheduledThreadPoolExecutor(int corePoolSize) {
		super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, new DelayedWorkQueue());
	}

	public ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory) {
		super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, new DelayedWorkQueue(), threadFactory);
	}

	public ScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler) {
		super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, new DelayedWorkQueue(), handler);
	}

	public ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler) {
		super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, new DelayedWorkQueue(), threadFactory, handler);
	}

	@Override
	public ScheduledFuture schedule(Runnable command, long delay, TimeUnit unit) {
		throw new RuntimeException("Not implemented. Implement using setTimeout.");
	}

	@Override
	public  ScheduledFuture schedule(Callable callable, long delay, TimeUnit unit) {
		throw new RuntimeException("Not implemented. Implement using setTimeout.");
	}

	@Override
	public ScheduledFuture scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) {
		throw new RuntimeException("Not implemented. Implement using setInterval.");
	}

	@Override
	public ScheduledFuture scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
		throw new RuntimeException("Not implemented. Implement using setInterval.");
	}

	static private class DelayedWorkQueue extends SynchronousQueue {
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy