Package org.hotswap.agent.command
Interface Scheduler
-
- All Known Implementing Classes:
SchedulerImpl
public interface SchedulerSchedule a command to run.- Author:
- Jiri Bubnik
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classScheduler.DuplicateSheduleBehaviour
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrun()Run the scheduler agent thread.voidscheduleCommand(Command command)Schedule new command for execution.voidscheduleCommand(Command command, int timeout)Schedule new command for execution.voidscheduleCommand(Command command, int timeout, Scheduler.DuplicateSheduleBehaviour behaviour)Schedule new command for execution.voidstop()Stop the scheduler agent thread.
-
-
-
Method Detail
-
scheduleCommand
void scheduleCommand(Command command)
Schedule new command for execution. If the command (or another same instance by equals) is already scheduled, then the old instance is replaced by this command and timer is restarted. The command contains information about target classloader where it should be run. The default timeout 100ms is assumed. If another (equals) command is scheduled before the timeout expires, it replaced (or merged). Otherwise the command is executed at timeout.- Parameters:
command- the command to execute
-
scheduleCommand
void scheduleCommand(Command command, int timeout)
Schedule new command for execution.- Parameters:
command- the command to executetimeout- timeout after which the command is executed
-
scheduleCommand
void scheduleCommand(Command command, int timeout, Scheduler.DuplicateSheduleBehaviour behaviour)
Schedule new command for execution.- Parameters:
command- the command to executetimeout- timeout after which the command is executedbehaviour- if another instance of this commands runs on schedule or within timeout, should we skip it?
-
run
void run()
Run the scheduler agent thread.
-
stop
void stop()
Stop the scheduler agent thread.
-
-