Record Class SandboxedExecution.SandboxConfig
java.lang.Object
java.lang.Record
com.tnsai.coordination.supervisor.SandboxedExecution.SandboxConfig
- Record Components:
timeout- maximum execution timemaxMemoryBytes- maximum memory in bytes (advisory, not enforced by JVM)allowedActions- set of allowed action names; empty means all allowedreadOnly- if true, the agent is informed the task is read-only
- Enclosing class:
SandboxedExecution
public static record SandboxedExecution.SandboxConfig(Duration timeout, long maxMemoryBytes, Set<String> allowedActions, boolean readOnly)
extends Record
Configuration for sandboxed execution.
-
Constructor Summary
ConstructorsConstructorDescriptionSandboxConfig(Duration timeout, long maxMemoryBytes, Set<String> allowedActions, boolean readOnly) Creates a SandboxConfig with validation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedActionsrecord component.defaults()Creates a default config with 30-second timeout and no restrictions.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxMemoryBytesrecord component.booleanreadOnly()Returns the value of thereadOnlyrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
defaults
Creates a default config with 30-second timeout and no restrictions.- Returns:
- default sandbox configuration
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
maxMemoryBytes
public long maxMemoryBytes()Returns the value of themaxMemoryBytesrecord component.- Returns:
- the value of the
maxMemoryBytesrecord component
-
allowedActions
Returns the value of theallowedActionsrecord component.- Returns:
- the value of the
allowedActionsrecord component
-
readOnly
public boolean readOnly()Returns the value of thereadOnlyrecord component.- Returns:
- the value of the
readOnlyrecord component
-