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.TimeScheduler
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule
in interface org.jgroups.util.TimeScheduler
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay
in interface org.jgroups.util.TimeScheduler
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate
in interface org.jgroups.util.TimeScheduler
public ScheduledFuture<?> scheduleWithDynamicInterval(org.jgroups.util.TimeScheduler.Task task)
scheduleWithDynamicInterval
in interface org.jgroups.util.TimeScheduler
public void setThreadFactory(org.jgroups.util.ThreadFactory factory)
setThreadFactory
in interface org.jgroups.util.TimeScheduler
public String dumpTimerTasks()
dumpTimerTasks
in interface org.jgroups.util.TimeScheduler
public int getMinThreads()
getMinThreads
in interface org.jgroups.util.TimeScheduler
public void setMinThreads(int size)
setMinThreads
in interface org.jgroups.util.TimeScheduler
public int getMaxThreads()
getMaxThreads
in interface org.jgroups.util.TimeScheduler
public void setMaxThreads(int size)
setMaxThreads
in interface org.jgroups.util.TimeScheduler
public long getKeepAliveTime()
getKeepAliveTime
in interface org.jgroups.util.TimeScheduler
public void setKeepAliveTime(long time)
setKeepAliveTime
in interface org.jgroups.util.TimeScheduler
public int getCurrentThreads()
getCurrentThreads
in interface org.jgroups.util.TimeScheduler
public int size()
size
in interface org.jgroups.util.TimeScheduler
public void stop()
stop
in interface org.jgroups.util.TimeScheduler
public boolean isShutdown()
isShutdown
in interface org.jgroups.util.TimeScheduler
Copyright © 2014 JBoss by Red Hat. All rights reserved.