ActionConfiguration
, Describable
public interface WorkerConfiguration extends Describable, ActionConfiguration
WorkerExecutor
.
workerExecutor.submit(RunnableWorkImpl.class) { WorkerConfiguration conf -> conf.isolationMode = IsolationMode.PROCESS forkOptions { JavaForkOptions options -> options.maxHeapSize = "512m" options.systemProperty 'some.prop', 'value' options.jvmArgs "-server" } classpath configurations.fooLibrary conf.params = [ "foo", file('bar') ] }
Modifier and Type | Method | Description |
---|---|---|
void |
classpath(Iterable<File> files) |
Adds a set of files to the classpath associated with the worker.
|
void |
forkOptions(Action<? super JavaForkOptions> forkOptionsAction) |
Executes the provided action against the
JavaForkOptions object associated with this builder. |
Iterable<File> |
getClasspath() |
Gets the classpath associated with the worker.
|
String |
getDisplayName() |
Returns the display name of this object.
|
ForkMode |
getForkMode() |
Gets the forking mode for this worker, see
ForkMode . |
JavaForkOptions |
getForkOptions() |
Returns the
JavaForkOptions object associated with this builder. |
IsolationMode |
getIsolationMode() |
Gets the isolation mode for this worker, see
IsolationMode . |
void |
setClasspath(Iterable<File> files) |
Sets the classpath associated with the worker.
|
void |
setDisplayName(String displayName) |
Sets the name to use when displaying this item of work.
|
void |
setForkMode(ForkMode forkMode) |
Sets the forking mode for this worker, see
ForkMode . |
void |
setIsolationMode(IsolationMode isolationMode) |
Sets the isolation mode for this worker, see
IsolationMode . |
getParams, params, setParams
void classpath(Iterable<File> files)
files
- - the files to add to the classpathvoid setClasspath(Iterable<File> files)
files
- - the files to set the classpath toIterable<File> getClasspath()
IsolationMode getIsolationMode()
IsolationMode
.IsolationMode
, defaults to IsolationMode.AUTO
void setIsolationMode(IsolationMode isolationMode)
IsolationMode
.isolationMode
- the forking mode for this worker, see IsolationMode
ForkMode getForkMode()
ForkMode
.ForkMode
, defaults to ForkMode.AUTO
void setForkMode(ForkMode forkMode)
ForkMode
.forkMode
- the forking mode for this worker, see ForkMode
void forkOptions(Action<? super JavaForkOptions> forkOptionsAction)
JavaForkOptions
object associated with this builder.forkOptionsAction
- - An action to configure the JavaForkOptions
for this builderJavaForkOptions getForkOptions()
JavaForkOptions
object associated with this builder.JavaForkOptions
of this buildervoid setDisplayName(String displayName)
displayName
- the name of this item of work@Nullable String getDisplayName()
getDisplayName
in interface Describable