<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="IService.html"title="interface in io.github.simplex.api">IService</a></code>, <code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html"title="class or interface in java.lang"class="external-link">Runnable</a></code></dd>
</dl>
<dlclass="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><ahref="../impl/ServiceImpl.html"title="class in io.github.simplex.impl">ServiceImpl</a></code></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public abstract class </span><spanclass="element-name type-name-label">ExecutableService</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="IService.html"title="interface in io.github.simplex.api">IService</a></span></div>
</section>
<sectionclass="summary">
<ulclass="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<sectionclass="field-summary"id="field-summary">
<h2>Field Summary</h2>
<divclass="caption"><span>Fields</span></div>
<divclass="summary-table three-column-summary">
<divclass="table-header col-first">Modifier and Type</div>
<divclass="col-first odd-row-color"><code>private <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a></code></div>
<divclass="block">Creates a new instance of an executable service.</div>
</div>
<divclass="col-constructor-name odd-row-color"><code><ahref="#%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey)"class="member-name-link">ExecutableService</a><wbr>(@Nullable <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a> parentPool,
<divclass="block">Creates a new instance of an executable service.</div>
</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey,java.lang.Long,java.lang.Long,java.lang.Boolean)"class="member-name-link">ExecutableService</a><wbr>(@Nullable <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a> parentPool,
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> delay,
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> period,
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html"title="class or interface in java.lang"class="external-link">Boolean</a> repeating)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Creates a new instance of an executable service.</div>
</div>
<divclass="col-constructor-name odd-row-color"><code><ahref="#%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey,java.lang.Long)"class="member-name-link">ExecutableService</a><wbr>(@Nullable <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a> parentPool,
@Nullable <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> delay)</code></div>
<divclass="col-last odd-row-color">
<divclass="block">Creates a new instance of an executable service.</div>
</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey,java.lang.Long,java.lang.Long,java.lang.Boolean,java.lang.Boolean)"class="member-name-link">ExecutableService</a><wbr>(@Nullable <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a> parentPool,
@Nullable <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> delay,
@Nullable <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> period,
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html"title="class or interface in java.lang"class="external-link">Boolean</a> repeating,
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html"title="class or interface in java.lang"class="external-link">Boolean</a> mayInterruptWhenRunning)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Creates a new instance of an executable service.</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="block">Cancels the execution of this service.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<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="inherited-list">
<h3id="methods-inherited-from-class-io.github.simplex.api.IService">Methods inherited from interface io.github.simplex.api.<ahref="IService.html"title="interface in io.github.simplex.api">IService</a></h3>
<divclass="member-signature"><spanclass="modifiers">private</span> <spanclass="return-type"><ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a></span> <spanclass="element-name">parentPool</span></div>
<divclass="block">Creates a new instance of an executable service.
Each service is registered with a <code>NamespacedKey</code>,
to allow for easy identification within the associated <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>service_name</code> - A namespaced key which can be used to identify the service.</dd>
<divclass="block">Creates a new instance of an executable service.
Each service is registered with a <code>NamespacedKey</code>,
to allow for easy identification within the associated <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>parentPool</code> - The <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a> which this service is executing on.</dd>
<dd><code>service_name</code> - A namespaced key which can be used to identify the service.</dd>
@Nullable <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> delay)</span></div>
<divclass="block">Creates a new instance of an executable service.
The timings are measured in ticks (20 ticks per second).
You do not need to explicitly define a delay.
Each service is registered with a <code>NamespacedKey</code>,
to allow for easy identification within the associated <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>parentPool</code> - The <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a> which this service is executing on.</dd>
<dd><code>service_name</code> - A namespaced key which can be used to identify the service.</dd>
<dd><code>delay</code> - A specified amount of time (in ticks) to wait before the service runs.</dd>
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> delay,
@NotNull
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> period,
@NotNull
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html"title="class or interface in java.lang"class="external-link">Boolean</a> repeating)</span></div>
<divclass="block">Creates a new instance of an executable service.
The timings are measured in ticks (20 ticks per second).
You do not need to explicitly define a delay or a period,
however if you have flagged <ahref="#repeating"><code>repeating</code></a> as true, and the period is null,
then the period will automatically be set to 20 minutes.
Each service is registered with a <code>NamespacedKey</code>,
to allow for easy identification within the associated <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a>.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>parentPool</code> - The <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a> which this service is executing on.</dd>
<dd><code>service_name</code> - A namespaced key which can be used to identify the service.</dd>
<dd><code>delay</code> - A specified amount of time (in ticks) to wait before the service runs.</dd>
<dd><code>period</code> - How long the service should wait between service executions (in ticks).</dd>
<dd><code>repeating</code> - If the service should be scheduled for repeated executions or not.</dd>
@Nullable <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> delay,
@Nullable
@Nullable <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Long.html"title="class or interface in java.lang"class="external-link">Long</a> period,
@NotNull
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html"title="class or interface in java.lang"class="external-link">Boolean</a> repeating,
@NotNull
@NotNull <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Boolean.html"title="class or interface in java.lang"class="external-link">Boolean</a> mayInterruptWhenRunning)</span></div>
<divclass="block">Creates a new instance of an executable service.
The timings are measured in ticks (20 ticks per second).
You do not need to explicitly define a delay or a period,
however if you have flagged <ahref="#repeating"><code>repeating</code></a> as true, and the period is null,
then the period will automatically be set to 20 minutes.
Each service is registered with a <code>NamespacedKey</code>,
to allow for easy identification within the associated <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a>.</div>
<dd><code>parentPool</code> - The <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a> which this service is executing on.</dd>
<dd><code><ahref="IService.html#getNamespacedKey()">getNamespacedKey</a></code> in interface <code><ahref="IService.html"title="interface in io.github.simplex.api">IService</a></code></dd>
<dd><code><ahref="IService.html#getDelay()">getDelay</a></code> in interface <code><ahref="IService.html"title="interface in io.github.simplex.api">IService</a></code></dd>
<dt>Returns:</dt>
<dd>How long the service should wait before executing the first time.</dd>
<dd><code><ahref="IService.html#getPeriod()">getPeriod</a></code> in interface <code><ahref="IService.html"title="interface in io.github.simplex.api">IService</a></code></dd>
<dt>Returns:</dt>
<dd>How long the service should wait between subsequent executions.</dd>
<dd><code><ahref="IService.html#isPeriodic()">isPeriodic</a></code> in interface <code><ahref="IService.html"title="interface in io.github.simplex.api">IService</a></code></dd>
<dt>Returns:</dt>
<dd>If the service should be scheduled for repeated executions or not.</dd>
<divclass="block">Cancels the execution of this service.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>true if the service was cancelled, false if not.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="setCancelled(boolean)">
<h3>setCancelled</h3>
<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">setCancelled</span><wbr><spanclass="parameters">(boolean cancel)</span></div>
<divclass="block">Cancels the execution of this service.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>cancel</code> - Whether the service should be cancelled or not.</dd>
</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">cancel</span>()</div>
<divclass="block">Actual stop call, to ensure that the service actually #isCancelled().</div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="return-type">reactor.core.publisher.Mono<<ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss">ServicePool</a>></span> <spanclass="element-name">getParentPool</span>()</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="IService.html#getParentPool()">getParentPool</a></code> in interface <code><ahref="IService.html"title="interface in io.github.simplex.api">IService</a></code></dd>
<dt>Returns:</dt>
<dd>The <ahref="../simplexss/ServicePool.html"title="class in io.github.simplex.simplexss"><code>ServicePool</code></a> which this service is executing on.</dd>