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() |
org.jgroups.util.ThreadDecorator |
getThreadDecorator() |
boolean |
isShutdown() |
Future<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
Future<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
Future<?> |
scheduleWithDynamicInterval(org.jgroups.util.TimeScheduler.Task task) |
Future<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
void |
setKeepAliveTime(long time) |
void |
setMaxThreads(int size) |
void |
setMinThreads(int size) |
void |
setThreadDecorator(org.jgroups.util.ThreadDecorator decorator) |
void |
setThreadFactory(org.jgroups.util.ThreadFactory factory) |
int |
size() |
void |
stop() |
public TimerSchedulerAdapter(ScheduledExecutorService executor)
public org.jgroups.util.ThreadDecorator getThreadDecorator()
getThreadDecorator in interface org.jgroups.util.ThreadManagerpublic void setThreadDecorator(org.jgroups.util.ThreadDecorator decorator)
setThreadDecorator in interface org.jgroups.util.ThreadManagerpublic void execute(Runnable command)
execute in interface org.jgroups.util.TimeSchedulerpublic Future<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface org.jgroups.util.TimeSchedulerpublic Future<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface org.jgroups.util.TimeSchedulerpublic Future<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface org.jgroups.util.TimeSchedulerpublic Future<?> 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 © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.