public class ThreadPool
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ThreadPool |
createNewThreadPool(java.lang.String name,
int size) |
java.util.concurrent.ScheduledFuture<?> |
repeatUntilComplete(java.util.concurrent.Callable<java.lang.Boolean> task,
long period) |
java.util.concurrent.ScheduledFuture<?> |
repeatUntilComplete(java.util.concurrent.Callable<java.lang.Boolean> task,
long period,
java.util.concurrent.TimeUnit timeUnit) |
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable runnable,
long delay) |
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable runnable,
long delay,
java.util.concurrent.TimeUnit timeUnit) |
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable runnable,
long delay,
long period) |
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable runnable,
long delay,
long period,
java.util.concurrent.TimeUnit timeUnit) |
void |
setSize(int size) |
java.util.concurrent.ScheduledFuture<?> |
submit(java.lang.Runnable runnable) |
public static ThreadPool createNewThreadPool(java.lang.String name, int size)
public void setSize(int size)
public java.util.concurrent.ScheduledFuture<?> submit(java.lang.Runnable runnable)
public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable runnable, long delay)
public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable runnable, long delay, java.util.concurrent.TimeUnit timeUnit)
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable runnable, long delay, long period)
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable runnable, long delay, long period, java.util.concurrent.TimeUnit timeUnit)
public java.util.concurrent.ScheduledFuture<?> repeatUntilComplete(java.util.concurrent.Callable<java.lang.Boolean> task, long period)
public java.util.concurrent.ScheduledFuture<?> repeatUntilComplete(java.util.concurrent.Callable<java.lang.Boolean> task, long period, java.util.concurrent.TimeUnit timeUnit)