Class SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>
java.lang.Object
io.github.simplexdevelopment.scheduler.SchedulingSystem<T>
- All Implemented Interfaces:
ISchedule
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ReactorBukkitScheduler
private final T
private final Set<ServicePool>
private final ServiceManager
-
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<ServicePool>
@NotNull reactor.core.publisher.Mono<Void>
-
Field Details
-
serviceManager
-
plugin
-
repeatingPools
-
mainScheduler
-
-
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
-
getRepeatingPools
- Returns:
- A set of
ServicePool
s which contain repeating services.
-
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<ServicePool> queue(@NotNull @NotNull IService service) - Specified by:
queue
in interfaceISchedule
- Parameters:
service
- The service to use to locate the associated service pool and queue the service for execution.- Returns:
- A Mono
that can be used to prepare the service for execution within it's associated service pool. If the service has no associated pool, a new pool will be created.
-
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.
-