Interface Sandbox
@ExperimentalApi
public interface Sandbox
A sandbox is an object responsible for running java code in an isolated OS process. Sandbox is designed to run
 unsafe code which can timeout, run out of memory or take substantial CPU load. Any failures of sandbox process
 will not affect Confluence stability.
 
 Sandbox objects are obtained from injected SandboxRegistry. For unit tests,
 
 should be used.invalid reference
com.atlassian.confluence.impl.util.sandbox.TestSandbox
- Since:
- 6.9
- 
Method SummaryModifier and TypeMethodDescription<T,R> R execute(SandboxTask<T, R> task, T input) Run the given task with the given input in a process sandbox.<T,R> R execute(SandboxTask<T, R> task, T input, Duration timeLimit) Run the given task with the given input in a process sandbox and limit a call by a given time limit.
- 
Method Details- 
executeRun the given task with the given input in a process sandbox.- Throws:
- SandboxTimeoutException- when sandbox request has been timed out
- SandboxCrashedException- when sandbox JVM has been crashed
- SandboxException- if sandbox request has failed for some other reason
 
- 
executeRun the given task with the given input in a process sandbox and limit a call by a given time limit.- Throws:
- SandboxTimeoutException- when sandbox request has been timed out
- SandboxCrashedException- when sandbox JVM has been crashed
- SandboxException- if sandbox request has failed for some other reason
 
 
-