Record Class ScriptQuotasConfig
java.lang.Object
java.lang.Record
com.soulfiremc.server.script.ScriptQuotasConfig
public record ScriptQuotasConfig(long maxExecutionCount, Duration dataEdgeTimeout, Duration nodeExecutionTimeout, int maxConcurrentTriggers, long maxStateStoreEntries, boolean disableTimeouts)
extends Record
Immutable configuration record for script execution quotas.
Duration.ZERO means "no timeout" (timeouts disabled).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Durationstatic final intstatic final longstatic final longstatic final Durationstatic final ScriptQuotasConfig -
Constructor Summary
ConstructorsConstructorDescriptionScriptQuotasConfig(long maxExecutionCount, Duration dataEdgeTimeout, Duration nodeExecutionTimeout, int maxConcurrentTriggers, long maxStateStoreEntries, boolean disableTimeouts) Creates an instance of aScriptQuotasConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataEdgeTimeoutrecord component.booleanReturns the value of thedisableTimeoutsrecord component.final booleanIndicates whether some other object is "equal to" this one.static ScriptQuotasConfigfromProto(ScriptQuotas proto) Creates a ScriptQuotasConfig from a protobuf ScriptQuotas message.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxConcurrentTriggersrecord component.longReturns the value of themaxExecutionCountrecord component.longReturns the value of themaxStateStoreEntriesrecord component.Returns the value of thenodeExecutionTimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_MAX_EXECUTION_COUNT
public static final long DEFAULT_MAX_EXECUTION_COUNT- See Also:
-
DEFAULT_DATA_EDGE_TIMEOUT
-
DEFAULT_NODE_EXECUTION_TIMEOUT
-
DEFAULT_MAX_CONCURRENT_TRIGGERS
public static final int DEFAULT_MAX_CONCURRENT_TRIGGERS- See Also:
-
DEFAULT_MAX_STATE_STORE_ENTRIES
public static final long DEFAULT_MAX_STATE_STORE_ENTRIES- See Also:
-
DEFAULTS
-
-
Constructor Details
-
ScriptQuotasConfig
public ScriptQuotasConfig(long maxExecutionCount, Duration dataEdgeTimeout, Duration nodeExecutionTimeout, int maxConcurrentTriggers, long maxStateStoreEntries, boolean disableTimeouts) Creates an instance of aScriptQuotasConfigrecord class.- Parameters:
maxExecutionCount- the value for themaxExecutionCountrecord componentdataEdgeTimeout- the value for thedataEdgeTimeoutrecord componentnodeExecutionTimeout- the value for thenodeExecutionTimeoutrecord componentmaxConcurrentTriggers- the value for themaxConcurrentTriggersrecord componentmaxStateStoreEntries- the value for themaxStateStoreEntriesrecord componentdisableTimeouts- the value for thedisableTimeoutsrecord component
-
-
Method Details
-
fromProto
Creates a ScriptQuotasConfig from a protobuf ScriptQuotas message. Unset fields use server defaults. -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
maxExecutionCount
public long maxExecutionCount()Returns the value of themaxExecutionCountrecord component.- Returns:
- the value of the
maxExecutionCountrecord component
-
dataEdgeTimeout
Returns the value of thedataEdgeTimeoutrecord component.- Returns:
- the value of the
dataEdgeTimeoutrecord component
-
nodeExecutionTimeout
Returns the value of thenodeExecutionTimeoutrecord component.- Returns:
- the value of the
nodeExecutionTimeoutrecord component
-
maxConcurrentTriggers
public int maxConcurrentTriggers()Returns the value of themaxConcurrentTriggersrecord component.- Returns:
- the value of the
maxConcurrentTriggersrecord component
-
maxStateStoreEntries
public long maxStateStoreEntries()Returns the value of themaxStateStoreEntriesrecord component.- Returns:
- the value of the
maxStateStoreEntriesrecord component
-
disableTimeouts
public boolean disableTimeouts()Returns the value of thedisableTimeoutsrecord component.- Returns:
- the value of the
disableTimeoutsrecord component
-