Пример #1
0
 private static CommandContext modifyContextForIntenralJob(
     CommandContext returnedContext, EngineLock lock) {
   return returnedContext
       .withExecutionContext(createMonitoredExecutionContext())
       .withLock(lock)
       .withoutCompensationContext();
 }
Пример #2
0
 public static void setExecutionContextForTasks(
     CommandContext commandContext, ExecutionContext executionContext, EngineLock lock) {
   commandContext
       .withExecutionContext(createDefaultContextForTasksImpl(executionContext))
       .withLock(lock);
 }
Пример #3
0
 /**
  * Creates a default execution context for an inner command which creates VDSM tasks so the tasks
  * will be monitored under the parent {@code StepEnum.EXECUTING} step. If the parent command is an
  * internal command, its parent task step is passed to its internal command.
  *
  * @param parentExecutionContext The context of the parent command
  * @param lock The lock which should be released at child command
  * @return A context by which the internal command should be monitored.
  */
 public static CommandContext createDefaultContextForTasks(
     CommandContext commandContext, EngineLock lock) {
   CommandContext result = commandContext.clone().withLock(lock).withoutCompensationContext();
   return result.withExecutionContext(
       createDefaultContextForTasksImpl(result.getExecutionContext()));
 }