Record Class QueueOptions
java.lang.Object
java.lang.Record
org.mineskin.QueueOptions
- Record Components:
scheduler- Executor service to run the queueintervalMillis- Interval in milliseconds between each requestconcurrency- Maximum number of concurrent requests
public record QueueOptions(ScheduledExecutorService scheduler, int intervalMillis, int concurrency)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionQueueOptions(ScheduledExecutorService scheduler, int intervalMillis, int concurrency) Creates an instance of aQueueOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theconcurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theintervalMillisrecord component.Returns the value of theschedulerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QueueOptions
Creates an instance of aQueueOptionsrecord class.- Parameters:
scheduler- the value for theschedulerrecord componentintervalMillis- the value for theintervalMillisrecord componentconcurrency- the value for theconcurrencyrecord component
-
-
Method Details
-
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. -
scheduler
-
intervalMillis
public int intervalMillis()Returns the value of theintervalMillisrecord component.- Returns:
- the value of the
intervalMillisrecord component
-
concurrency
public int concurrency()Returns the value of theconcurrencyrecord component.- Returns:
- the value of the
concurrencyrecord component
-