@Override public BlockUntilInitScriptStatusIsZeroThenReturnOutput submit( NodeMetadata node, Statement script, RunScriptOptions options) { checkNotNull(node, "node"); checkNotNull(script, "script"); checkNotNull(options, "options"); options.shouldWrapInInitScript(); return factory.backgroundAndBlockOnComplete(node, script, options).init().future(); }
@Override public RunScriptOnNode create( NodeMetadata node, Statement runScript, RunScriptOptions options) { checkNotNull(node, "node"); checkNotNull(runScript, "runScript"); checkNotNull(options, "options"); return !options.shouldWrapInInitScript() ? factory.exec(node, runScript, options) : (options.shouldBlockOnComplete() ? factory.backgroundAndBlockOnComplete(node, runScript, options) : factory.background(node, runScript, options)); }