Package io.github.simplexdevelopment.api
Interface ISchedule
- All Known Implementing Classes:
SchedulingSystem
public interface ISchedule
This interface contains surface level methods for the
SchedulingSystem
to use.-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
forceStart
(IService service) reactor.core.publisher.Mono<Void>
reactor.core.publisher.Mono<ServiceManager>
@NotNull reactor.core.publisher.Mono<reactor.core.Disposable>
Queues a service to be executed in a service pool.reactor.core.publisher.Mono<Void>
-
Method Details
-
getServiceManager
reactor.core.publisher.Mono<ServiceManager> getServiceManager()- Returns:
- The service manager which exerts control over the service pools and their associated services.
-
queue
@NotNull @NotNull reactor.core.publisher.Mono<reactor.core.Disposable> queue(@NotNull @NotNull IService service) Queues a service to be executed in a service pool.- Parameters:
service
- The service to use to locate the associated service pool and queue the service for execution.- Returns:
- A Mono object that can be used to cancel the service.
-
runOnce
- Parameters:
service
- The service to run once.- Returns:
- A Mono object which can be used to run the service one time using
Mono.subscribe()
.
-
forceStop
- Parameters:
service
- The service to forcefully stop.- Returns:
- A Mono object which can be used to forcefully stop the service with
Mono.subscribe()
.
-
forceStart
- Parameters:
service
- The service to forcefully start.- Returns:
- A Mono object which can be used to forcefully start the service with
Mono.subscribe()
.
-