Class SoulFireReactorScheduler
java.lang.Object
com.soulfiremc.server.script.SoulFireReactorScheduler
- All Implemented Interfaces:
reactor.core.Disposable, reactor.core.scheduler.Scheduler
public final class SoulFireReactorScheduler
extends Object
implements reactor.core.scheduler.Scheduler
Adapter that wraps SoulFireScheduler to implement Reactor's Scheduler interface.
This allows reactive pipelines to execute on SoulFire's virtual thread executor.
Supports an optional additional RunnableWrapper for per-invocation context
(e.g., bot thread-locals for trigger executions).
-
Nested Class Summary
Nested classes/interfaces inherited from interface reactor.core.Disposable
reactor.core.Disposable.Composite, reactor.core.Disposable.SwapNested classes/interfaces inherited from interface reactor.core.scheduler.Scheduler
reactor.core.scheduler.Scheduler.Worker -
Constructor Summary
ConstructorsConstructorDescriptionSoulFireReactorScheduler(SoulFireScheduler delegate) SoulFireReactorScheduler(SoulFireScheduler delegate, @Nullable SoulFireScheduler.RunnableWrapper additionalWrapper) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.scheduler.Scheduler.Workerreactor.core.Disposablereactor.core.Disposablereactor.core.DisposableschedulePeriodically(Runnable task, long initialDelay, long period, TimeUnit unit) Creates a new scheduler with an additional RunnableWrapper composed on top.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface reactor.core.Disposable
isDisposedMethods inherited from interface reactor.core.scheduler.Scheduler
dispose, disposeGracefully, init, now, start
-
Constructor Details
-
SoulFireReactorScheduler
-
SoulFireReactorScheduler
public SoulFireReactorScheduler(SoulFireScheduler delegate, @Nullable SoulFireScheduler.RunnableWrapper additionalWrapper)
-
-
Method Details
-
withAdditionalWrapper
Creates a new scheduler with an additional RunnableWrapper composed on top. The wrapper is applied to each task before delegation, ensuring thread-locals (e.g., BotConnection.CURRENT, MINECRAFT_INSTANCE) are set for all async operations. -
schedule
- Specified by:
schedulein interfacereactor.core.scheduler.Scheduler
-
schedule
-
schedulePeriodically
-
createWorker
public reactor.core.scheduler.Scheduler.Worker createWorker()- Specified by:
createWorkerin interfacereactor.core.scheduler.Scheduler
-