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 SandboxPoolConfigurationbuild()SandboxPoolConfiguration.BuilderwithBootstrapClasses(List<Class<?>> bootstrapClasses)Classes required to bootstrap a sandbox process.SandboxPoolConfiguration.BuilderwithConcurrencyLevel(int concurrencyLevel)Number of sandbox processes.SandboxPoolConfiguration.BuilderwithDebugPortOffset(Integer offset)Opens debug port for each sandbox process starting with given offset.SandboxPoolConfiguration.BuilderwithErrorConsumer(SandboxErrorConsumer errorConsumer)The sandbox server andSandboxTasklog a debug message by writing it to standard error.SandboxPoolConfiguration.BuilderwithJavaOptions(String... options)SandboxPoolConfiguration.BuilderwithLogLevel(Level logLevel)SandboxPoolConfiguration.BuilderwithMemoryInMegabytes(int memoryLimitInMegabytes)Limits memory of sandbox process.SandboxPoolConfiguration.BuilderwithStackInMegabytes(int stackInMegabytes)Sets the default stack size of sandbox process threads.SandboxPoolConfiguration.BuilderwithStartupTimeLimit(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-Xmxof 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-Xssof 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 andSandboxTasklog 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()
-
-