Class SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>
java.lang.Object
io.github.simplexdevelopment.scheduler.SchedulingSystem<T>
- All Implemented Interfaces:
ISchedule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
forceStart
(IService service) reactor.core.publisher.Mono<Void>
@NotNull reactor.core.publisher.Mono<T>
@NotNull reactor.core.publisher.Mono<ServiceManager>
@NotNull reactor.core.publisher.Mono<reactor.core.Disposable>
Queues a service to be executed in a service pool.@NotNull reactor.core.publisher.Mono<Void>
-
Constructor Details
-
SchedulingSystem
Creates a new instance of the scheduling system. This is used to manage the scheduling of services.- Parameters:
plugin
- The plugin to use for this scheduling system. This should be an instance of your plugin.
-
-
Method Details
-
getServiceManager
- Specified by:
getServiceManager
in interfaceISchedule
- Returns:
- The service manager which exerts control over the service pools and their associated services.
-
queue
@NotNull public @NotNull reactor.core.publisher.Mono<reactor.core.Disposable> queue(@NotNull @NotNull IService service) Description copied from interface:ISchedule
Queues a service to be executed in a service pool. -
runOnce
-
forceStop
-
forceStart
- Specified by:
forceStart
in interfaceISchedule
- Parameters:
service
- The service to forcefully start.- Returns:
- A Mono object which can be used to forcefully start the service with
Mono.subscribe()
.
-
getProvidingPlugin
- Returns:
- A Mono object containing your plugin, for non-blocking communication.
-
getMainScheduler
- Returns:
- The main thread which the scheduling system operates on.
-