Record Class BlockingScheduler
java.lang.Object
java.lang.Record
io.reactivex.rxjava4.schedulers.BlockingScheduler
- Record Components:
backingScheduler- the scheduler instance
public record BlockingScheduler(io.reactivex.rxjava4.internal.schedulers.BlockingCurrentThreadScheduler backingScheduler)
extends Record
Holds onto a blocking scheduler instance and provides access to its
execute()
method and a way to obtain a pure Scheduler instance to be used as parameter.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBlockingScheduler(io.reactivex.rxjava4.internal.schedulers.BlockingCurrentThreadScheduler backingScheduler) Creates an instance of aBlockingSchedulerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava4.internal.schedulers.BlockingCurrentThreadSchedulerReturns the value of thebackingSchedulerrecord component.final booleanIndicates whether some other object is "equal to" this one.voidexecute()Begin executing the blocking event loop without any initial action.voidBegin executing the blocking event loop with the given initial action (usually contain the rest of the 'main' method).final inthashCode()Returns a hash code value for this object.Returns the Scheduler view to submit tasks to or use it as a parameter.voidshutdown()Shuts down the underlying blocking current thread schedulerfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BlockingScheduler
public BlockingScheduler(io.reactivex.rxjava4.internal.schedulers.BlockingCurrentThreadScheduler backingScheduler) Creates an instance of aBlockingSchedulerrecord class.- Parameters:
backingScheduler- the value for thebackingSchedulerrecord component
-
-
Method Details
-
scheduler
Returns the Scheduler view to submit tasks to or use it as a parameter.- Returns:
- the Scheduler view of the underlying blocking current thread scheduler.
-
execute
public void execute()Begin executing the blocking event loop without any initial action.This method will block until the
Scheduler.shutdown()is invoked.- See Also:
-
execute
Begin executing the blocking event loop with the given initial action (usually contain the rest of the 'main' method).This method will block until the
Scheduler.shutdown()is invoked.- Parameters:
action- the action to execute
-
shutdown
public void shutdown()Shuts down the underlying blocking current thread scheduler -
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). -
backingScheduler
public io.reactivex.rxjava4.internal.schedulers.BlockingCurrentThreadScheduler backingScheduler()Returns the value of thebackingSchedulerrecord component.- Returns:
- the value of the
backingSchedulerrecord component
-