Package org.hotswap.agent.command.impl
Class SchedulerImpl
- java.lang.Object
-
- org.hotswap.agent.command.impl.SchedulerImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hotswap.agent.command.Scheduler
Scheduler.DuplicateSheduleBehaviour
-
-
Constructor Summary
Constructors Constructor Description SchedulerImpl()
-
Method Summary
All Methods Instance Methods Concrete 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
public void scheduleCommand(Command command)
Description copied from interface:SchedulerSchedule 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.- Specified by:
scheduleCommandin interfaceScheduler- Parameters:
command- the command to execute
-
scheduleCommand
public void scheduleCommand(Command command, int timeout)
Description copied from interface:SchedulerSchedule new command for execution.- Specified by:
scheduleCommandin interfaceScheduler- Parameters:
command- the command to executetimeout- timeout after which the command is executed
-
scheduleCommand
public void scheduleCommand(Command command, int timeout, Scheduler.DuplicateSheduleBehaviour behaviour)
Description copied from interface:SchedulerSchedule new command for execution.- Specified by:
scheduleCommandin interfaceScheduler- 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
public void run()
Description copied from interface:SchedulerRun the scheduler agent thread.
-
-