Record Class AsyncTask.ScopeOptions
java.lang.Object
java.lang.Record
org.tavall.couriers.api.concurrent.AsyncTask.ScopeOptions
- Enclosing class:
AsyncTask
public static record AsyncTask.ScopeOptions(ThreadFactory threadFactory, String name, Duration timeout)
extends Record
Configuration knobs for the scope. Mirrors what the JDK exposes: thread factory, name, timeout.
-
Constructor Summary
ConstructorsConstructorDescriptionScopeOptions(ThreadFactory threadFactory, String name, Duration timeout) Creates an instance of aScopeOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncTask.ScopeOptionsdefaults()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thethreadFactoryrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.withTimeout(Duration timeout)
-
Constructor Details
-
ScopeOptions
Creates an instance of aScopeOptionsrecord class.- Parameters:
threadFactory- the value for thethreadFactoryrecord componentname- the value for thenamerecord componenttimeout- the value for thetimeoutrecord component
-
-
Method Details
-
defaults
-
withThreadFactory
-
withName
-
withTimeout
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
threadFactory
Returns the value of thethreadFactoryrecord component.- Returns:
- the value of the
threadFactoryrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-