public class TimerSchedulerAdapter extends Object implements org.jgroups.util.TimeScheduler
ScheduledExecutorService to a TimeScheduler.
Disallow modification of the pool itself - this should be done via
the threading subsystem directly.| Constructor and Description |
|---|
TimerSchedulerAdapter(ScheduledExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
String |
dumpTimerTasks() |
void |
execute(Runnable command) |
int |
getCurrentThreads() |
long |
getKeepAliveTime() |
int |
getMaxThreads() |
int |
getMinThreads() |
boolean |
isShutdown() |
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithDynamicInterval(org.jgroups.util.TimeScheduler.Task task) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
void |
setKeepAliveTime(long time) |
void |
setMaxThreads(int size) |
void |
setMinThreads(int size) |
void |
setThreadFactory(org.jgroups.util.ThreadFactory factory) |
int |
size() |
void |
stop() |
public TimerSchedulerAdapter(ScheduledExecutorService executor)
public void execute(Runnable command)
execute in interface org.jgroups.util.TimeSchedulerpublic ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface org.jgroups.util.TimeSchedulerpublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface org.jgroups.util.TimeSchedulerpublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface org.jgroups.util.TimeSchedulerpublic ScheduledFuture<?> scheduleWithDynamicInterval(org.jgroups.util.TimeScheduler.Task task)
scheduleWithDynamicInterval in interface org.jgroups.util.TimeSchedulerpublic void setThreadFactory(org.jgroups.util.ThreadFactory factory)
setThreadFactory in interface org.jgroups.util.TimeSchedulerpublic String dumpTimerTasks()
dumpTimerTasks in interface org.jgroups.util.TimeSchedulerpublic int getMinThreads()
getMinThreads in interface org.jgroups.util.TimeSchedulerpublic void setMinThreads(int size)
setMinThreads in interface org.jgroups.util.TimeSchedulerpublic int getMaxThreads()
getMaxThreads in interface org.jgroups.util.TimeSchedulerpublic void setMaxThreads(int size)
setMaxThreads in interface org.jgroups.util.TimeSchedulerpublic long getKeepAliveTime()
getKeepAliveTime in interface org.jgroups.util.TimeSchedulerpublic void setKeepAliveTime(long time)
setKeepAliveTime in interface org.jgroups.util.TimeSchedulerpublic int getCurrentThreads()
getCurrentThreads in interface org.jgroups.util.TimeSchedulerpublic int size()
size in interface org.jgroups.util.TimeSchedulerpublic void stop()
stop in interface org.jgroups.util.TimeSchedulerpublic boolean isShutdown()
isShutdown in interface org.jgroups.util.TimeSchedulerCopyright © 2014 JBoss by Red Hat. All rights reserved.