Package org.hotswap.agent.command
Class MergeableCommand
- java.lang.Object
-
- org.hotswap.agent.command.MergeableCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
ReflectionCommand,ScheduledHotswapCommand,WatchEventCommand
public abstract class MergeableCommand extends Object implements Command
Command that can merge multiple commands into a single execution. ${Scheduler.schedule()} compares existing scheduled commands with equlas() method and if the command exists, it is replaced by new command and timer is restarted - effectively forgetting firs command. This implementation provides a way to get all merged commands and process them in the execution. It is also an interface to override merge method to provide custom behaviour. For example - merge multiple MODIFY events into one, or if DELETE + CREATE events are scheduled, merge them into single MODIFY event.
-
-
Constructor Summary
Constructors Constructor Description MergeableCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Command>getMergedCommands()Commandmerge(Command other)Merge commandsList<Command>popMergedCommands()Return merged commands and clear internal list-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hotswap.agent.command.Command
executeCommand
-
-