Interface WorkerConfiguration
- All Superinterfaces:
ActionConfiguration, Describable, ForkingWorkerSpec, WorkerSpec
Represents the configuration of a worker. Used when submitting an item of work
to the
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') ]
}
- Since:
- 3.5
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a set of files to the classpath associated with the worker.Gets the classpath associated with the worker.Deprecated.Gets the isolation mode for this worker, seeIsolationMode.voidsetClasspath(Iterable<File> files) Sets the classpath associated with the worker.voidsetDisplayName(String displayName) Sets the name to use when displaying this item of work.voidsetForkMode(ForkMode forkMode) Deprecated.voidsetIsolationMode(IsolationMode isolationMode) Sets the isolation mode for this worker, seeIsolationMode.Methods inherited from interface ActionConfiguration
getParams, params, setParamsMethods inherited from interface Describable
getDisplayNameMethods inherited from interface ForkingWorkerSpec
forkOptions, getForkOptions
-
Method Details
-
getIsolationMode
IsolationMode getIsolationMode()Gets the isolation mode for this worker, seeIsolationMode.- Returns:
- the isolation mode for this worker, see
IsolationMode, defaults toIsolationMode.AUTO - Since:
- 4.0
-
setIsolationMode
Sets the isolation mode for this worker, seeIsolationMode.- Parameters:
isolationMode- the forking mode for this worker, seeIsolationMode- Since:
- 4.0
-
classpath
-
setClasspath
-
getClasspath
-
getForkMode
Deprecated.Gets the forking mode for this worker, seeForkMode.- Returns:
- the forking mode for this worker, see
ForkMode, defaults toForkMode.AUTO
-
setForkMode
-
setDisplayName
Sets the name to use when displaying this item of work.- Parameters:
displayName- the name of this item of work
-