| Modifier and Type | Method and Description |
|---|---|
static Command |
atomic(Command cmd)
Decorates the given command with another command to ensure that the
Command.revert() method of the given command is only called if a
previous call to the Command.perform() method has succeeded, for
example if a subsequent command in a CompositeCommand fails. |
static void |
execute(Command cmd)
Executes the given command.
|
static Command |
time(Command cmd,
LogContext ctx)
Decorates the given command with another command which logs the
duration of each command method using the given configuration.
|
public static Command atomic(Command cmd)
Command.revert() method of the given command is only called if a
previous call to the Command.perform() method has succeeded, for
example if a subsequent command in a CompositeCommand fails.public static void execute(Command cmd) throws Exception
IllegalStateException - if this method is called recursively.Exceptionpublic static Command time(Command cmd, LogContext ctx)
Copyright © 2013–2015 Schlichtherle IT Services. All rights reserved.