Interface SandboxRegistry


@ExperimentalApi public interface SandboxRegistry
This is the entry point for usage of sandbox API. The code should inject instance of this interface and to retrieve a sandbox instance from it.

As sandbox instances can be shared in the application, there's no need to explicitly release the sandbox after usage.

Since:
6.12
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the most suitable sandbox instance from the system satisfying the specification.
  • Method Details

    • get

      Sandbox get(SandboxSpec spec)
      Get the most suitable sandbox instance from the system satisfying the specification. It is guaranteed that sandbox will have at least an amount of resources from specification.
      Parameters:
      spec - - specification for the sandbox
      Returns:
      sandbox instance satisfying the specification
      Throws:
      SandboxException - if sandbox with given resources can't be found