Constant Field Values
+Contents
+-
+
- io.github.* +
io.github.*
+-
+
- + + + +
diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index f487b71..26eb5ea 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,7 +1,7 @@
- +The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Constant Field Values page lists the static final fields and their values.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html index fad2d3a..941e1a4 100644 --- a/docs/index-files/index-1.html +++ b/docs/index-files/index-1.html @@ -1,7 +1,7 @@ - +plugin
record component.plugin
record component.ReactorBukkitScheduler
record class.BukkitScheduler
.BukkitScheduler
with a delay.BukkitScheduler
with a delay and a period.scheduler
record component.scheduler
record component.Scheduler
as its main scheduler.ReactorBukkitScheduler
as its main scheduler.ServicePool
s which are currently active.BukkitDisposable
record class.Scheduler.Worker
.NamespacedKey
used to identify unmarked services.String
used to identify unmarked services.getDelay, getNamespacedKey, getPeriod, isCancelled, isPeriodic, setCancelled
PoolHolder
@Nullable Collection<S>
default reactor.core.publisher.Flux<S>
default @Nullable reactor.core.publisher.Flux<S>
reactor.core.publisher.Mono<S>
@NotNull reactor.core.publisher.Mono<S>
reactor.core.publisher.Mono<Void>
@NotNull reactor.core.publisher.Mono<Void>
setContext(S context)
context
- A separate (or identical) object identified by the definer of this Context class.contextCollection()
, for non-blocking interpretation.reactor.core.publisher.Mono<ServiceManager>
reactor.core.publisher.Mono<ServicePool>
@NotNull reactor.core.publisher.Mono<reactor.core.Disposable>
reactor.core.publisher.Mono<Void>
service
- The service to use to locate the associated service pool and queue the service for execution.Runnable
Identifier
, Runnable
ExecutableService
, ServiceImpl
ExecutableService
, ServiceImpl
static @NotNull org.bukkit.NamespacedKey
long
getDelay()
org.bukkit.NamespacedKey
long
getDelay()
reactor.core.publisher.Mono<ServicePool>
boolean
static @NotNull org.bukkit.NamespacedKey
newNamespacedKey(String space,
- String key)
default void
run()
reactor.core.publisher.Mono<Void>
setParentPool(ServicePool servicePool)
default void
run()
reactor.core.publisher.Mono<Void>
start()
getName, getNumericalId, getUniqueId
servicePool
- The service pool to attach this service to.space
- The namespace of the service.key
- The key name of the service.IService
ExecutableService
, ServiceImpl
getName()
value.
+ This is calculated using UUID.nameUUIDFromBytes(byte[])
.getUniqueId()
value.
+ This is calculated using UUID.hashCode()
.Serializable
ServiceException(IService service)
static Supplier<ServiceException>
supplyException(IService service)
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
service
- The service that threw the exception.th
- The throwable that was thrown.service
- The service that threw the exception.Serializable
ServicePoolException(@NotNull String string)
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
string
- The message to be displayed when the exception is thrown.ex
- The exception to be thrown.private reactor.core.publisher.Flux<reactor.core.Disposable>
private SchedulingSystem<Main>
private SchedulingSystem<Main>
void
onEnable()
void
registerServices(@NotNull PoolHolder poolHolder)
Context<ServicePool>
private ServicePool
private final Collection<ServicePool>
@NotNull reactor.core.publisher.Mono<ServicePool>
@NotNull reactor.core.publisher.Mono<Void>
setContext(ServicePool context)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fluxFromCollection
getContext
in interface Context<ServicePool>
setContext
in interface Context<ServicePool>
context
- A separate (or identical) object identified by the definer of this Context class.contextCollection
in interface Context<ServicePool>
IService
, Runnable
Identifier
, IService
, Runnable
reactor.core.publisher.Mono<ServicePool>
reactor.core.publisher.Mono<Void>
start()
reactor.core.publisher.Mono<Void>
start()
reactor.core.publisher.Mono<Void>
stop()
getDelay, getNamespacedKey, getPeriod, isCancelled, isPeriodic, setCancelled
getDelay, getName, getParentPool, getPeriod, isCancelled, isPeriodic, setCancelled, setParentPool
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumericalId, getUniqueId
getParentPool
in interface IService
getParentPool
in class ExecutableService
ServicePool
which this service is executing on.Identifier
, IService
, Runnable
ServiceImpl
private boolean
private final long
private final boolean
private ServicePool
private final long
private final boolean
private final String
ExecutableService(@NotNull String service_name)
ExecutableService(@Nullable ServicePool parentPool,
+ @NotNull String service_name)
ExecutableService(@Nullable ServicePool parentPool,
+ @NotNull String service_name,
+ @NotNull Long delay,
+ @NotNull Long period,
+ @NotNull Boolean repeating)
ExecutableService(@Nullable ServicePool parentPool,
+ @NotNull String service_name,
+ @Nullable Long delay)
ExecutableService(@Nullable ServicePool parentPool,
+ @NotNull String service_name,
+ @Nullable Long delay,
+ @Nullable Long period,
+ @NotNull Boolean repeating,
+ @NotNull Boolean mayInterruptWhenRunning)
(package private) reactor.core.publisher.Mono<Void>
cancel()
long
getDelay()
getName()
reactor.core.publisher.Mono<ServicePool>
long
boolean
boolean
reactor.core.publisher.Mono<Void>
setCancelled(boolean cancel)
reactor.core.publisher.Mono<Void>
setParentPool(ServicePool servicePool)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumericalId, getUniqueId
String
,
+ to allow for easy identification within the associated ServicePool
.service_name
- A namespaced key which can be used to identify the service.String
,
+ to allow for easy identification within the associated ServicePool
.parentPool
- The ServicePool
which this service is executing on.service_name
- A namespaced key which can be used to identify the service.String
,
+ to allow for easy identification within the associated ServicePool
.parentPool
- The ServicePool
which this service is executing on.service_name
- A namespaced key which can be used to identify the service.delay
- A specified amount of time (in ticks) to wait before the service runs.repeating
as true, and the period is null,
+ then the period will automatically be set to 20 minutes.
+ Each service is registered with a String
,
+ to allow for easy identification within the associated ServicePool
.parentPool
- The ServicePool
which this service is executing on.service_name
- A namespaced key which can be used to identify the service.delay
- A specified amount of time (in ticks) to wait before the service runs.period
- How long the service should wait between service executions (in ticks).repeating
- If the service should be scheduled for repeated executions or not.repeating
as true, and the period is null,
+ then the period will automatically be set to 20 minutes.
+ Each service is registered with a String
,
+ to allow for easy identification within the associated ServicePool
.parentPool
- The ServicePool
which this service is executing on.service_name
- A namespaced key which can be used to identify the service.delay
- A specified amount of time (in ticks) to wait before the service runs.period
- How long the service should wait between service executions (in ticks).repeating
- If the service should be scheduled for repeated executions or not.mayInterruptWhenRunning
- If the service can be cancelled during execution.isPeriodic
in interface IService
cancel
- Whether the service should be cancelled or not.getParentPool
in interface IService
ServicePool
which this service is executing on.getName
in interface Identifier
IService
setParentPool
in interface IService
servicePool
- The service pool to attach this service to.reactor.core.Disposable
, reactor.core.scheduler.Scheduler
, reactor.core.scheduler.Scheduler.Worker
private final org.bukkit.plugin.java.JavaPlugin
plugin
record component.private final org.bukkit.scheduler.BukkitScheduler
scheduler
record component.ReactorBukkitScheduler(org.bukkit.plugin.java.JavaPlugin plugin,
- org.bukkit.scheduler.BukkitScheduler scheduler)
ReactorBukkitScheduler
record class.ReactorBukkitScheduler(org.bukkit.plugin.java.JavaPlugin plugin)
Scheduler.Worker
.void
dispose()
final boolean
final int
hashCode()
org.bukkit.plugin.java.JavaPlugin
plugin()
plugin
record component.@NotNull reactor.core.Disposable
BukkitScheduler
.void
dispose()
@NotNull reactor.core.Disposable
BukkitScheduler
with a delay.BukkitScheduler
.@NotNull reactor.core.Disposable
schedulePeriodically(@NotNull Runnable task,
+
+
+Delegates to the BukkitScheduler
with a delay.
+
+@NotNull reactor.core.Disposable
+schedulePeriodically(@NotNull Runnable task,
long initialDelay,
long period,
@Nullable TimeUnit unit)
-
-Delegates to the BukkitScheduler
with a delay and a period.
-
-org.bukkit.scheduler.BukkitScheduler
-
-Returns the value of the scheduler
record component.
-
-final String
-toString()
-
-Returns a string representation of this record class.
+Delegates to the BukkitScheduler
with a delay and a period.
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isDisposed
plugin
record component.scheduler
record component.ReactorBukkitScheduler
record class.plugin
- the value for the plugin
record componentscheduler
- the value for the scheduler
record componentBukkitScheduler
with a delay.BukkitScheduler
with a delay and a period.
The initial delay may be 0L, but the period must be greater than 0L.Objects::equals(Object,Object)
.plugin
record component.plugin
record componentscheduler
record component.scheduler
record componentprivate final ReactorBukkitScheduler
private final T
private final Set<ServicePool>
(package private) static int
private final ReactorBukkitScheduler
private final T
private final ServiceManager
@NotNull reactor.core.publisher.Mono<T>
@NotNull reactor.core.publisher.Mono<ServiceManager>
@NotNull reactor.core.publisher.Mono<ServiceManager>
@NotNull reactor.core.publisher.Mono<ServicePool>
@NotNull reactor.core.publisher.Mono<reactor.core.Disposable>
@NotNull reactor.core.publisher.Mono<Void>
@NotNull reactor.core.publisher.Mono<Void>
BukkitScheduler
,
+ and as a result runs on the Main server thread.ServicePool
s which contain repeating services.ISchedule
queue
in interface ISchedule
service
- The service to use to locate the associated service pool and queue the service for execution.private final Set<ServicePool>
ServicePool
s which are currently active.@NotNull reactor.core.publisher.Mono<ServicePool>
createServicePool(org.bukkit.NamespacedKey poolName,
+createServicePool(String poolName,
IService... services)
@NotNull reactor.core.publisher.Mono<ServicePool>
-emptyServicePool(org.bukkit.NamespacedKey poolName,
+emptyServicePool(String poolName,
boolean multithreaded)
@NotNull reactor.core.publisher.Mono<ServicePool>
@@ -144,7 +147,7 @@ loadScripts(document, 'script');
locateServiceWithinPools(IService service)
@NotNull reactor.core.publisher.Mono<ServicePool>
-multithreadedServicePool(org.bukkit.NamespacedKey name,
+multithreadedServicePool(String name,
IService... services)
@NotNull reactor.core.publisher.Mono<ServicePool>
@@ -172,6 +175,7 @@ loadScripts(document, 'script');
servicePools
+A set of ServicePool
s which are currently active.
@@ -202,12 +206,12 @@ loadScripts(document, 'script');
Method Details
-
-
+
createServicePool
@Contract(pure=true,
value="_, _ -> new")
@NotNull
-public @NotNull reactor.core.publisher.Mono<ServicePool> createServicePool(org.bukkit.NamespacedKey poolName,
+public @NotNull reactor.core.publisher.Mono<ServicePool> createServicePool(String poolName,
IService... services)
- Parameters:
@@ -220,12 +224,12 @@ loadScripts(document, 'script');
-
-
+
multithreadedServicePool
@Contract(pure=true,
value="_, _ -> new")
@NotNull
-public @NotNull reactor.core.publisher.Mono<ServicePool> multithreadedServicePool(org.bukkit.NamespacedKey name,
+public @NotNull reactor.core.publisher.Mono<ServicePool> multithreadedServicePool(String name,
IService... services)
- Parameters:
@@ -238,12 +242,12 @@ loadScripts(document, 'script');
-
-
+
emptyServicePool
@Contract(pure=true,
value="_, _ -> new")
@NotNull
-public @NotNull reactor.core.publisher.Mono<ServicePool> emptyServicePool(org.bukkit.NamespacedKey poolName,
+public @NotNull reactor.core.publisher.Mono<ServicePool> emptyServicePool(String poolName,
boolean multithreaded)
- Parameters:
diff --git a/docs/io/github/simplexdevelopment/scheduler/ServicePool.html b/docs/io/github/simplexdevelopment/scheduler/ServicePool.html
index 7f4d9db..063f485 100644
--- a/docs/io/github/simplexdevelopment/scheduler/ServicePool.html
+++ b/docs/io/github/simplexdevelopment/scheduler/ServicePool.html
@@ -1,7 +1,7 @@
-
+
ServicePool
@@ -36,6 +36,7 @@ loadScripts(document, 'script');
- Package
- Tree
+- Deprecated
- Index
- Help
@@ -95,22 +96,19 @@ loadScripts(document, 'script');
A collection of services related to this service pool.
-private static final org.bukkit.NamespacedKey
+private static final String
-The default NamespacedKey
used to identify unmarked services.
+The default String
used to identify unmarked services.
-private final org.bukkit.NamespacedKey
+private final String
-The key used to identify this service pool.
+The name used to identify this service pool.
-private final ReactorBukkitScheduler
-
-
-private final reactor.core.scheduler.Scheduler
-
-
+private final reactor.core.scheduler.Scheduler
+
+
The scheduler used to run the services in this pool.
@@ -124,12 +122,12 @@ loadScripts(document, 'script');
Constructor
Description
-ServicePool(org.bukkit.NamespacedKey name,
+ServicePool(String name,
boolean multithreaded)
This will create a new instance of a Service Pool with a Scheduler
as its main scheduler.
-ServicePool(org.bukkit.NamespacedKey name,
+ServicePool(String name,
org.bukkit.plugin.java.JavaPlugin plugin)
This will create a new instance of a Service Pool with the ReactorBukkitScheduler
as its main scheduler.
@@ -154,14 +152,14 @@ loadScripts(document, 'script');
-(package private) static org.bukkit.NamespacedKey
+(package private) static String
reactor.core.scheduler.Scheduler
@NotNull reactor.core.publisher.Mono<IService>
-getService(org.bukkit.NamespacedKey service_name)
+getService(String service_name)
(package private) boolean
isValidService(IService service)
@@ -179,7 +177,7 @@ loadScripts(document, 'script');
@NotNull reactor.core.publisher.Mono<Void>
-stopService(@NotNull org.bukkit.NamespacedKey service_name,
+stopService(@NotNull String service_name,
@Nullable reactor.core.publisher.Mono<reactor.core.Disposable> disposable)
@NotNull reactor.core.publisher.Mono<Void>
@@ -205,8 +203,16 @@ loadScripts(document, 'script');
DEFAULT
-private static final org.bukkit.NamespacedKey DEFAULT
-The default NamespacedKey
used to identify unmarked services. This will cause errors if left unchecked.
+
+The default String
used to identify unmarked services. This will cause errors if left unchecked.
+
+- See Also:
+-
+
+
+
@@ -226,14 +232,8 @@ loadScripts(document, 'script');
name
-private final org.bukkit.NamespacedKey name
-The key used to identify this service pool.
-
-
-
-
-rbScheduler
-
+
+The name used to identify this service pool.
@@ -245,9 +245,9 @@ loadScripts(document, 'script');
Constructor Details
-
-
+
ServicePool
-public ServicePool(org.bukkit.NamespacedKey name,
+
This will create a new instance of a Service Pool with a Scheduler
as its main scheduler.
This should be used if you'd like to execute tasks without communicating on the main server thread.
@@ -259,9 +259,9 @@ loadScripts(document, 'script');
-
-
+
ServicePool
-public ServicePool(org.bukkit.NamespacedKey name,
+
This will create a new instance of a Service Pool with the ReactorBukkitScheduler
as its main scheduler.
This should be used if you'd like to execute tasks while communicating on the main server thread.
@@ -282,7 +282,7 @@ loadScripts(document, 'script');
-
getDefaultNamespacedKey
-static org.bukkit.NamespacedKey getDefaultNamespacedKey()
+
- Returns:
- The default namespaced key to use if one is not assigned.
@@ -331,8 +331,8 @@ loadScripts(document, 'script');
- Parameters:
service
- The name of the service to queue. This should be a service that is located within this service pool.
- If you name a service that is stored within another service pool,
- this method will throw an error.
+ If you name a service that is stored within another service pool,
+ this method will throw an error.
- Returns:
- A
Mono
object which contains a Disposable
element which can be used to destroy the registered service.
@@ -365,11 +365,11 @@ loadScripts(document, 'script');
-
-
+
stopService
@NotNull
public @NotNull reactor.core.publisher.Mono<Void> stopService(@NotNull
- @NotNull org.bukkit.NamespacedKey service_name,
+ @NotNull String service_name,
@Nullable
@Nullable reactor.core.publisher.Mono<reactor.core.Disposable> disposable)
@@ -382,10 +382,10 @@ loadScripts(document, 'script');
-
-
+
getService
@NotNull
-public @NotNull reactor.core.publisher.Mono<IService> getService(org.bukkit.NamespacedKey service_name)
+ public @NotNull reactor.core.publisher.Mono<IService> getService(String service_name)
- Parameters:
service_name
- The name of the service to get.
diff --git a/docs/io/github/simplexdevelopment/scheduler/package-summary.html b/docs/io/github/simplexdevelopment/scheduler/package-summary.html
index e8bab64..38d79ba 100644
--- a/docs/io/github/simplexdevelopment/scheduler/package-summary.html
+++ b/docs/io/github/simplexdevelopment/scheduler/package-summary.html
@@ -1,7 +1,7 @@
-
+
io.github.simplexdevelopment.scheduler
@@ -36,6 +36,7 @@ loadScripts(document, 'script');
- Class
- Tree
+- Deprecated
- Index
- Help
@@ -75,14 +76,16 @@ loadScripts(document, 'script');
Description
-
-
-SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>
-
-
+
-
+
+SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>
+
+
+
+
+
diff --git a/docs/io/github/simplexdevelopment/scheduler/package-tree.html b/docs/io/github/simplexdevelopment/scheduler/package-tree.html
index f21567d..06fdd8e 100644
--- a/docs/io/github/simplexdevelopment/scheduler/package-tree.html
+++ b/docs/io/github/simplexdevelopment/scheduler/package-tree.html
@@ -1,7 +1,7 @@
-
+
io.github.simplexdevelopment.scheduler Class Hierarchy
@@ -32,6 +32,7 @@ loadScripts(document, 'script');
Package
Class
Tree
+Deprecated
Index
Help
@@ -59,10 +60,11 @@ loadScripts(document, 'script');
- java.lang.Object
+- io.github.simplexdevelopment.scheduler.ExecutableService (implements io.github.simplexdevelopment.api.IService)
+- io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler (implements reactor.core.scheduler.Scheduler, reactor.core.scheduler.Scheduler.Worker)
- java.lang.Record
- io.github.simplexdevelopment.scheduler.BukkitDisposable (implements reactor.core.Disposable)
-- io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler (implements reactor.core.scheduler.Scheduler, reactor.core.scheduler.Scheduler.Worker)
- io.github.simplexdevelopment.scheduler.SchedulingSystem<T> (implements io.github.simplexdevelopment.api.ISchedule)
diff --git a/docs/member-search-index.js b/docs/member-search-index.js
index 12e206d..c70528e 100644
--- a/docs/member-search-index.js
+++ b/docs/member-search-index.js
@@ -1 +1 @@
-memberSearchIndex = [{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"addService(IService)","u":"addService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"addToExistingPool(ServicePool, IService...)","u":"addToExistingPool(io.github.simplexdevelopment.scheduler.ServicePool,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"associatedServices"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"BukkitDisposable(BukkitTask)","u":"%3Cinit%3E(org.bukkit.scheduler.BukkitTask)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"cancel()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"cancelled"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"contextCollection()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"createServicePool(NamespacedKey, IService...)","u":"createServicePool(org.bukkit.NamespacedKey,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"createWorker()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"DEFAULT"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"delay"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"disposables"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"dispose()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"dispose()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"emptyServicePool(NamespacedKey, boolean)","u":"emptyServicePool(org.bukkit.NamespacedKey,boolean)"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"ExecutableService(NamespacedKey)","u":"%3Cinit%3E(org.bukkit.NamespacedKey)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,org.bukkit.NamespacedKey)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey, Long)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,org.bukkit.NamespacedKey,java.lang.Long)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,org.bukkit.NamespacedKey,java.lang.Long,java.lang.Long,java.lang.Boolean)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean, Boolean)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,org.bukkit.NamespacedKey,java.lang.Long,java.lang.Long,java.lang.Boolean,java.lang.Boolean)"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"fluxFromCollection()"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"forceStart(IService)","u":"forceStart(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"forceStart(IService)","u":"forceStart(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"forceStop(IService)","u":"forceStop(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"forceStop(IService)","u":"forceStop(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"getAssociatedServicePool(IService)","u":"getAssociatedServicePool(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getAssociatedServices()"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"getContext()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getDefaultNamespacedKey()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getDefaultNamespacedKey()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"getDelay()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getDelay()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getMainScheduler()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"getNamespacedKey()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getNamespacedKey()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"getParentPool()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getParentPool()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"getParentPool()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"getPeriod()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getPeriod()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getPlugin()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"getPlugin()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getProvidingPlugin()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getRepeatingPools()"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"getScheduler()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getScheduler()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getService(NamespacedKey)","u":"getService(org.bukkit.NamespacedKey)"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"getServiceManager()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getServiceManager()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"getServicePools()"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"hashCode()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"hashCode()"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServiceException","l":"InvalidServiceException(IService)","u":"%3Cinit%3E(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServiceException","l":"InvalidServiceException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServicePoolException","l":"InvalidServicePoolException()","u":"%3Cinit%3E()"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServicePoolException","l":"InvalidServicePoolException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServicePoolException","l":"InvalidServicePoolException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"isCancelled()"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"isDisposed()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"isPeriodic()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"isPeriodic()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"isValidService(IService)","u":"isValidService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"locateServiceWithinPools(IService)","u":"locateServiceWithinPools(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"mainScheduler"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"mayInterruptWhenRunning"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"multithreadedServicePool(NamespacedKey, IService...)","u":"multithreadedServicePool(org.bukkit.NamespacedKey,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"name"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"newNamespacedKey(String, String)","u":"newNamespacedKey(java.lang.String,java.lang.String)"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"onDisable()"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"onEnable()"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"parentPool"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"period"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"plugin"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"plugin"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"plugin"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"plugin()"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"pool"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"queue(IService)","u":"queue(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"queue(IService)","u":"queue(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"queueService(IService)","u":"queueService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"rbScheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"ReactorBukkitScheduler(JavaPlugin, BukkitScheduler)","u":"%3Cinit%3E(org.bukkit.plugin.java.JavaPlugin,org.bukkit.scheduler.BukkitScheduler)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"recycle()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"removeService(IService)","u":"removeService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"repeating"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"repeatingPools"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"run()"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"runOnce(IService)","u":"runOnce(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"runOnce(IService)","u":"runOnce(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"schedule(Runnable)","u":"schedule(java.lang.Runnable)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"schedule(Runnable, long, TimeUnit)","u":"schedule(java.lang.Runnable,long,java.util.concurrent.TimeUnit)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"schedulePeriodically(Runnable, long, long, TimeUnit)","u":"schedulePeriodically(java.lang.Runnable,long,long,java.util.concurrent.TimeUnit)"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"scheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"scheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"scheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"scheduler()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"SchedulingSystem(T)","u":"%3Cinit%3E(T)"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"service_name"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"ServiceImpl(Main)","u":"%3Cinit%3E(io.github.simplexdevelopment.impl.Main)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"serviceManager"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"ServiceManager()","u":"%3Cinit%3E()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"ServicePool(NamespacedKey, boolean)","u":"%3Cinit%3E(org.bukkit.NamespacedKey,boolean)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"ServicePool(NamespacedKey, JavaPlugin)","u":"%3Cinit%3E(org.bukkit.NamespacedKey,org.bukkit.plugin.java.JavaPlugin)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"servicePools"},{"p":"io.github.simplexdevelopment.api","c":"ExecutableService","l":"setCancelled(boolean)"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"setContext(S)"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"start()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"start()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"startServices()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"stop()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"stop()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"stopService(NamespacedKey, Mono)","u":"stopService(org.bukkit.NamespacedKey,reactor.core.publisher.Mono)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"stopServices(Flux)","u":"stopServices(reactor.core.publisher.Flux)"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServicePoolException","l":"supplyException()"},{"p":"io.github.simplexdevelopment.api","c":"InvalidServiceException","l":"supplyException(IService)","u":"supplyException(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"takeFromExistingPool(ServicePool, IService...)","u":"takeFromExistingPool(io.github.simplexdevelopment.scheduler.ServicePool,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"task"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"task()"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"toString()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"toString()"}];updateSearchResults();
\ No newline at end of file
+memberSearchIndex = [{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"addService(IService)","u":"addService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"addToExistingPool(ServicePool, IService...)","u":"addToExistingPool(io.github.simplexdevelopment.scheduler.ServicePool,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"associatedServices"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"BukkitDisposable(BukkitTask)","u":"%3Cinit%3E(org.bukkit.scheduler.BukkitTask)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"cancel()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"cancelled"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"contextCollection()"},{"p":"io.github.simplexdevelopment.impl","c":"PoolHolder","l":"contextCollection()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"createServicePool(String, IService...)","u":"createServicePool(java.lang.String,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"createWorker()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"DEFAULT"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"delay"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"denom"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"disposables"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"dispose()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"dispose()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"emptyServicePool(String, boolean)","u":"emptyServicePool(java.lang.String,boolean)"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"ExecutableService(ServicePool, String)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,java.lang.String)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"ExecutableService(ServicePool, String, Long)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,java.lang.String,java.lang.Long)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"ExecutableService(ServicePool, String, Long, Long, Boolean)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,java.lang.String,java.lang.Long,java.lang.Long,java.lang.Boolean)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"ExecutableService(ServicePool, String, Long, Long, Boolean, Boolean)","u":"%3Cinit%3E(io.github.simplexdevelopment.scheduler.ServicePool,java.lang.String,java.lang.Long,java.lang.Long,java.lang.Boolean,java.lang.Boolean)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"ExecutableService(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"fluxFromCollection()"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"forceStart(IService)","u":"forceStart(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"forceStart(IService)","u":"forceStart(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"forceStop(IService)","u":"forceStop(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"forceStop(IService)","u":"forceStop(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"getAssociatedServicePool(IService)","u":"getAssociatedServicePool(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getAssociatedServices()"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"getContext()"},{"p":"io.github.simplexdevelopment.impl","c":"PoolHolder","l":"getContext()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getDefaultNamespacedKey()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getDelay()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"getDelay()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getMainScheduler()"},{"p":"io.github.simplexdevelopment.api","c":"Identifier","l":"getName()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"getName()"},{"p":"io.github.simplexdevelopment.api","c":"Identifier","l":"getNumericalId()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getParentPool()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"getParentPool()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getPeriod()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"getPeriod()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"getPlugin()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"getPlugin()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getProvidingPlugin()"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"getScheduler()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getScheduler()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"getService(String)","u":"getService(java.lang.String)"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"getServiceManager()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"getServiceManager()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"getServicePools()"},{"p":"io.github.simplexdevelopment.api","c":"Identifier","l":"getUniqueId()"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"hashCode()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"isCancelled()"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"isDisposed()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"isPeriodic()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"isPeriodic()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"isValidService(IService)","u":"isValidService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"locateServiceWithinPools(IService)","u":"locateServiceWithinPools(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"mainScheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"mayInterruptWhenRunning"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"multithreadedServicePool(String, IService...)","u":"multithreadedServicePool(java.lang.String,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"name"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"onDisable()"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"onEnable()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"parentPool"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"period"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"plugin"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"plugin"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"plugin"},{"p":"io.github.simplexdevelopment.impl","c":"PoolHolder","l":"PoolHolder(Main)","u":"%3Cinit%3E(io.github.simplexdevelopment.impl.Main)"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"queue(IService)","u":"queue(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"queue(IService)","u":"queue(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"queueService(IService)","u":"queueService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"ReactorBukkitScheduler(JavaPlugin)","u":"%3Cinit%3E(org.bukkit.plugin.java.JavaPlugin)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"recycle()"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"registerServices(PoolHolder)","u":"registerServices(io.github.simplexdevelopment.impl.PoolHolder)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"removeService(IService)","u":"removeService(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"repeating"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"run()"},{"p":"io.github.simplexdevelopment.api","c":"ISchedule","l":"runOnce(IService)","u":"runOnce(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"runOnce(IService)","u":"runOnce(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"schedule(Runnable)","u":"schedule(java.lang.Runnable)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"schedule(Runnable, long, TimeUnit)","u":"schedule(java.lang.Runnable,long,java.util.concurrent.TimeUnit)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"schedulePeriodically(Runnable, long, long, TimeUnit)","u":"schedulePeriodically(java.lang.Runnable,long,long,java.util.concurrent.TimeUnit)"},{"p":"io.github.simplexdevelopment.impl","c":"Main","l":"scheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ReactorBukkitScheduler","l":"scheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"scheduler"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"SchedulingSystem(T)","u":"%3Cinit%3E(T)"},{"p":"io.github.simplexdevelopment.impl","c":"PoolHolder","l":"selectedPool"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"service_name"},{"p":"io.github.simplexdevelopment.api","c":"ServiceException","l":"ServiceException(IService)","u":"%3Cinit%3E(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.api","c":"ServiceException","l":"ServiceException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"ServiceImpl(Main, ServicePool)","u":"%3Cinit%3E(io.github.simplexdevelopment.impl.Main,io.github.simplexdevelopment.scheduler.ServicePool)"},{"p":"io.github.simplexdevelopment.scheduler","c":"SchedulingSystem","l":"serviceManager"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"ServiceManager()","u":"%3Cinit%3E()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"ServicePool(String, boolean)","u":"%3Cinit%3E(java.lang.String,boolean)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"ServicePool(String, JavaPlugin)","u":"%3Cinit%3E(java.lang.String,org.bukkit.plugin.java.JavaPlugin)"},{"p":"io.github.simplexdevelopment.impl","c":"PoolHolder","l":"servicePoolCollection"},{"p":"io.github.simplexdevelopment.api","c":"ServicePoolException","l":"ServicePoolException()","u":"%3Cinit%3E()"},{"p":"io.github.simplexdevelopment.api","c":"ServicePoolException","l":"ServicePoolException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"io.github.simplexdevelopment.api","c":"ServicePoolException","l":"ServicePoolException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"servicePools"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"setCancelled(boolean)"},{"p":"io.github.simplexdevelopment.api","c":"Context","l":"setContext(S)"},{"p":"io.github.simplexdevelopment.impl","c":"PoolHolder","l":"setContext(ServicePool)","u":"setContext(io.github.simplexdevelopment.scheduler.ServicePool)"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"setParentPool(ServicePool)","u":"setParentPool(io.github.simplexdevelopment.scheduler.ServicePool)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ExecutableService","l":"setParentPool(ServicePool)","u":"setParentPool(io.github.simplexdevelopment.scheduler.ServicePool)"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"start()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"start()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"startServices()"},{"p":"io.github.simplexdevelopment.api","c":"IService","l":"stop()"},{"p":"io.github.simplexdevelopment.impl","c":"ServiceImpl","l":"stop()"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"stopService(String, Mono)","u":"stopService(java.lang.String,reactor.core.publisher.Mono)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServicePool","l":"stopServices(Flux)","u":"stopServices(reactor.core.publisher.Flux)"},{"p":"io.github.simplexdevelopment.api","c":"ServicePoolException","l":"supplyException()"},{"p":"io.github.simplexdevelopment.api","c":"ServiceException","l":"supplyException(IService)","u":"supplyException(io.github.simplexdevelopment.api.IService)"},{"p":"io.github.simplexdevelopment.scheduler","c":"ServiceManager","l":"takeFromExistingPool(ServicePool, IService...)","u":"takeFromExistingPool(io.github.simplexdevelopment.scheduler.ServicePool,io.github.simplexdevelopment.api.IService...)"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"task"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"task()"},{"p":"io.github.simplexdevelopment.scheduler","c":"BukkitDisposable","l":"toString()"}];updateSearchResults();
\ No newline at end of file
diff --git a/docs/overview-summary.html b/docs/overview-summary.html
index f6dc9a5..1f464c9 100644
--- a/docs/overview-summary.html
+++ b/docs/overview-summary.html
@@ -1,7 +1,7 @@
-
+
Generated Documentation (Untitled)
diff --git a/docs/overview-tree.html b/docs/overview-tree.html
index ed5f22b..8d6c76c 100644
--- a/docs/overview-tree.html
+++ b/docs/overview-tree.html
@@ -1,7 +1,7 @@
-
+
Class Hierarchy
@@ -32,6 +32,7 @@ loadScripts(document, 'script');
- Package
- Class
+- Deprecated
- Index
- Help
@@ -61,7 +62,7 @@ loadScripts(document, 'script');
- java.lang.Object
-- io.github.simplexdevelopment.api.ExecutableService (implements io.github.simplexdevelopment.api.IService)
+
- io.github.simplexdevelopment.scheduler.ExecutableService (implements io.github.simplexdevelopment.api.IService)
- io.github.simplexdevelopment.impl.ServiceImpl
@@ -75,10 +76,11 @@ loadScripts(document, 'script');
+- io.github.simplexdevelopment.impl.PoolHolder (implements io.github.simplexdevelopment.api.Context<S>)
+- io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler (implements reactor.core.scheduler.Scheduler, reactor.core.scheduler.Scheduler.Worker)
- java.lang.Record
- io.github.simplexdevelopment.scheduler.BukkitDisposable (implements reactor.core.Disposable)
-- io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler (implements reactor.core.scheduler.Scheduler, reactor.core.scheduler.Scheduler.Worker)
- io.github.simplexdevelopment.scheduler.SchedulingSystem<T> (implements io.github.simplexdevelopment.api.ISchedule)
@@ -90,8 +92,8 @@ loadScripts(document, 'script');
- java.lang.RuntimeException
-- io.github.simplexdevelopment.api.InvalidServiceException
-- io.github.simplexdevelopment.api.InvalidServicePoolException
+- io.github.simplexdevelopment.api.ServiceException
+- io.github.simplexdevelopment.api.ServicePoolException
@@ -106,10 +108,15 @@ loadScripts(document, 'script');
Interface Hierarchy
- io.github.simplexdevelopment.api.Context<S>
+- io.github.simplexdevelopment.api.Identifier
+
+
- io.github.simplexdevelopment.api.ISchedule
- java.lang.Runnable
-- io.github.simplexdevelopment.api.IService
+- io.github.simplexdevelopment.api.IService (also extends io.github.simplexdevelopment.api.Identifier)
diff --git a/docs/serialized-form.html b/docs/serialized-form.html
index b6e0548..0df8a68 100644
--- a/docs/serialized-form.html
+++ b/docs/serialized-form.html
@@ -1,7 +1,7 @@
-
+
Serialized Form
@@ -32,6 +32,7 @@ loadScripts(document, 'script');
- Package
- Class
- Tree
+- Deprecated
- Index
- Help
@@ -56,15 +57,15 @@ loadScripts(document, 'script');
Package io.github.simplexdevelopment.api
-
-
-Exception io.github.simplexdevelopment.api.InvalidServiceException
-class InvalidServiceException extends RuntimeException implements Serializable
+
+Exception io.github.simplexdevelopment.api.ServiceException
+class ServiceException extends RuntimeException implements Serializable
-
-
-Exception io.github.simplexdevelopment.api.InvalidServicePoolException
-class InvalidServicePoolException extends RuntimeException implements Serializable
+
+Exception io.github.simplexdevelopment.api.ServicePoolException
+class ServicePoolException extends RuntimeException implements Serializable
diff --git a/docs/tag-search-index.js b/docs/tag-search-index.js
index f38b3cb..bf10aaf 100644
--- a/docs/tag-search-index.js
+++ b/docs/tag-search-index.js
@@ -1 +1 @@
-tagSearchIndex = [{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults();
\ No newline at end of file
+tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults();
\ No newline at end of file
diff --git a/docs/type-search-index.js b/docs/type-search-index.js
index fba3818..66f278f 100644
--- a/docs/type-search-index.js
+++ b/docs/type-search-index.js
@@ -1 +1 @@
-typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"io.github.simplexdevelopment.scheduler","l":"BukkitDisposable"},{"p":"io.github.simplexdevelopment.api","l":"Context"},{"p":"io.github.simplexdevelopment.api","l":"ExecutableService"},{"p":"io.github.simplexdevelopment.api","l":"InvalidServiceException"},{"p":"io.github.simplexdevelopment.api","l":"InvalidServicePoolException"},{"p":"io.github.simplexdevelopment.api","l":"ISchedule"},{"p":"io.github.simplexdevelopment.api","l":"IService"},{"p":"io.github.simplexdevelopment.impl","l":"Main"},{"p":"io.github.simplexdevelopment.scheduler","l":"ReactorBukkitScheduler"},{"p":"io.github.simplexdevelopment.scheduler","l":"SchedulingSystem"},{"p":"io.github.simplexdevelopment.impl","l":"ServiceImpl"},{"p":"io.github.simplexdevelopment.scheduler","l":"ServiceManager"},{"p":"io.github.simplexdevelopment.scheduler","l":"ServicePool"}];updateSearchResults();
\ No newline at end of file
+typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"io.github.simplexdevelopment.scheduler","l":"BukkitDisposable"},{"p":"io.github.simplexdevelopment.api","l":"Context"},{"p":"io.github.simplexdevelopment.scheduler","l":"ExecutableService"},{"p":"io.github.simplexdevelopment.api","l":"Identifier"},{"p":"io.github.simplexdevelopment.api","l":"ISchedule"},{"p":"io.github.simplexdevelopment.api","l":"IService"},{"p":"io.github.simplexdevelopment.impl","l":"Main"},{"p":"io.github.simplexdevelopment.impl","l":"PoolHolder"},{"p":"io.github.simplexdevelopment.scheduler","l":"ReactorBukkitScheduler"},{"p":"io.github.simplexdevelopment.scheduler","l":"SchedulingSystem"},{"p":"io.github.simplexdevelopment.api","l":"ServiceException"},{"p":"io.github.simplexdevelopment.impl","l":"ServiceImpl"},{"p":"io.github.simplexdevelopment.scheduler","l":"ServiceManager"},{"p":"io.github.simplexdevelopment.scheduler","l":"ServicePool"},{"p":"io.github.simplexdevelopment.api","l":"ServicePoolException"}];updateSearchResults();
\ No newline at end of file
diff --git a/src/main/java/io/github/simplexdevelopment/api/Context.java b/src/main/java/io/github/simplexdevelopment/api/Context.java
index 2c0becd..3d9e688 100644
--- a/src/main/java/io/github/simplexdevelopment/api/Context.java
+++ b/src/main/java/io/github/simplexdevelopment/api/Context.java
@@ -1,31 +1,34 @@
package io.github.simplexdevelopment.api;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.util.Collection;
+import java.util.Objects;
public interface Context {
/**
* @return A Mono object which contains a single element represented by the definer of this Context class.
*/
- Mono getContext();
+ @NotNull Mono getContext();
/**
* @param context A separate (or identical) object identified by the definer of this Context class.
* @return A Mono object which can be used to set the element of this Context class in a non-blocking manner.
*/
- Mono setContext(S context);
+ @NotNull Mono setContext(S context);
/**
* @return A collection of objects related to the definer of this Context class.
*/
- Collection contextCollection();
+ @Nullable Collection contextCollection();
/**
* @return A Flux object which contains the values of the {@link Context#contextCollection()}, for non-blocking interpretation.
*/
- default Flux fluxFromCollection() {
- return Flux.fromIterable(contextCollection());
+ default @Nullable Flux fluxFromCollection() {
+ return contextCollection() == null ? null : Flux.fromIterable(Objects.requireNonNull(contextCollection()));
}
}
diff --git a/src/main/java/io/github/simplexdevelopment/api/ISchedule.java b/src/main/java/io/github/simplexdevelopment/api/ISchedule.java
index c5e5545..656dc23 100644
--- a/src/main/java/io/github/simplexdevelopment/api/ISchedule.java
+++ b/src/main/java/io/github/simplexdevelopment/api/ISchedule.java
@@ -1,7 +1,8 @@
package io.github.simplexdevelopment.api;
import io.github.simplexdevelopment.scheduler.ServiceManager;
-import io.github.simplexdevelopment.scheduler.ServicePool;
+import org.jetbrains.annotations.NotNull;
+import reactor.core.Disposable;
import reactor.core.publisher.Mono;
public interface ISchedule {
@@ -12,11 +13,12 @@ public interface ISchedule {
Mono getServiceManager();
/**
+ * Queues a service to be executed in a service pool.
+ *
* @param service The service to use to locate the associated service pool and queue the service for execution.
- * @return 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.
+ * @return A Mono that can be used to cancel the service.
*/
- Mono queue(IService service);
+ @NotNull Mono queue(@NotNull IService service);
/**
* @param service The service to run once.
@@ -35,4 +37,4 @@ public interface ISchedule {
* @return A Mono object which can be used to forcefully start the service with {@link Mono#subscribe()}.
*/
Mono forceStart(IService service);
-}
+}
\ No newline at end of file
diff --git a/src/main/java/io/github/simplexdevelopment/api/IService.java b/src/main/java/io/github/simplexdevelopment/api/IService.java
index e900228..6201b35 100644
--- a/src/main/java/io/github/simplexdevelopment/api/IService.java
+++ b/src/main/java/io/github/simplexdevelopment/api/IService.java
@@ -1,22 +1,12 @@
package io.github.simplexdevelopment.api;
import io.github.simplexdevelopment.scheduler.ServicePool;
-import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import reactor.core.publisher.Mono;
-public interface IService extends Runnable {
- @Contract(" -> new")
- static @NotNull NamespacedKey getDefaultNamespacedKey() {
- return new NamespacedKey("simplex_ss", "default_service_name");
- }
-
- /**
- * @return The NamespacedKey of this service.
- */
- NamespacedKey getNamespacedKey();
+public interface IService extends Runnable, Identifier {
/**
* @return If the service should be scheduled for repeated executions or not.
@@ -60,24 +50,16 @@ public interface IService extends Runnable {
*/
Mono getParentPool();
+ /**
+ * Sets the parent pool for this service.
+ *
+ * @param servicePool The service pool to attach this service to.
+ * @return An encapsulated Mono object representing the set operation.
+ */
+ Mono setParentPool(ServicePool servicePool);
+
@Override
default void run() {
- start().subscribeOn(getParentPool()
- .map(ServicePool::getScheduler)
- .blockOptional()
- .orElseThrow(InvalidServicePoolException.supplyException()))
- .subscribe();
- }
-
- /**
- * This is an easy static call for creating a new namespaced key for services and service pools.
- *
- * @param space The namespace of the service.
- * @param key The key name of the service.
- * @return A NamespacedKey object representing the service.
- */
- @Contract("_, _ -> new")
- static @NotNull NamespacedKey newNamespacedKey(String space, String key) {
- return new NamespacedKey(space, key);
+ start().subscribe();
}
}
diff --git a/src/main/java/io/github/simplexdevelopment/api/Identifier.java b/src/main/java/io/github/simplexdevelopment/api/Identifier.java
new file mode 100644
index 0000000..c29e7c4
--- /dev/null
+++ b/src/main/java/io/github/simplexdevelopment/api/Identifier.java
@@ -0,0 +1,26 @@
+package io.github.simplexdevelopment.api;
+
+import java.util.UUID;
+
+public interface Identifier {
+ /**
+ * @return The name of the identifiable object in a readable format.
+ */
+ String getName();
+
+ /**
+ * @return The UUID of the identifiable object, based on the {@link Identifier#getName()} value.
+ * This is calculated using {@link UUID#nameUUIDFromBytes(byte[])}.
+ */
+ default UUID getUniqueId() {
+ return UUID.nameUUIDFromBytes(getName().getBytes());
+ }
+
+ /**
+ * @return The numerical id of the identifiable object, based on the {@link Identifier#getUniqueId()} value.
+ * This is calculated using {@link UUID#hashCode()}.
+ */
+ default int getNumericalId() {
+ return getUniqueId().hashCode();
+ }
+}
diff --git a/src/main/java/io/github/simplexdevelopment/api/InvalidServiceException.java b/src/main/java/io/github/simplexdevelopment/api/InvalidServiceException.java
deleted file mode 100644
index 7306a85..0000000
--- a/src/main/java/io/github/simplexdevelopment/api/InvalidServiceException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package io.github.simplexdevelopment.api;
-
-import java.util.function.Supplier;
-
-public class InvalidServiceException extends RuntimeException {
- public InvalidServiceException(IService service) {
- super("The service " + service.getNamespacedKey().getKey() + " is not present within any service pool.");
- }
-
- public InvalidServiceException(Throwable th) {
- super(th);
- }
-
- public static Supplier supplyException(IService service) {
- return () -> new InvalidServiceException(service);
- }
-}
diff --git a/src/main/java/io/github/simplexdevelopment/api/InvalidServicePoolException.java b/src/main/java/io/github/simplexdevelopment/api/InvalidServicePoolException.java
deleted file mode 100644
index 3ac425c..0000000
--- a/src/main/java/io/github/simplexdevelopment/api/InvalidServicePoolException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package io.github.simplexdevelopment.api;
-
-import org.jetbrains.annotations.Contract;
-import org.jetbrains.annotations.NotNull;
-
-import java.util.function.Supplier;
-
-public class InvalidServicePoolException extends RuntimeException {
- public InvalidServicePoolException() {
- super("There is no service pool associated with this service. The service will be automatically recycled.");
- }
-
- public InvalidServicePoolException(@NotNull String string) {
- super(string);
- }
-
- public InvalidServicePoolException(Throwable ex) {
- super(ex);
- }
-
- @Contract(pure = true)
- public static @NotNull Supplier supplyException() {
- return InvalidServicePoolException::new;
- }
-}
diff --git a/src/main/java/io/github/simplexdevelopment/api/ServiceException.java b/src/main/java/io/github/simplexdevelopment/api/ServiceException.java
new file mode 100644
index 0000000..506b73f
--- /dev/null
+++ b/src/main/java/io/github/simplexdevelopment/api/ServiceException.java
@@ -0,0 +1,29 @@
+package io.github.simplexdevelopment.api;
+
+import java.util.function.Supplier;
+
+public class ServiceException extends RuntimeException {
+ /**
+ * Constructs a new service exception which states the service is not present within any service pools.
+ *
+ * @param service The service that threw the exception.
+ */
+ public ServiceException(IService service) {
+ super("The service " + service.getName() + " is not present within any service pool.");
+ }
+
+ /**
+ * @param th The throwable that was thrown.
+ */
+ public ServiceException(Throwable th) {
+ super(th);
+ }
+
+ /**
+ * @param service The service that threw the exception.
+ * @return A supplier that can be used in conjunction with Reactor.
+ */
+ public static Supplier supplyException(IService service) {
+ return () -> new ServiceException(service);
+ }
+}
diff --git a/src/main/java/io/github/simplexdevelopment/api/ServicePoolException.java b/src/main/java/io/github/simplexdevelopment/api/ServicePoolException.java
new file mode 100644
index 0000000..6f58f4f
--- /dev/null
+++ b/src/main/java/io/github/simplexdevelopment/api/ServicePoolException.java
@@ -0,0 +1,38 @@
+package io.github.simplexdevelopment.api;
+
+import org.jetbrains.annotations.Contract;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.function.Supplier;
+
+public class ServicePoolException extends RuntimeException {
+ /**
+ * Constructs a new generic service pool exception.
+ * This will be thrown when a service attempts to execute without an associated service pool.
+ */
+ public ServicePoolException() {
+ super("There is no service pool associated with this service. The service will be automatically recycled.");
+ }
+
+ /**
+ * @param string The message to be displayed when the exception is thrown.
+ */
+ public ServicePoolException(@NotNull String string) {
+ super(string);
+ }
+
+ /**
+ * @param ex The exception to be thrown.
+ */
+ public ServicePoolException(Throwable ex) {
+ super(ex);
+ }
+
+ /**
+ * @return A supplier which can be used in conjunction with Reactor.
+ */
+ @Contract(pure = true)
+ public static @NotNull Supplier supplyException() {
+ return ServicePoolException::new;
+ }
+}
diff --git a/src/main/java/io/github/simplexdevelopment/impl/Main.java b/src/main/java/io/github/simplexdevelopment/impl/Main.java
index d618d7a..4b628df 100644
--- a/src/main/java/io/github/simplexdevelopment/impl/Main.java
+++ b/src/main/java/io/github/simplexdevelopment/impl/Main.java
@@ -1,29 +1,32 @@
package io.github.simplexdevelopment.impl;
-import io.github.simplexdevelopment.api.IService;
import io.github.simplexdevelopment.scheduler.SchedulingSystem;
-import io.github.simplexdevelopment.scheduler.ServiceManager;
-import io.github.simplexdevelopment.scheduler.ServicePool;
import org.bukkit.plugin.java.JavaPlugin;
+import org.jetbrains.annotations.NotNull;
import reactor.core.Disposable;
import reactor.core.publisher.Flux;
+import java.util.HashSet;
import java.util.Objects;
+import java.util.Set;
public class Main extends JavaPlugin {
- public ServicePool pool = new ServicePool(IService.newNamespacedKey("pool", "one"), true);
private SchedulingSystem scheduler;
private Flux disposables;
@Override
public void onEnable() {
+ // Plugin startup logic
+ // Create a new instance of the scheduling system.
this.scheduler = new SchedulingSystem<>(this);
- IService service = new ServiceImpl(this);
- service.getParentPool().subscribe(element -> disposables = element.startServices());
+ // This will register all the services and set our Flux object above.
+ registerServices(new PoolHolder(this));
}
@Override
public void onDisable() {
+ // Plugin shutdown logic
+ // This will dispose of all the services we have previously registered in our Flux object.
scheduler.getServiceManager().subscribe(manager -> {
manager.getServicePools().doOnEach(signal -> Objects.requireNonNull(signal.get())
.stopServices(disposables)
@@ -31,6 +34,27 @@ public class Main extends JavaPlugin {
});
}
+ public void registerServices(@NotNull PoolHolder poolHolder) {
+ // This set will be used to set the Flux object
+ // that will be used to stop the services when the plugin is disabled.
+ Set dispos = new HashSet<>();
+
+ // Register services here
+ ServiceImpl impl = new ServiceImpl(this, poolHolder.getContext().block());
+
+ // This will register the service to the service pool.
+ dispos.add(scheduler.getMainScheduler().schedule(impl));
+ // OR
+ scheduler.queue(impl).subscribe(dispos::add);
+ // OR
+ scheduler.getServiceManager()
+ .flatMap(manager -> manager.createServicePool("newPool", impl))
+ .subscribe(p -> p.queueService(impl).subscribe(dispos::add));
+
+ // This will set the Flux object on our previously made set, so that we can use it later on.
+ disposables = Flux.fromIterable(dispos);
+ }
+
public SchedulingSystem getScheduler() {
return this.scheduler;
}
diff --git a/src/main/java/io/github/simplexdevelopment/impl/PoolHolder.java b/src/main/java/io/github/simplexdevelopment/impl/PoolHolder.java
new file mode 100644
index 0000000..c1e1c3d
--- /dev/null
+++ b/src/main/java/io/github/simplexdevelopment/impl/PoolHolder.java
@@ -0,0 +1,36 @@
+package io.github.simplexdevelopment.impl;
+
+import io.github.simplexdevelopment.api.Context;
+import io.github.simplexdevelopment.scheduler.ServicePool;
+import org.jetbrains.annotations.NotNull;
+import reactor.core.publisher.Mono;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class PoolHolder implements Context {
+ private final Collection servicePoolCollection = new ArrayList<>();
+ private ServicePool selectedPool;
+
+ public PoolHolder(Main plugin) {
+ this.servicePoolCollection.add(new ServicePool("Pool-One", plugin));
+ this.servicePoolCollection.add(new ServicePool("Pool-Two", true));
+ this.servicePoolCollection.add(new ServicePool("Pool-Three", false));
+ this.selectedPool = servicePoolCollection.stream().findFirst().orElseGet(() -> new ServicePool("Default", plugin));
+ }
+
+ @Override
+ public @NotNull Mono getContext() {
+ return Mono.just(selectedPool);
+ }
+
+ @Override
+ public @NotNull Mono setContext(ServicePool context) {
+ return Mono.just(context).doOnNext(pool -> this.selectedPool = pool).then();
+ }
+
+ @Override
+ public Collection contextCollection() {
+ return servicePoolCollection;
+ }
+}
diff --git a/src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java b/src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java
index 781a293..ab6c470 100644
--- a/src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java
+++ b/src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java
@@ -1,7 +1,6 @@
package io.github.simplexdevelopment.impl;
-import io.github.simplexdevelopment.api.ExecutableService;
-import io.github.simplexdevelopment.api.IService;
+import io.github.simplexdevelopment.scheduler.ExecutableService;
import io.github.simplexdevelopment.scheduler.ServicePool;
import org.bukkit.plugin.java.JavaPlugin;
import reactor.core.publisher.Mono;
@@ -9,8 +8,8 @@ import reactor.core.publisher.Mono;
public class ServiceImpl extends ExecutableService {
private final Main plugin;
- public ServiceImpl(Main plugin) {
- super(plugin.pool, IService.getDefaultNamespacedKey(), 0L, 20 * 60 * 20L, true, false);
+ public ServiceImpl(Main plugin, ServicePool pool) {
+ super(pool, "default", 0L, 20 * 60 * 20L, true, false);
this.plugin = plugin;
}
@@ -34,12 +33,4 @@ public class ServiceImpl extends ExecutableService {
public Main getPlugin() {
return plugin;
}
-
- @Override
- public Mono getParentPool() {
- return getPlugin()
- .getScheduler()
- .getServiceManager()
- .flatMap(manager -> manager.getAssociatedServicePool(this));
- }
}
diff --git a/src/main/java/io/github/simplexdevelopment/api/ExecutableService.java b/src/main/java/io/github/simplexdevelopment/scheduler/ExecutableService.java
similarity index 74%
rename from src/main/java/io/github/simplexdevelopment/api/ExecutableService.java
rename to src/main/java/io/github/simplexdevelopment/scheduler/ExecutableService.java
index 8999d20..870a2c5 100644
--- a/src/main/java/io/github/simplexdevelopment/api/ExecutableService.java
+++ b/src/main/java/io/github/simplexdevelopment/scheduler/ExecutableService.java
@@ -1,7 +1,6 @@
-package io.github.simplexdevelopment.api;
+package io.github.simplexdevelopment.scheduler;
-import io.github.simplexdevelopment.scheduler.ServicePool;
-import org.bukkit.NamespacedKey;
+import io.github.simplexdevelopment.api.IService;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -10,43 +9,75 @@ import reactor.core.publisher.Mono;
import java.util.Objects;
public abstract class ExecutableService implements IService {
- private final NamespacedKey service_name;
+ /**
+ * The name of the service.
+ */
+ private final String service_name;
+ /**
+ * How long the service should wait before executing the first time.
+ */
private final long delay;
+ /**
+ * How long the service should wait between executions.
+ */
private final long period;
+ /**
+ * If the service should be executed once or continuously.
+ */
private final boolean repeating;
+ /**
+ * If the service should be allowed to stop while executing.
+ */
private final boolean mayInterruptWhenRunning;
-
- private boolean cancelled = false;
+ /**
+ * The service's execution thread.
+ */
private ServicePool parentPool;
+ /**
+ * Whether the service has been cancelled or not.
+ */
+ private boolean cancelled = false;
/**
* Creates a new instance of an executable service.
- * Each service is registered with a {@link NamespacedKey},
+ * Each service is registered with a {@link String},
* to allow for easy identification within the associated {@link ServicePool}.
*
* @param service_name A namespaced key which can be used to identify the service.
*/
- public ExecutableService(@NotNull NamespacedKey service_name) {
- this((new ServicePool(IService.newNamespacedKey("", ""), false)), service_name, 0L, 0L, false, false);
+ public ExecutableService(@NotNull String service_name) {
+ this((new ServicePool("defaultPool" + SchedulingSystem.denom, false)),
+ service_name,
+ 0L,
+ 0L,
+ false,
+ false);
+
+ SchedulingSystem.denom++;
}
/**
* Creates a new instance of an executable service.
- * Each service is registered with a {@link NamespacedKey},
+ * Each service is registered with a {@link String},
* to allow for easy identification within the associated {@link ServicePool}.
*
* @param parentPool The {@link ServicePool} which this service is executing on.
* @param service_name A namespaced key which can be used to identify the service.
*/
- public ExecutableService(@Nullable ServicePool parentPool, @NotNull NamespacedKey service_name) {
- this(parentPool, service_name, 0L, 0L, false, false);
+ public ExecutableService(@Nullable ServicePool parentPool, @NotNull String service_name) {
+ this(parentPool,
+ service_name,
+ 0L,
+ 0L,
+ false,
+ false);
}
/**
* 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 {@link NamespacedKey},
+ * Each service is registered with a {@link String},
* to allow for easy identification within the associated {@link ServicePool}.
*
* @param parentPool The {@link ServicePool} which this service is executing on.
@@ -55,9 +86,14 @@ public abstract class ExecutableService implements IService {
*/
public ExecutableService(
@Nullable ServicePool parentPool,
- @NotNull NamespacedKey service_name,
+ @NotNull String service_name,
@Nullable Long delay) {
- this(parentPool, service_name, delay, 0L, false, false);
+ this(parentPool,
+ service_name,
+ delay,
+ 0L,
+ false,
+ false);
}
/**
@@ -66,7 +102,7 @@ public abstract class ExecutableService implements IService {
* You do not need to explicitly define a delay or a period,
* however if you have flagged {@link #repeating} as true, and the period is null,
* then the period will automatically be set to 20 minutes.
- * Each service is registered with a {@link NamespacedKey},
+ * Each service is registered with a {@link String},
* to allow for easy identification within the associated {@link ServicePool}.
*
* @param parentPool The {@link ServicePool} which this service is executing on.
@@ -77,11 +113,15 @@ public abstract class ExecutableService implements IService {
*/
public ExecutableService(
@Nullable ServicePool parentPool,
- @NotNull NamespacedKey service_name,
+ @NotNull String service_name,
@NotNull Long delay,
@NotNull Long period,
@NotNull Boolean repeating) {
- this(parentPool, service_name, delay, period, repeating, false);
+ this(parentPool,
+ service_name,
+ delay, period,
+ repeating,
+ false);
}
/**
@@ -90,7 +130,7 @@ public abstract class ExecutableService implements IService {
* You do not need to explicitly define a delay or a period,
* however if you have flagged {@link #repeating} as true, and the period is null,
* then the period will automatically be set to 20 minutes.
- * Each service is registered with a {@link NamespacedKey},
+ * Each service is registered with a {@link String},
* to allow for easy identification within the associated {@link ServicePool}.
*
* @param parentPool The {@link ServicePool} which this service is executing on.
@@ -102,7 +142,7 @@ public abstract class ExecutableService implements IService {
*/
public ExecutableService(
@Nullable ServicePool parentPool,
- @NotNull NamespacedKey service_name,
+ @NotNull String service_name,
@Nullable Long delay,
@Nullable Long period,
@NotNull Boolean repeating,
@@ -115,11 +155,6 @@ public abstract class ExecutableService implements IService {
this.parentPool = parentPool;
}
- @Override
- public NamespacedKey getNamespacedKey() {
- return service_name;
- }
-
@Override
public long getDelay() {
return delay;
@@ -173,4 +208,14 @@ public abstract class ExecutableService implements IService {
public Mono getParentPool() {
return Mono.just(parentPool);
}
+
+ @Override
+ public String getName() {
+ return service_name;
+ }
+
+ @Override
+ public Mono setParentPool(ServicePool servicePool) {
+ return Mono.just(servicePool).doOnNext(pool -> this.parentPool = pool).then();
+ }
}
diff --git a/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java b/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java
index b0904e8..352e002 100644
--- a/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java
+++ b/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java
@@ -40,7 +40,7 @@ public final class ReactorBukkitScheduler
* @return A disposable that can be used to cancel the task.
*/
@Override
- public @NotNull Disposable schedule(@NotNull Runnable task, long delay, @Nullable TimeUnit unit) {
+ public @NotNull Disposable schedule(@NotNull Runnable task, long delay, @Deprecated @Nullable TimeUnit unit) {
return new BukkitDisposable(scheduler.runTaskLater(plugin, task, delay));
}
@@ -56,7 +56,7 @@ public final class ReactorBukkitScheduler
* @return A disposable that can be used to cancel the task.
*/
@Override
- public @NotNull Disposable schedulePeriodically(@NotNull Runnable task, long initialDelay, long period, @Nullable TimeUnit unit) {
+ public @NotNull Disposable schedulePeriodically(@NotNull Runnable task, long initialDelay, long period, @Deprecated @Nullable TimeUnit unit) {
if (period <= 0L) {
throw new IllegalArgumentException("Period must be greater than 0L");
}
@@ -78,6 +78,7 @@ public final class ReactorBukkitScheduler
* This method does nothing and is unused.
*/
@Override
+ @Deprecated
public void dispose() {
}
}
diff --git a/src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java b/src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java
index 61416a7..2efabee 100644
--- a/src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java
+++ b/src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java
@@ -6,40 +6,39 @@ import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitScheduler;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
+import reactor.core.Disposable;
import reactor.core.publisher.Mono;
-import reactor.core.scheduler.Scheduler;
-import reactor.core.scheduler.Schedulers;
-
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
public final class SchedulingSystem implements ISchedule {
+ /**
+ * A denominator to use when registering default service pool names.
+ */
+ static int denom = 0;
+ /**
+ * The service manager to use for controlling service pools.
+ */
private final ServiceManager serviceManager;
+ /**
+ * The plugin to use for registering tasks. This should be an instance of your plugin.
+ */
private final T plugin;
- private final Set repeatingPools;
+ /**
+ * The main scheduler which this system runs on. This is an abstraction of the {@link BukkitScheduler},
+ * and as a result runs on the Main server thread.
+ */
private final ReactorBukkitScheduler mainScheduler;
/**
* Creates a new instance of the scheduling system. This is used to manage the scheduling of services.
*
- * @param plugin The plugin to use for this scheduling system. This should be an instance of your plugin.
+ * @param plugin The plugin to use for this scheduling system. This should be an instance of your plugin.
*/
public SchedulingSystem(T plugin) {
this.serviceManager = new ServiceManager();
this.plugin = plugin;
- this.repeatingPools = new HashSet<>();
this.mainScheduler = new ReactorBukkitScheduler(plugin);
}
- /**
- * @return A set of {@link ServicePool}s which contain repeating services.
- */
- @Contract(pure = true)
- public Set getRepeatingPools() {
- return repeatingPools;
- }
-
@Override
public @NotNull Mono getServiceManager() {
return Mono.just(serviceManager);
@@ -47,20 +46,19 @@ public final class SchedulingSystem implements ISchedule {
@Override
@NotNull
- public Mono queue(@NotNull IService service) {
- return getServiceManager().flatMap(serviceManager -> {
- Mono pool = serviceManager.getAssociatedServicePool(service);
- return pool.defaultIfEmpty(Objects.requireNonNull(serviceManager
- .createServicePool(ServicePool.getDefaultNamespacedKey(), service)
- .block()));
- });
+ public Mono queue(@NotNull IService service) {
+ return getServiceManager()
+ .flatMap(manager -> manager.getAssociatedServicePool(service))
+ .flatMap(pool -> pool.queueService(service));
}
@Override
public @NotNull Mono runOnce(IService service) {
- return Mono.just(service).doOnNext(s -> {
- s.start().then(s.stop()).subscribe();
- }).then();
+ return Mono.just(service)
+ .doOnNext(s -> s.start()
+ .then(s.stop())
+ .subscribe())
+ .then();
}
@Override
diff --git a/src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java b/src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java
index 5533ef0..5cf65ef 100644
--- a/src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java
+++ b/src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java
@@ -1,7 +1,6 @@
package io.github.simplexdevelopment.scheduler;
import io.github.simplexdevelopment.api.IService;
-import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import reactor.core.publisher.Flux;
@@ -12,6 +11,9 @@ import java.util.HashSet;
import java.util.Set;
public final class ServiceManager {
+ /**
+ * A set of {@link ServicePool}s which are currently active.
+ */
private final Set servicePools;
/**
@@ -32,7 +34,7 @@ public final class ServiceManager {
* This service pool will execute each service consecutively within a singular non-blocking thread.
*/
@Contract(pure = true, value = "_, _ -> new")
- public @NotNull Mono createServicePool(NamespacedKey poolName, IService... services) {
+ public @NotNull Mono createServicePool(String poolName, IService... services) {
ServicePool pool = new ServicePool(poolName, false);
Flux.fromIterable(Arrays.asList(services)).doOnEach(s -> pool.addService(s.get()));
return Mono.just(pool);
@@ -45,7 +47,7 @@ public final class ServiceManager {
* This service pool will execute each service across a set of non-blocking threads.
*/
@Contract(pure = true, value = "_, _ -> new")
- public @NotNull Mono multithreadedServicePool(NamespacedKey name, IService... services) {
+ public @NotNull Mono multithreadedServicePool(String name, IService... services) {
ServicePool pool = new ServicePool(name, true);
Flux.fromIterable(Arrays.asList(services)).doOnEach(s -> pool.addService(s.get()));
return Mono.just(pool);
@@ -60,7 +62,7 @@ public final class ServiceManager {
* or by using {@link ServicePool#addService(IService)}.
*/
@Contract(pure = true, value = "_, _ -> new")
- public @NotNull Mono emptyServicePool(NamespacedKey poolName, boolean multithreaded) {
+ public @NotNull Mono emptyServicePool(String poolName, boolean multithreaded) {
ServicePool pool = new ServicePool(poolName, multithreaded);
return Mono.just(pool);
}
diff --git a/src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java b/src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java
index c939e98..d332463 100644
--- a/src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java
+++ b/src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java
@@ -1,7 +1,6 @@
package io.github.simplexdevelopment.scheduler;
import io.github.simplexdevelopment.api.IService;
-import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
@@ -18,9 +17,9 @@ import java.util.concurrent.TimeUnit;
public final class ServicePool {
/**
- * The default {@link NamespacedKey} used to identify unmarked services. This will cause errors if left unchecked.
+ * The default {@link String} used to identify unmarked services. This will cause errors if left unchecked.
*/
- private static final NamespacedKey DEFAULT = new NamespacedKey("simplex_ss", "default_service_pool");
+ private static final String DEFAULT = "default_service_pool";
/**
* A collection of services related to this service pool.
*/
@@ -30,9 +29,9 @@ public final class ServicePool {
*/
private final Scheduler scheduler;
/**
- * The key used to identify this service pool.
+ * The name used to identify this service pool.
*/
- private final NamespacedKey name;
+ private final String name;
/**
* This will create a new instance of a Service Pool with a {@link Scheduler} as its main scheduler.
@@ -41,7 +40,7 @@ public final class ServicePool {
* @param name The name of this service pool.
* @param multithreaded Whether this service pool should be multithreaded, or operate upon a single thread.
*/
- public ServicePool(NamespacedKey name, boolean multithreaded) {
+ public ServicePool(String name, boolean multithreaded) {
this.name = name;
this.associatedServices = new HashSet<>();
if (multithreaded) {
@@ -57,7 +56,7 @@ public final class ServicePool {
*
* @param name The name of this service pool.
*/
- public ServicePool(NamespacedKey name, JavaPlugin plugin) {
+ public ServicePool(String name, JavaPlugin plugin) {
this.name = name;
this.associatedServices = new HashSet<>();
this.scheduler = new ReactorBukkitScheduler(plugin);
@@ -66,7 +65,7 @@ public final class ServicePool {
/**
* @return The default namespaced key to use if one is not assigned.
*/
- static NamespacedKey getDefaultNamespacedKey() {
+ static String getDefaultNamespacedKey() {
return DEFAULT;
}
@@ -140,7 +139,7 @@ public final class ServicePool {
* @param disposable A {@link Disposable} object which contains the service that should be disposed.
* @return A {@link Mono} object which can be used to stop the service.
*/
- public @NotNull Mono stopService(@NotNull NamespacedKey service_name, @Nullable Mono disposable) {
+ public @NotNull Mono stopService(@NotNull String service_name, @Nullable Mono disposable) {
getService(service_name).doOnNext(IService::stop).subscribe();
if (disposable != null) {
disposable.doOnNext(Disposable::dispose).subscribe();
@@ -152,9 +151,9 @@ public final class ServicePool {
* @param service_name The name of the service to get.
* @return A {@link Mono} object which contains the service.
*/
- public @NotNull Mono getService(NamespacedKey service_name) {
+ public @NotNull Mono getService(String service_name) {
return Flux.fromIterable(getAssociatedServices())
- .filter(service -> service.getNamespacedKey().equals(service_name))
+ .filter(service -> service.getName().equals(service_name))
.next();
}