Class SandboxPoolConfiguration.Builder
- java.lang.Object
-
- com.atlassian.confluence.impl.util.sandbox.SandboxPoolConfiguration.Builder
-
- Enclosing class:
- SandboxPoolConfiguration
public static class SandboxPoolConfiguration.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SandboxPoolConfiguration
build()
SandboxPoolConfiguration.Builder
withBootstrapClasses(List<Class<?>> bootstrapClasses)
Classes required to bootstrap a sandbox process.SandboxPoolConfiguration.Builder
withConcurrencyLevel(int concurrencyLevel)
Number of sandbox processes.SandboxPoolConfiguration.Builder
withDebugPortOffset(Integer offset)
Opens debug port for each sandbox process starting with given offset.SandboxPoolConfiguration.Builder
withErrorConsumer(SandboxErrorConsumer errorConsumer)
The sandbox server andSandboxTask
log a debug message by writing it to standard error.SandboxPoolConfiguration.Builder
withJavaOptions(String... options)
SandboxPoolConfiguration.Builder
withLogLevel(Level logLevel)
SandboxPoolConfiguration.Builder
withMemoryInMegabytes(int memoryLimitInMegabytes)
Limits memory of sandbox process.SandboxPoolConfiguration.Builder
withStackInMegabytes(int stackInMegabytes)
Sets the default stack size of sandbox process threads.SandboxPoolConfiguration.Builder
withStartupTimeLimit(Duration timeLimit)
Sandbox process taking longer that this time to start will be killed.
-
-
-
Method Detail
-
withConcurrencyLevel
public SandboxPoolConfiguration.Builder withConcurrencyLevel(int concurrencyLevel)
Number of sandbox processes.
-
withStartupTimeLimit
public SandboxPoolConfiguration.Builder withStartupTimeLimit(Duration timeLimit)
Sandbox process taking longer that this time to start will be killed.
-
withMemoryInMegabytes
public SandboxPoolConfiguration.Builder withMemoryInMegabytes(int memoryLimitInMegabytes)
Limits memory of sandbox process. This is done by passing this value to the option-Xmx
of the java command line.
-
withStackInMegabytes
public SandboxPoolConfiguration.Builder withStackInMegabytes(int stackInMegabytes)
Sets the default stack size of sandbox process threads. This is done by passing this value to the option-Xss
of the java command line.
-
withBootstrapClasses
public SandboxPoolConfiguration.Builder withBootstrapClasses(List<Class<?>> bootstrapClasses)
Classes required to bootstrap a sandbox process. Most of classes can be requested from the host but in case they are not they can be specified here.
-
withErrorConsumer
public SandboxPoolConfiguration.Builder withErrorConsumer(SandboxErrorConsumer errorConsumer)
The sandbox server andSandboxTask
log a debug message by writing it to standard error. This parameter allows us to specify the method to consume standard error of a sandbox process.
-
withLogLevel
public SandboxPoolConfiguration.Builder withLogLevel(Level logLevel)
-
withJavaOptions
public SandboxPoolConfiguration.Builder withJavaOptions(String... options)
-
withDebugPortOffset
public SandboxPoolConfiguration.Builder withDebugPortOffset(Integer offset)
Opens debug port for each sandbox process starting with given offset. Null value means no debug port should be opened.
-
build
public SandboxPoolConfiguration build()
-
-