<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<dd><code><ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></code></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public final class </span><spanclass="element-name type-name-label">SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin></span>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>
implements <ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></span></div>
<divclass="block">This class is used to manage the scheduling of <ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api"><code>IService</code></a>s,
and the creation of <ahref="ServicePool.html"title="class in io.github.simplexdevelopment.scheduler"><code>ServicePool</code></a>s through the <ahref="ServiceManager.html"title="class in io.github.simplexdevelopment.scheduler"><code>ServiceManager</code></a>.
The <ahref="ServiceManager.html"title="class in io.github.simplexdevelopment.scheduler"><code>ServiceManager</code></a> should be used to create new <ahref="ServicePool.html"title="class in io.github.simplexdevelopment.scheduler"><code>ServicePool</code></a>s on
initialization of your plugin, and your <ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api"><code>IService</code></a>s should be registered in the
<code>JavaPlugin.onEnable()</code> method. You can then use the <ahref="#queue(io.github.simplexdevelopment.api.IService)"><code>queue(IService)</code></a> method
to then queue up your services, or call <ahref="#queueAll()"><code>queueAll()</code></a> to queue up all services in every pool.
<ahref="#forceStart(io.github.simplexdevelopment.api.IService)"><code>forceStart(IService)</code></a> and <ahref="#forceStop(io.github.simplexdevelopment.api.IService)"><code>forceStop(IService)</code></a> will forcefully start and stop the services, respectively.
<ahref="#getMainScheduler()"><code>getMainScheduler()</code></a> gets the main scheduler for the scheduling system, which is a <ahref="ReactorBukkitScheduler.html"title="class in io.github.simplexdevelopment.scheduler"><code>ReactorBukkitScheduler</code></a> object.</div>
<dlclass="notes">
<dt>See Also:</dt>
<dd>
<ulclass="see-list">
<li><ahref="ServiceManager.html"title="class in io.github.simplexdevelopment.scheduler"><code>ServiceManager</code></a></li>
<li><ahref="ServicePool.html"title="class in io.github.simplexdevelopment.scheduler"><code>ServicePool</code></a></li>
<li><ahref="ReactorBukkitScheduler.html"title="class in io.github.simplexdevelopment.scheduler"><code>ReactorBukkitScheduler</code></a></li>
<divclass="block">A denominator to use when registering default service pool names.</div>
</div>
<divclass="col-first odd-row-color"><code>private final <ahref="ReactorBukkitScheduler.html"title="class in io.github.simplexdevelopment.scheduler">ReactorBukkitScheduler</a></code></div>
<divclass="col-first odd-row-color"><code>private final <ahref="ServiceManager.html"title="class in io.github.simplexdevelopment.scheduler">ServiceManager</a></code></div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(T)"class="member-name-link">SchedulingSystem</a><wbr>(<ahref="SchedulingSystem.html"title="type parameter in SchedulingSystem">T</a> plugin)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Creates a new instance of the scheduling system.</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>reactor.core.publisher.Mono<<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html"title="class or interface in java.lang"class="external-link">Void</a>></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#forceStart(io.github.simplexdevelopment.api.IService)"class="member-name-link">forceStart</a><wbr>(<ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api">IService</a> service)</code></div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>reactor.core.publisher.Mono<<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html"title="class or interface in java.lang"class="external-link">Void</a>></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#forceStop(io.github.simplexdevelopment.api.IService)"class="member-name-link">forceStop</a><wbr>(<ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api">IService</a> service)</code></div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@NotNull reactor.core.publisher.Mono<<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html"title="class or interface in java.lang"class="external-link">Void</a>></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runOnce(io.github.simplexdevelopment.api.IService)"class="member-name-link">runOnce</a><wbr>(<ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api">IService</a> service)</code></div>
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()"title="class or interface in java.lang"class="external-link">clone</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()"title="class or interface in java.lang"class="external-link">finalize</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"title="class or interface in java.lang"class="external-link">toString</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
<divclass="member-signature"><spanclass="modifiers">private final</span> <spanclass="return-type"><ahref="ServiceManager.html"title="class in io.github.simplexdevelopment.scheduler">ServiceManager</a></span> <spanclass="element-name">serviceManager</span></div>
<divclass="member-signature"><spanclass="modifiers">private final</span> <spanclass="return-type"><ahref="ReactorBukkitScheduler.html"title="class in io.github.simplexdevelopment.scheduler">ReactorBukkitScheduler</a></span> <spanclass="element-name">mainScheduler</span></div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">SchedulingSystem</span><wbr><spanclass="parameters">(<ahref="SchedulingSystem.html"title="type parameter in SchedulingSystem">T</a> plugin)</span></div>
<divclass="block">Creates a new instance of the scheduling system. This is used to manage the scheduling of services.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - The plugin to use for this scheduling system. This should be an instance of your plugin.</dd>
</span><spanclass="modifiers">public</span> <spanclass="return-type">@NotNull reactor.core.publisher.Mono<<ahref="ServiceManager.html"title="class in io.github.simplexdevelopment.scheduler">ServiceManager</a>></span> <spanclass="element-name">getServiceManager</span>()</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../api/ISchedule.html#getServiceManager()">getServiceManager</a></code> in interface <code><ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></code></dd>
<dt>Returns:</dt>
<dd>The service manager which exerts control over the service pools and their associated services.</dd>
<divclass="block"><spanclass="descfrm-type-label">Description copied from interface: <code><ahref="../api/ISchedule.html#queue(io.github.simplexdevelopment.api.IService)">ISchedule</a></code></span></div>
<divclass="block">Queues a service to be executed in a service pool.</div>
<dd><code><ahref="../api/ISchedule.html#queue(io.github.simplexdevelopment.api.IService)">queue</a></code> in interface <code><ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></code></dd>
<dt>Parameters:</dt>
<dd><code>service</code> - The service to use to locate the associated service pool and queue the service for execution.</dd>
</span><spanclass="modifiers">public</span> <spanclass="return-type">@NotNull reactor.core.publisher.Mono<<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html"title="class or interface in java.lang"class="external-link">Void</a>></span> <spanclass="element-name">runOnce</span><wbr><spanclass="parameters">(<ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api">IService</a> service)</span></div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../api/ISchedule.html#runOnce(io.github.simplexdevelopment.api.IService)">runOnce</a></code> in interface <code><ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></code></dd>
<dt>Parameters:</dt>
<dd><code>service</code> - The service to run once.</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">reactor.core.publisher.Mono<<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html"title="class or interface in java.lang"class="external-link">Void</a>></span> <spanclass="element-name">forceStop</span><wbr><spanclass="parameters">(<ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api">IService</a> service)</span></div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../api/ISchedule.html#forceStop(io.github.simplexdevelopment.api.IService)">forceStop</a></code> in interface <code><ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></code></dd>
<dt>Parameters:</dt>
<dd><code>service</code> - The service to forcefully stop.</dd>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">reactor.core.publisher.Mono<<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html"title="class or interface in java.lang"class="external-link">Void</a>></span> <spanclass="element-name">forceStart</span><wbr><spanclass="parameters">(<ahref="../api/IService.html"title="interface in io.github.simplexdevelopment.api">IService</a> service)</span></div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../api/ISchedule.html#forceStart(io.github.simplexdevelopment.api.IService)">forceStart</a></code> in interface <code><ahref="../api/ISchedule.html"title="interface in io.github.simplexdevelopment.api">ISchedule</a></code></dd>
<dt>Parameters:</dt>
<dd><code>service</code> - The service to forcefully start.</dd>
</span><spanclass="modifiers">public</span> <spanclass="return-type">@NotNull reactor.core.publisher.Mono<<ahref="SchedulingSystem.html"title="type parameter in SchedulingSystem">T</a>></span> <spanclass="element-name">getProvidingPlugin</span>()</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>A Mono object containing your plugin, for non-blocking communication.</dd>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="ReactorBukkitScheduler.html"title="class in io.github.simplexdevelopment.scheduler">ReactorBukkitScheduler</a></span> <spanclass="element-name">getMainScheduler</span>()</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>The main thread which the scheduling system operates on.</dd>