From 262115a52e3d6210a6478d7a5d79734aa4ea01d1 Mon Sep 17 00:00:00 2001 From: Paldiu Date: Wed, 14 Dec 2022 11:15:42 -0600 Subject: [PATCH] Added Bukkit communication with BukkitScheduler --- docs/allclasses-index.html | 42 +- docs/allpackages-index.html | 10 +- docs/element-list | 6 +- docs/help-doc.html | 4 +- docs/index-files/index-1.html | 14 +- docs/index-files/index-10.html | 24 +- docs/index-files/index-11.html | 24 +- docs/index-files/index-12.html | 32 +- docs/index-files/index-13.html | 20 +- docs/index-files/index-14.html | 36 +- docs/index-files/index-15.html | 74 +-- docs/index-files/index-16.html | 36 +- docs/index-files/index-17.html | 147 +++++ docs/index-files/index-18.html | 79 +++ docs/index-files/index-2.html | 28 +- docs/index-files/index-3.html | 30 +- docs/index-files/index-4.html | 42 +- docs/index-files/index-5.html | 52 +- docs/index-files/index-6.html | 64 +-- docs/index-files/index-7.html | 68 ++- docs/index-files/index-8.html | 24 +- docs/index-files/index-9.html | 52 +- docs/index.html | 10 +- docs/io/github/simplex/api/Context.html | 4 +- .../github/simplex/api/ExecutableService.html | 76 +-- docs/io/github/simplex/api/ISchedule.html | 36 +- docs/io/github/simplex/api/IService.html | 12 +- .../simplex/api/InvalidServiceException.html | 22 +- .../api/InvalidServicePoolException.html | 12 +- .../github/simplex/api/package-summary.html | 20 +- docs/io/github/simplex/api/package-tree.html | 18 +- docs/io/github/simplex/impl/Main.html | 18 +- docs/io/github/simplex/impl/ServiceImpl.html | 40 +- .../github/simplex/impl/package-summary.html | 12 +- docs/io/github/simplex/impl/package-tree.html | 12 +- .../simplex/simplexss/SchedulingSystem.html | 74 +-- .../simplex/simplexss/ServiceManager.html | 102 ++-- .../github/simplex/simplexss/ServicePool.html | 42 +- .../simplex/simplexss/package-summary.html | 14 +- .../simplex/simplexss/package-tree.html | 12 +- .../simplexdevelopment/api/Context.html | 169 ++++++ .../api/ExecutableService.html | 504 ++++++++++++++++++ .../simplexdevelopment/api/ISchedule.html | 193 +++++++ .../simplexdevelopment/api/IService.html | 284 ++++++++++ .../api/InvalidServiceException.html | 187 +++++++ .../api/InvalidServicePoolException.html | 198 +++++++ .../api/package-summary.html | 98 ++++ .../simplexdevelopment/api/package-tree.html | 97 ++++ .../github/simplexdevelopment/impl/Main.html | 252 +++++++++ .../simplexdevelopment/impl/ServiceImpl.html | 257 +++++++++ .../impl/package-summary.html | 84 +++ .../simplexdevelopment/impl/package-tree.html | 84 +++ .../scheduler/BukkitDisposable.html | 310 +++++++++++ .../scheduler/ReactorBukkitScheduler.html | 445 ++++++++++++++++ .../scheduler/SchedulingSystem.html | 347 ++++++++++++ .../scheduler/ServiceManager.html | 344 ++++++++++++ .../scheduler/ServicePool.html | 440 +++++++++++++++ .../scheduler/package-summary.html | 96 ++++ .../scheduler/package-tree.html | 79 +++ docs/member-search-index.js | 2 +- docs/overview-summary.html | 4 +- docs/overview-tree.html | 38 +- docs/package-search-index.js | 2 +- docs/serialized-form.html | 14 +- docs/type-search-index.js | 2 +- .../api/Context.java | 2 +- .../api/ExecutableService.java | 4 +- .../api/ISchedule.java | 6 +- .../api/IService.java | 4 +- .../api/InvalidServiceException.java | 2 +- .../api/InvalidServicePoolException.java | 6 +- .../impl/Main.java | 14 +- .../impl/ServiceImpl.java | 8 +- .../scheduler/BukkitDisposable.java | 24 + .../scheduler/ReactorBukkitScheduler.java | 77 +++ .../scheduler}/SchedulingSystem.java | 18 +- .../scheduler}/ServiceManager.java | 4 +- .../scheduler}/ServicePool.java | 103 ++-- 78 files changed, 5535 insertions(+), 711 deletions(-) create mode 100644 docs/index-files/index-17.html create mode 100644 docs/index-files/index-18.html create mode 100644 docs/io/github/simplexdevelopment/api/Context.html create mode 100644 docs/io/github/simplexdevelopment/api/ExecutableService.html create mode 100644 docs/io/github/simplexdevelopment/api/ISchedule.html create mode 100644 docs/io/github/simplexdevelopment/api/IService.html create mode 100644 docs/io/github/simplexdevelopment/api/InvalidServiceException.html create mode 100644 docs/io/github/simplexdevelopment/api/InvalidServicePoolException.html create mode 100644 docs/io/github/simplexdevelopment/api/package-summary.html create mode 100644 docs/io/github/simplexdevelopment/api/package-tree.html create mode 100644 docs/io/github/simplexdevelopment/impl/Main.html create mode 100644 docs/io/github/simplexdevelopment/impl/ServiceImpl.html create mode 100644 docs/io/github/simplexdevelopment/impl/package-summary.html create mode 100644 docs/io/github/simplexdevelopment/impl/package-tree.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/BukkitDisposable.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/SchedulingSystem.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/ServiceManager.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/ServicePool.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/package-summary.html create mode 100644 docs/io/github/simplexdevelopment/scheduler/package-tree.html rename src/main/java/io/github/{simplex => simplexdevelopment}/api/Context.java (95%) rename src/main/java/io/github/{simplex => simplexdevelopment}/api/ExecutableService.java (98%) rename src/main/java/io/github/{simplex => simplexdevelopment}/api/ISchedule.java (88%) rename src/main/java/io/github/{simplex => simplexdevelopment}/api/IService.java (96%) rename src/main/java/io/github/{simplex => simplexdevelopment}/api/InvalidServiceException.java (92%) rename src/main/java/io/github/{simplex => simplexdevelopment}/api/InvalidServicePoolException.java (81%) rename src/main/java/io/github/{simplex => simplexdevelopment}/impl/Main.java (68%) rename src/main/java/io/github/{simplex => simplexdevelopment}/impl/ServiceImpl.java (84%) create mode 100644 src/main/java/io/github/simplexdevelopment/scheduler/BukkitDisposable.java create mode 100644 src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java rename src/main/java/io/github/{simplex/simplexss => simplexdevelopment/scheduler}/SchedulingSystem.java (82%) rename src/main/java/io/github/{simplex/simplexss => simplexdevelopment/scheduler}/ServiceManager.java (98%) rename src/main/java/io/github/{simplex/simplexss => simplexdevelopment/scheduler}/ServicePool.java (62%) diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 6534011..f487b71 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,11 +1,11 @@ - + All Classes and Interfaces - + @@ -55,32 +55,36 @@ loadScripts(document, 'script');

All Classes and Interfaces

-
+
Class
Description
- -
 
- -
 
- -
 
- -
 
- -
 
- + +
 
+
 
- +
 
-
SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>
+ +
 
+ +
 
+ +
 
+ +
 
+
 
- + +
 
+
SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>
+
 
+
 
- +
 
- +
 
diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index f01cd56..9001523 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -1,11 +1,11 @@ - + All Packages - + @@ -54,11 +54,11 @@ loadScripts(document, 'script'); diff --git a/docs/element-list b/docs/element-list index b92cf65..2a57251 100644 --- a/docs/element-list +++ b/docs/element-list @@ -1,3 +1,3 @@ -io.github.simplex.api -io.github.simplex.impl -io.github.simplex.simplexss +io.github.simplexdevelopment.api +io.github.simplexdevelopment.impl +io.github.simplexdevelopment.scheduler diff --git a/docs/help-doc.html b/docs/help-doc.html index 095df98..f4d5cc2 100644 --- a/docs/help-doc.html +++ b/docs/help-doc.html @@ -1,11 +1,11 @@ - + API Help - + diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html index 19ca7c2..fad2d3a 100644 --- a/docs/index-files/index-1.html +++ b/docs/index-files/index-1.html @@ -1,11 +1,11 @@ - + A-Index - + @@ -50,19 +50,19 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form

A

-
addService(IService) - Method in class io.github.simplex.simplexss.ServicePool
+
addService(IService) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
 
-
addToExistingPool(ServicePool, IService...) - Method in class io.github.simplex.simplexss.ServiceManager
+
addToExistingPool(ServicePool, IService...) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
 
-
associatedServices - Variable in class io.github.simplex.simplexss.ServicePool
+
associatedServices - Variable in class io.github.simplexdevelopment.scheduler.ServicePool
A collection of services related to this service pool.
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form
diff --git a/docs/index-files/index-10.html b/docs/index-files/index-10.html index 4394a84..dda2bf1 100644 --- a/docs/index-files/index-10.html +++ b/docs/index-files/index-10.html @@ -1,12 +1,12 @@ - -N-Index + +L-Index - - + + @@ -50,19 +50,13 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

N

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

L

-
name - Variable in class io.github.simplex.simplexss.ServicePool
-
-
The key used to identify this service pool.
-
-
newNamespacedKey(String, String) - Static method in interface io.github.simplex.api.IService
-
-
This is an easy static call for creating a new namespaced key for services and service pools.
-
+
locateServiceWithinPools(IService) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
+
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-11.html b/docs/index-files/index-11.html index e808c8a..e98f7db 100644 --- a/docs/index-files/index-11.html +++ b/docs/index-files/index-11.html @@ -1,12 +1,12 @@ - -O-Index + +M-Index - - + + @@ -50,15 +50,21 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

O

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

M

-
onDisable() - Method in class io.github.simplex.impl.Main
+
Main - Class in io.github.simplexdevelopment.impl
 
-
onEnable() - Method in class io.github.simplex.impl.Main
+
Main() - Constructor for class io.github.simplexdevelopment.impl.Main
+
 
+
mainScheduler - Variable in class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
 
+
mayInterruptWhenRunning - Variable in class io.github.simplexdevelopment.api.ExecutableService
+
 
+
multithreadedServicePool(NamespacedKey, IService...) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-12.html b/docs/index-files/index-12.html index 61a4219..8d949e7 100644 --- a/docs/index-files/index-12.html +++ b/docs/index-files/index-12.html @@ -1,12 +1,12 @@ - -P-Index + +N-Index - - + + @@ -50,21 +50,19 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

P

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

N

-
parentPool - Variable in class io.github.simplex.api.ExecutableService
-
 
-
period - Variable in class io.github.simplex.api.ExecutableService
-
 
-
plugin - Variable in class io.github.simplex.impl.ServiceImpl
-
 
-
plugin - Variable in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
pool - Variable in class io.github.simplex.impl.Main
-
 
+
name - Variable in class io.github.simplexdevelopment.scheduler.ServicePool
+
+
The key used to identify this service pool.
+
+
newNamespacedKey(String, String) - Static method in interface io.github.simplexdevelopment.api.IService
+
+
This is an easy static call for creating a new namespaced key for services and service pools.
+
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-13.html b/docs/index-files/index-13.html index 9e811d8..eaa586b 100644 --- a/docs/index-files/index-13.html +++ b/docs/index-files/index-13.html @@ -1,12 +1,12 @@ - -Q-Index + +O-Index - - + + @@ -50,17 +50,15 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

Q

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

O

-
queue(IService) - Method in class io.github.simplex.simplexss.SchedulingSystem
+
onDisable() - Method in class io.github.simplexdevelopment.impl.Main
 
-
queue(IService) - Method in interface io.github.simplex.api.ISchedule
-
 
-
queueService(NamespacedKey) - Method in class io.github.simplex.simplexss.ServicePool
+
onEnable() - Method in class io.github.simplexdevelopment.impl.Main
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-14.html b/docs/index-files/index-14.html index d524957..d722184 100644 --- a/docs/index-files/index-14.html +++ b/docs/index-files/index-14.html @@ -1,12 +1,12 @@ - -R-Index + +P-Index - - + + @@ -50,25 +50,29 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

R

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

P

-
recycle() - Method in class io.github.simplex.simplexss.ServicePool
+
parentPool - Variable in class io.github.simplexdevelopment.api.ExecutableService
 
-
removeService(IService) - Method in class io.github.simplex.simplexss.ServicePool
+
period - Variable in class io.github.simplexdevelopment.api.ExecutableService
 
-
repeating - Variable in class io.github.simplex.api.ExecutableService
+
plugin - Variable in class io.github.simplexdevelopment.impl.ServiceImpl
 
-
repeatingPools - Variable in class io.github.simplex.simplexss.SchedulingSystem
+
plugin - Variable in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
The field for the plugin record component.
+
+
plugin - Variable in class io.github.simplexdevelopment.scheduler.SchedulingSystem
 
-
run() - Method in interface io.github.simplex.api.IService
-
 
-
runOnce(IService) - Method in interface io.github.simplex.api.ISchedule
-
 
-
runOnce(IService) - Method in class io.github.simplex.simplexss.SchedulingSystem
+
plugin() - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Returns the value of the plugin record component.
+
+
pool - Variable in class io.github.simplexdevelopment.impl.Main
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-15.html b/docs/index-files/index-15.html index f1eea77..d72a4a2 100644 --- a/docs/index-files/index-15.html +++ b/docs/index-files/index-15.html @@ -1,12 +1,12 @@ - -S-Index + +Q-Index - - + + @@ -50,71 +50,17 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

S

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

Q

-
scheduler - Variable in class io.github.simplex.impl.Main
+
queue(IService) - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
 
-
scheduler - Variable in class io.github.simplex.simplexss.ServicePool
-
-
The scheduler used to run the services in this pool.
-
-
SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin> - Class in io.github.simplex.simplexss
+
queue(IService) - Method in interface io.github.simplexdevelopment.api.ISchedule
 
-
SchedulingSystem(ServiceManager, T) - Constructor for class io.github.simplex.simplexss.SchedulingSystem
-
-
Creates a new instance of the scheduling system.
-
-
service_name - Variable in class io.github.simplex.api.ExecutableService
-
 
-
ServiceImpl - Class in io.github.simplex.impl
-
 
-
ServiceImpl(Main) - Constructor for class io.github.simplex.impl.ServiceImpl
-
 
-
serviceManager - Variable in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
ServiceManager - Class in io.github.simplex.simplexss
-
 
-
ServiceManager() - Constructor for class io.github.simplex.simplexss.ServiceManager
-
-
Creates a new instance of the Service Manager class.
-
-
ServicePool - Class in io.github.simplex.simplexss
-
 
-
ServicePool(NamespacedKey, boolean) - Constructor for class io.github.simplex.simplexss.ServicePool
-
 
-
servicePools - Variable in class io.github.simplex.simplexss.ServiceManager
-
 
-
setCancelled(boolean) - Method in class io.github.simplex.api.ExecutableService
-
-
Cancels the execution of this service.
-
-
setContext(S) - Method in interface io.github.simplex.api.Context
-
 
-
start() - Method in interface io.github.simplex.api.IService
-
-
The actual start method for the service.
-
-
start() - Method in class io.github.simplex.impl.ServiceImpl
-
 
-
startServices() - Method in class io.github.simplex.simplexss.ServicePool
-
 
-
stop() - Method in interface io.github.simplex.api.IService
-
-
The actual end method for the service.
-
-
stop() - Method in class io.github.simplex.impl.ServiceImpl
-
 
-
stopService(NamespacedKey, Mono<Disposable>) - Method in class io.github.simplex.simplexss.ServicePool
-
 
-
stopServices(Flux<Disposable>) - Method in class io.github.simplex.simplexss.ServicePool
-
 
-
supplyException() - Static method in exception io.github.simplex.api.InvalidServicePoolException
-
 
-
supplyException(IService) - Static method in exception io.github.simplex.api.InvalidServiceException
+
queueService(IService) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-16.html b/docs/index-files/index-16.html index d4253a4..115e921 100644 --- a/docs/index-files/index-16.html +++ b/docs/index-files/index-16.html @@ -1,12 +1,12 @@ - -T-Index + +R-Index - - + + @@ -50,13 +50,33 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

T

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

R

-
takeFromExistingPool(ServicePool, IService...) - Method in class io.github.simplex.simplexss.ServiceManager
+
rbScheduler - Variable in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
ReactorBukkitScheduler - Record Class in io.github.simplexdevelopment.scheduler
+
 
+
ReactorBukkitScheduler(JavaPlugin, BukkitScheduler) - Constructor for record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Creates an instance of a ReactorBukkitScheduler record class.
+
+
recycle() - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
removeService(IService) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
repeating - Variable in class io.github.simplexdevelopment.api.ExecutableService
+
 
+
repeatingPools - Variable in class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
 
+
run() - Method in interface io.github.simplexdevelopment.api.IService
+
 
+
runOnce(IService) - Method in interface io.github.simplexdevelopment.api.ISchedule
+
 
+
runOnce(IService) - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-17.html b/docs/index-files/index-17.html new file mode 100644 index 0000000..8645024 --- /dev/null +++ b/docs/index-files/index-17.html @@ -0,0 +1,147 @@ + + + + +S-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

S

+
+
schedule(Runnable) - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Delegates to the BukkitScheduler.
+
+
schedule(Runnable, long, TimeUnit) - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Delegates to the BukkitScheduler with a delay.
+
+
schedulePeriodically(Runnable, long, long, TimeUnit) - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Delegates to the BukkitScheduler with a delay and a period.
+
+
scheduler - Variable in class io.github.simplexdevelopment.impl.Main
+
 
+
scheduler - Variable in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
The field for the scheduler record component.
+
+
scheduler - Variable in class io.github.simplexdevelopment.scheduler.ServicePool
+
+
The scheduler used to run the services in this pool.
+
+
scheduler() - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Returns the value of the scheduler record component.
+
+
SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin> - Class in io.github.simplexdevelopment.scheduler
+
 
+
SchedulingSystem(T) - Constructor for class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
+
Creates a new instance of the scheduling system.
+
+
service_name - Variable in class io.github.simplexdevelopment.api.ExecutableService
+
 
+
ServiceImpl - Class in io.github.simplexdevelopment.impl
+
 
+
ServiceImpl(Main) - Constructor for class io.github.simplexdevelopment.impl.ServiceImpl
+
 
+
serviceManager - Variable in class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
 
+
ServiceManager - Class in io.github.simplexdevelopment.scheduler
+
 
+
ServiceManager() - Constructor for class io.github.simplexdevelopment.scheduler.ServiceManager
+
+
Creates a new instance of the Service Manager class.
+
+
ServicePool - Class in io.github.simplexdevelopment.scheduler
+
 
+
ServicePool(NamespacedKey, boolean) - Constructor for class io.github.simplexdevelopment.scheduler.ServicePool
+
+
This will create a new instance of a Service Pool with a Scheduler as its main scheduler.
+
+
ServicePool(NamespacedKey, JavaPlugin) - Constructor for class io.github.simplexdevelopment.scheduler.ServicePool
+
+
This will create a new instance of a Service Pool with the ReactorBukkitScheduler as its main scheduler.
+
+
servicePools - Variable in class io.github.simplexdevelopment.scheduler.ServiceManager
+
 
+
setCancelled(boolean) - Method in class io.github.simplexdevelopment.api.ExecutableService
+
+
Cancels the execution of this service.
+
+
setContext(S) - Method in interface io.github.simplexdevelopment.api.Context
+
 
+
start() - Method in interface io.github.simplexdevelopment.api.IService
+
+
The actual start method for the service.
+
+
start() - Method in class io.github.simplexdevelopment.impl.ServiceImpl
+
 
+
startServices() - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
stop() - Method in interface io.github.simplexdevelopment.api.IService
+
+
The actual end method for the service.
+
+
stop() - Method in class io.github.simplexdevelopment.impl.ServiceImpl
+
 
+
stopService(NamespacedKey, Mono<Disposable>) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
stopServices(Flux<Disposable>) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
supplyException() - Static method in exception io.github.simplexdevelopment.api.InvalidServicePoolException
+
 
+
supplyException(IService) - Static method in exception io.github.simplexdevelopment.api.InvalidServiceException
+
 
+
+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form
+
+
+ + diff --git a/docs/index-files/index-18.html b/docs/index-files/index-18.html new file mode 100644 index 0000000..f5743bd --- /dev/null +++ b/docs/index-files/index-18.html @@ -0,0 +1,79 @@ + + + + +T-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

T

+
+
takeFromExistingPool(ServicePool, IService...) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
+
 
+
task - Variable in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
+
+
The field for the task record component.
+
+
task() - Method in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
+
+
Returns the value of the task record component.
+
+
toString() - Method in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Returns a string representation of this record class.
+
+
+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form
+
+
+ + diff --git a/docs/index-files/index-2.html b/docs/index-files/index-2.html index 0ad6213..e891388 100644 --- a/docs/index-files/index-2.html +++ b/docs/index-files/index-2.html @@ -1,12 +1,12 @@ - -C-Index + +B-Index - - + + @@ -50,23 +50,17 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

C

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

B

-
cancel() - Method in class io.github.simplex.api.ExecutableService
+
BukkitDisposable - Record Class in io.github.simplexdevelopment.scheduler
+
 
+
BukkitDisposable(BukkitTask) - Constructor for record class io.github.simplexdevelopment.scheduler.BukkitDisposable
-
Actual stop call, to ensure that the service actually #isCancelled().
+
Creates an instance of a BukkitDisposable record class.
-
cancelled - Variable in class io.github.simplex.api.ExecutableService
-
 
-
Context<S> - Interface in io.github.simplex.api
-
 
-
contextCollection() - Method in interface io.github.simplex.api.Context
-
 
-
createServicePool(NamespacedKey, IService...) - Method in class io.github.simplex.simplexss.ServiceManager
-
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-3.html b/docs/index-files/index-3.html index 68bb6af..c08ee36 100644 --- a/docs/index-files/index-3.html +++ b/docs/index-files/index-3.html @@ -1,12 +1,12 @@ - -D-Index + +C-Index - - + + @@ -50,19 +50,27 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

D

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

C

-
DEFAULT - Static variable in class io.github.simplex.simplexss.ServicePool
+
cancel() - Method in class io.github.simplexdevelopment.api.ExecutableService
-
The default NamespacedKey used to identify unmarked services.
+
Actual stop call, to ensure that the service actually #isCancelled().
-
delay - Variable in class io.github.simplex.api.ExecutableService
+
cancelled - Variable in class io.github.simplexdevelopment.api.ExecutableService
 
-
disposables - Variable in class io.github.simplex.impl.Main
+
Context<S> - Interface in io.github.simplexdevelopment.api
 
+
contextCollection() - Method in interface io.github.simplexdevelopment.api.Context
+
 
+
createServicePool(NamespacedKey, IService...) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
+
 
+
createWorker() - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
A new Scheduler.Worker.
+
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-4.html b/docs/index-files/index-4.html index 9feb55f..1fbe986 100644 --- a/docs/index-files/index-4.html +++ b/docs/index-files/index-4.html @@ -1,12 +1,12 @@ - -E-Index + +D-Index - - + + @@ -50,35 +50,27 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

E

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

D

-
emptyServicePool(NamespacedKey, boolean) - Method in class io.github.simplex.simplexss.ServiceManager
+
DEFAULT - Static variable in class io.github.simplexdevelopment.scheduler.ServicePool
+
+
The default NamespacedKey used to identify unmarked services.
+
+
delay - Variable in class io.github.simplexdevelopment.api.ExecutableService
 
-
ExecutableService - Class in io.github.simplex.api
+
disposables - Variable in class io.github.simplexdevelopment.impl.Main
 
-
ExecutableService(NamespacedKey) - Constructor for class io.github.simplex.api.ExecutableService
+
dispose() - Method in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
-
Creates a new instance of an executable service.
+
Disposes of the task upstream on the Bukkit scheduler.
-
ExecutableService(ServicePool, NamespacedKey) - Constructor for class io.github.simplex.api.ExecutableService
+
dispose() - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
-
Creates a new instance of an executable service.
-
-
ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean) - Constructor for class io.github.simplex.api.ExecutableService
-
-
Creates a new instance of an executable service.
-
-
ExecutableService(ServicePool, NamespacedKey, Long) - Constructor for class io.github.simplex.api.ExecutableService
-
-
Creates a new instance of an executable service.
-
-
ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean, Boolean) - Constructor for class io.github.simplex.api.ExecutableService
-
-
Creates a new instance of an executable service.
+
This method does nothing and is unused.
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-5.html b/docs/index-files/index-5.html index 7912293..9f95fd7 100644 --- a/docs/index-files/index-5.html +++ b/docs/index-files/index-5.html @@ -1,12 +1,12 @@ - -F-Index + +E-Index - - + + @@ -50,21 +50,43 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

F

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

E

-
fluxFromCollection() - Method in interface io.github.simplex.api.Context
+
emptyServicePool(NamespacedKey, boolean) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
 
-
forceStart(IService) - Method in interface io.github.simplex.api.ISchedule
-
 
-
forceStart(IService) - Method in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
forceStop(IService) - Method in interface io.github.simplex.api.ISchedule
-
 
-
forceStop(IService) - Method in class io.github.simplex.simplexss.SchedulingSystem
+
equals(Object) - Method in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Indicates whether some other object is "equal to" this one.
+
+
ExecutableService - Class in io.github.simplexdevelopment.api
 
+
ExecutableService(NamespacedKey) - Constructor for class io.github.simplexdevelopment.api.ExecutableService
+
+
Creates a new instance of an executable service.
+
+
ExecutableService(ServicePool, NamespacedKey) - Constructor for class io.github.simplexdevelopment.api.ExecutableService
+
+
Creates a new instance of an executable service.
+
+
ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean) - Constructor for class io.github.simplexdevelopment.api.ExecutableService
+
+
Creates a new instance of an executable service.
+
+
ExecutableService(ServicePool, NamespacedKey, Long) - Constructor for class io.github.simplexdevelopment.api.ExecutableService
+
+
Creates a new instance of an executable service.
+
+
ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean, Boolean) - Constructor for class io.github.simplexdevelopment.api.ExecutableService
+
+
Creates a new instance of an executable service.
+
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-6.html b/docs/index-files/index-6.html index ec1547b..ff59c92 100644 --- a/docs/index-files/index-6.html +++ b/docs/index-files/index-6.html @@ -1,12 +1,12 @@ - -G-Index + +F-Index - - + + @@ -50,61 +50,21 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

G

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

F

-
getAssociatedServicePool(IService) - Method in class io.github.simplex.simplexss.ServiceManager
+
fluxFromCollection() - Method in interface io.github.simplexdevelopment.api.Context
 
-
getAssociatedServices() - Method in class io.github.simplex.simplexss.ServicePool
+
forceStart(IService) - Method in interface io.github.simplexdevelopment.api.ISchedule
 
-
getContext() - Method in interface io.github.simplex.api.Context
+
forceStart(IService) - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
 
-
getDefaultNamespacedKey() - Static method in interface io.github.simplex.api.IService
+
forceStop(IService) - Method in interface io.github.simplexdevelopment.api.ISchedule
 
-
getDefaultNamespacedKey() - Static method in class io.github.simplex.simplexss.ServicePool
-
 
-
getDelay() - Method in class io.github.simplex.api.ExecutableService
-
 
-
getDelay() - Method in interface io.github.simplex.api.IService
-
 
-
getMainSchedulerThread() - Method in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
getNamespacedKey() - Method in class io.github.simplex.api.ExecutableService
-
 
-
getNamespacedKey() - Method in interface io.github.simplex.api.IService
-
 
-
getParentPool() - Method in class io.github.simplex.api.ExecutableService
-
 
-
getParentPool() - Method in interface io.github.simplex.api.IService
-
 
-
getParentPool() - Method in class io.github.simplex.impl.ServiceImpl
-
 
-
getPeriod() - Method in class io.github.simplex.api.ExecutableService
-
 
-
getPeriod() - Method in interface io.github.simplex.api.IService
-
 
-
getPlugin() - Method in interface io.github.simplex.api.IService
-
 
-
getPlugin() - Method in class io.github.simplex.impl.ServiceImpl
-
 
-
getProvidingPlugin() - Method in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
getRepeatingPools() - Method in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
getScheduler() - Method in class io.github.simplex.impl.Main
-
 
-
getScheduler() - Method in class io.github.simplex.simplexss.ServicePool
-
 
-
getService(NamespacedKey) - Method in class io.github.simplex.simplexss.ServicePool
-
 
-
getServiceManager() - Method in interface io.github.simplex.api.ISchedule
-
 
-
getServiceManager() - Method in class io.github.simplex.simplexss.SchedulingSystem
-
 
-
getServicePools() - Method in class io.github.simplex.simplexss.ServiceManager
+
forceStop(IService) - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-7.html b/docs/index-files/index-7.html index 0332d47..e439d7e 100644 --- a/docs/index-files/index-7.html +++ b/docs/index-files/index-7.html @@ -1,12 +1,12 @@ - -I-Index + +G-Index - - + + @@ -50,43 +50,61 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

I

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

G

-
InvalidServiceException - Exception in io.github.simplex.api
+
getAssociatedServicePool(IService) - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
 
-
InvalidServiceException(IService) - Constructor for exception io.github.simplex.api.InvalidServiceException
+
getAssociatedServices() - Method in class io.github.simplexdevelopment.scheduler.ServicePool
 
-
InvalidServiceException(Throwable) - Constructor for exception io.github.simplex.api.InvalidServiceException
+
getContext() - Method in interface io.github.simplexdevelopment.api.Context
 
-
InvalidServicePoolException - Exception in io.github.simplex.api
+
getDefaultNamespacedKey() - Static method in interface io.github.simplexdevelopment.api.IService
 
-
InvalidServicePoolException() - Constructor for exception io.github.simplex.api.InvalidServicePoolException
+
getDefaultNamespacedKey() - Static method in class io.github.simplexdevelopment.scheduler.ServicePool
 
-
InvalidServicePoolException(Throwable) - Constructor for exception io.github.simplex.api.InvalidServicePoolException
+
getDelay() - Method in class io.github.simplexdevelopment.api.ExecutableService
 
-
io.github.simplex.api - package io.github.simplex.api
+
getDelay() - Method in interface io.github.simplexdevelopment.api.IService
 
-
io.github.simplex.impl - package io.github.simplex.impl
+
getMainScheduler() - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
 
-
io.github.simplex.simplexss - package io.github.simplex.simplexss
+
getNamespacedKey() - Method in class io.github.simplexdevelopment.api.ExecutableService
 
-
isCancelled() - Method in class io.github.simplex.api.ExecutableService
-
-
Cancels the execution of this service.
-
-
ISchedule - Interface in io.github.simplex.api
+
getNamespacedKey() - Method in interface io.github.simplexdevelopment.api.IService
 
-
IService - Interface in io.github.simplex.api
+
getParentPool() - Method in class io.github.simplexdevelopment.api.ExecutableService
 
-
isPeriodic() - Method in class io.github.simplex.api.ExecutableService
+
getParentPool() - Method in interface io.github.simplexdevelopment.api.IService
 
-
isPeriodic() - Method in interface io.github.simplex.api.IService
+
getParentPool() - Method in class io.github.simplexdevelopment.impl.ServiceImpl
 
-
isValidService(IService) - Method in class io.github.simplex.simplexss.ServicePool
+
getPeriod() - Method in class io.github.simplexdevelopment.api.ExecutableService
+
 
+
getPeriod() - Method in interface io.github.simplexdevelopment.api.IService
+
 
+
getPlugin() - Method in interface io.github.simplexdevelopment.api.IService
+
 
+
getPlugin() - Method in class io.github.simplexdevelopment.impl.ServiceImpl
+
 
+
getProvidingPlugin() - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
 
+
getRepeatingPools() - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
 
+
getScheduler() - Method in class io.github.simplexdevelopment.impl.Main
+
 
+
getScheduler() - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
getService(NamespacedKey) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
+
 
+
getServiceManager() - Method in interface io.github.simplexdevelopment.api.ISchedule
+
 
+
getServiceManager() - Method in class io.github.simplexdevelopment.scheduler.SchedulingSystem
+
 
+
getServicePools() - Method in class io.github.simplexdevelopment.scheduler.ServiceManager
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-8.html b/docs/index-files/index-8.html index 13924e0..d21f869 100644 --- a/docs/index-files/index-8.html +++ b/docs/index-files/index-8.html @@ -1,12 +1,12 @@ - -L-Index + +H-Index - - + + @@ -50,13 +50,19 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

L

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

H

-
locateServiceWithinPools(IService) - Method in class io.github.simplex.simplexss.ServiceManager
-
 
+
hashCode() - Method in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
+
+
Returns a hash code value for this object.
+
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index-files/index-9.html b/docs/index-files/index-9.html index a41b786..7a4db87 100644 --- a/docs/index-files/index-9.html +++ b/docs/index-files/index-9.html @@ -1,12 +1,12 @@ - -M-Index + +I-Index - - + + @@ -50,21 +50,49 @@ loadScripts(document, 'script');

Index

-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form -

M

+A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +

I

-
Main - Class in io.github.simplex.impl
+
InvalidServiceException - Exception in io.github.simplexdevelopment.api
 
-
Main() - Constructor for class io.github.simplex.impl.Main
+
InvalidServiceException(IService) - Constructor for exception io.github.simplexdevelopment.api.InvalidServiceException
 
-
mainScheduler - Variable in class io.github.simplex.simplexss.SchedulingSystem
+
InvalidServiceException(Throwable) - Constructor for exception io.github.simplexdevelopment.api.InvalidServiceException
 
-
mayInterruptWhenRunning - Variable in class io.github.simplex.api.ExecutableService
+
InvalidServicePoolException - Exception in io.github.simplexdevelopment.api
 
-
multithreadedServicePool(NamespacedKey, IService...) - Method in class io.github.simplex.simplexss.ServiceManager
+
InvalidServicePoolException() - Constructor for exception io.github.simplexdevelopment.api.InvalidServicePoolException
+
 
+
InvalidServicePoolException(String) - Constructor for exception io.github.simplexdevelopment.api.InvalidServicePoolException
+
 
+
InvalidServicePoolException(Throwable) - Constructor for exception io.github.simplexdevelopment.api.InvalidServicePoolException
+
 
+
io.github.simplexdevelopment.api - package io.github.simplexdevelopment.api
+
 
+
io.github.simplexdevelopment.impl - package io.github.simplexdevelopment.impl
+
 
+
io.github.simplexdevelopment.scheduler - package io.github.simplexdevelopment.scheduler
+
 
+
isCancelled() - Method in class io.github.simplexdevelopment.api.ExecutableService
+
+
Cancels the execution of this service.
+
+
ISchedule - Interface in io.github.simplexdevelopment.api
+
 
+
isDisposed() - Method in record class io.github.simplexdevelopment.scheduler.BukkitDisposable
+
+
Checks if the task is cancelled.
+
+
IService - Interface in io.github.simplexdevelopment.api
+
 
+
isPeriodic() - Method in class io.github.simplexdevelopment.api.ExecutableService
+
 
+
isPeriodic() - Method in interface io.github.simplexdevelopment.api.IService
+
 
+
isValidService(IService) - Method in class io.github.simplexdevelopment.scheduler.ServicePool
 
-A C D E F G I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form +A B C D E F G H I L M N O P Q R S T 
All Classes and Interfaces|All Packages|Serialized Form diff --git a/docs/index.html b/docs/index.html index 5f68b70..637dd3c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,11 +1,11 @@ - + Overview - + @@ -52,11 +52,11 @@ loadScripts(document, 'script');
Package
Description
- +
 
- +
 
- +
 
diff --git a/docs/io/github/simplex/api/Context.html b/docs/io/github/simplex/api/Context.html index 8960390..d5c86d8 100644 --- a/docs/io/github/simplex/api/Context.html +++ b/docs/io/github/simplex/api/Context.html @@ -6,7 +6,7 @@ - + @@ -68,7 +68,7 @@ loadScripts(document, 'script');
- +

Interface Context<S>

diff --git a/docs/io/github/simplex/api/ExecutableService.html b/docs/io/github/simplex/api/ExecutableService.html index 83f0131..7ad34de 100644 --- a/docs/io/github/simplex/api/ExecutableService.html +++ b/docs/io/github/simplex/api/ExecutableService.html @@ -6,7 +6,7 @@ - + @@ -68,25 +68,25 @@ loadScripts(document, 'script');
- +

Class ExecutableService

java.lang.Object -
io.github.simplex.api.ExecutableService
+
io.github.simplexdevelopment.api.ExecutableService
All Implemented Interfaces:
-
IService, Runnable
+
IService, Runnable
Direct Known Subclasses:
-
ServiceImpl
+
ServiceImpl

public abstract class ExecutableService extends Object -implements IService
+implements IService
@@ -266,7 +266,7 @@ implements IS
  • parentPool

    -
    +
    private ServicePool parentPool
  • @@ -284,7 +284,7 @@ implements IS @NotNull org.bukkit.NamespacedKey service_name) + to allow for easy identification within the associated ServicePool.
    Parameters:
    service_name - A namespaced key which can be used to identify the service.
    @@ -292,27 +292,27 @@ implements IS
  • -
    +

    ExecutableService

    public ExecutableService(@Nullable - @Nullable ServicePool parentPool, + @Nullable ServicePool parentPool, @NotNull @NotNull org.bukkit.NamespacedKey service_name)
    Creates a new instance of an executable service. Each service is registered with a NamespacedKey, - to allow for easy identification within the associated ServicePool.
    + to allow for easy identification within the associated ServicePool.
    Parameters:
    -
    parentPool - The ServicePool which this service is executing on.
    +
    parentPool - The ServicePool which this service is executing on.
    service_name - A namespaced key which can be used to identify the service.
  • -
    +

    ExecutableService

    public ExecutableService(@Nullable - @Nullable ServicePool parentPool, + @Nullable ServicePool parentPool, @NotNull @NotNull org.bukkit.NamespacedKey service_name, @Nullable @@ -321,20 +321,20 @@ implements IS 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 NamespacedKey, - to allow for easy identification within the associated ServicePool.
    + to allow for easy identification within the associated ServicePool.
    Parameters:
    -
    parentPool - The ServicePool which this service is executing on.
    +
    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.
  • -
    +

    ExecutableService

    public ExecutableService(@Nullable - @Nullable ServicePool parentPool, + @Nullable ServicePool parentPool, @NotNull @NotNull org.bukkit.NamespacedKey service_name, @NotNull @@ -349,10 +349,10 @@ implements IS however if you have flagged repeating as true, and the period is null, then the period will automatically be set to 20 minutes. Each service is registered with a NamespacedKey, - to allow for easy identification within the associated ServicePool.
    + to allow for easy identification within the associated ServicePool.
    Parameters:
    -
    parentPool - The ServicePool which this service is executing on.
    +
    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).
    @@ -361,10 +361,10 @@ implements IS
  • -
    +

    ExecutableService

    public ExecutableService(@Nullable - @Nullable ServicePool parentPool, + @Nullable ServicePool parentPool, @NotNull @NotNull org.bukkit.NamespacedKey service_name, @Nullable @@ -381,10 +381,10 @@ implements IS however if you have flagged repeating as true, and the period is null, then the period will automatically be set to 20 minutes. Each service is registered with a NamespacedKey, - to allow for easy identification within the associated ServicePool.
    + to allow for easy identification within the associated ServicePool.
    Parameters:
    -
    parentPool - The ServicePool which this service is executing on.
    +
    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).
    @@ -407,7 +407,7 @@ implements IS
    public org.bukkit.NamespacedKey getNamespacedKey()
    Specified by:
    -
    getNamespacedKey in interface IService
    +
    getNamespacedKey in interface IService
    Returns:
    The NamespacedKey of this service.
    @@ -419,7 +419,7 @@ implements IS
    public long getDelay()
    Specified by:
    -
    getDelay in interface IService
    +
    getDelay in interface IService
    Returns:
    How long the service should wait before executing the first time.
    @@ -431,7 +431,7 @@ implements IS
    public long getPeriod()
    Specified by:
    -
    getPeriod in interface IService
    +
    getPeriod in interface IService
    Returns:
    How long the service should wait between subsequent executions.
    @@ -443,7 +443,7 @@ implements IS
    public boolean isPeriodic()
    Specified by:
    -
    isPeriodic in interface IService
    +
    isPeriodic in interface IService
    Returns:
    If the service should be scheduled for repeated executions or not.
    @@ -482,12 +482,12 @@ implements IS
  • getParentPool

    -
    +
    public reactor.core.publisher.Mono<ServicePool> getParentPool()
    Specified by:
    -
    getParentPool in interface IService
    +
    getParentPool in interface IService
    Returns:
    -
    The ServicePool which this service is executing on.
    +
    The ServicePool which this service is executing on.
  • diff --git a/docs/io/github/simplex/api/ISchedule.html b/docs/io/github/simplex/api/ISchedule.html index 0b2c17f..55528ce 100644 --- a/docs/io/github/simplex/api/ISchedule.html +++ b/docs/io/github/simplex/api/ISchedule.html @@ -6,7 +6,7 @@ - + @@ -68,13 +68,13 @@ loadScripts(document, 'script');
    - +

    Interface ISchedule

    All Known Implementing Classes:
    -
    SchedulingSystem
    +
    SchedulingSystem

    public interface ISchedule
    @@ -93,19 +93,19 @@ loadScripts(document, 'script');
    Method
    Description
    reactor.core.publisher.Mono<Void>
    - +
     
    reactor.core.publisher.Mono<Void>
    - +
     
    -
    reactor.core.publisher.Mono<ServiceManager>
    +
    reactor.core.publisher.Mono<ServiceManager>
     
    -
    reactor.core.publisher.Mono<ServicePool>
    -
    queue(IService service)
    +
    reactor.core.publisher.Mono<ServicePool>
    +
    queue(IService service)
     
    reactor.core.publisher.Mono<Void>
    -
    runOnce(IService service)
    +
    runOnce(IService service)
     
    @@ -124,7 +124,7 @@ loadScripts(document, 'script');
  • getServiceManager

    -
    reactor.core.publisher.Mono<ServiceManager> getServiceManager()
    +
    reactor.core.publisher.Mono<ServiceManager> getServiceManager()
    Returns:
    The service manager which exerts control over the service pools and their associated services.
    @@ -132,9 +132,9 @@ loadScripts(document, 'script');
  • -
    +

    queue

    -
    reactor.core.publisher.Mono<ServicePool> queue(IService service)
    +
    reactor.core.publisher.Mono<ServicePool> queue(IService service)
    Parameters:
    service - The service to use to locate the associated service pool and queue the service for execution.
    @@ -145,9 +145,9 @@ loadScripts(document, 'script');
  • -
    +

    runOnce

    -
    reactor.core.publisher.Mono<Void> runOnce(IService service)
    +
    reactor.core.publisher.Mono<Void> runOnce(IService service)
    Parameters:
    service - The service to run once.
    @@ -157,9 +157,9 @@ loadScripts(document, 'script');
  • -
    +

    forceStop

    -
    reactor.core.publisher.Mono<Void> forceStop(IService service)
    +
    reactor.core.publisher.Mono<Void> forceStop(IService service)
    Parameters:
    service - The service to forcefully stop.
    @@ -169,9 +169,9 @@ loadScripts(document, 'script');
  • -
    +

    forceStart

    -
    reactor.core.publisher.Mono<Void> forceStart(IService service)
    +
    reactor.core.publisher.Mono<Void> forceStart(IService service)
    Parameters:
    service - The service to forcefully start.
    diff --git a/docs/io/github/simplex/api/IService.html b/docs/io/github/simplex/api/IService.html index 87f821f..f414e98 100644 --- a/docs/io/github/simplex/api/IService.html +++ b/docs/io/github/simplex/api/IService.html @@ -6,7 +6,7 @@ - + @@ -68,7 +68,7 @@ loadScripts(document, 'script');
    - +

    Interface IService

    @@ -78,7 +78,7 @@ loadScripts(document, 'script');
    All Known Implementing Classes:
    -
    ExecutableService, ServiceImpl
    +
    ExecutableService, ServiceImpl

    public interface IService @@ -106,7 +106,7 @@ extends org.bukkit.NamespacedKey
     
    -
    reactor.core.publisher.Mono<ServicePool>
    +
    reactor.core.publisher.Mono<ServicePool>
     
    long
    @@ -237,10 +237,10 @@ extends

    getParentPool

    -
    +
    reactor.core.publisher.Mono<ServicePool> getParentPool()
    Returns:
    -
    The ServicePool which this service is executing on.
    +
    The ServicePool which this service is executing on.
  • diff --git a/docs/io/github/simplex/api/InvalidServiceException.html b/docs/io/github/simplex/api/InvalidServiceException.html index 8269143..6c13243 100644 --- a/docs/io/github/simplex/api/InvalidServiceException.html +++ b/docs/io/github/simplex/api/InvalidServiceException.html @@ -6,7 +6,7 @@ - + @@ -68,14 +68,14 @@ loadScripts(document, 'script');
    - +

    Class InvalidServiceException

    java.lang.Object
    java.lang.Throwable
    java.lang.Exception
    java.lang.RuntimeException -
    io.github.simplex.api.InvalidServiceException
    +
    io.github.simplexdevelopment.api.InvalidServiceException
    @@ -92,7 +92,7 @@ loadScripts(document, 'script');
    See Also:
    @@ -107,7 +107,7 @@ loadScripts(document, 'script');
    Constructor
    Description
    - +
     
     
    @@ -125,8 +125,8 @@ loadScripts(document, 'script');
    Modifier and Type
    Method
    Description
    - - + +
     
    @@ -149,9 +149,9 @@ loadScripts(document, 'script');

    Constructor Details

  • diff --git a/docs/io/github/simplex/api/package-summary.html b/docs/io/github/simplex/api/package-summary.html index cc40647..44fa377 100644 --- a/docs/io/github/simplex/api/package-summary.html +++ b/docs/io/github/simplex/api/package-summary.html @@ -2,11 +2,11 @@ -io.github.simplex.api +io.github.simplexdevelopment.api - + @@ -60,10 +60,10 @@ loadScripts(document, 'script');
    -

    Package io.github.simplex.api

    +

    Package io.github.simplexdevelopment.api


    -
    package io.github.simplex.api
    +
    package io.github.simplexdevelopment.api
    diff --git a/docs/io/github/simplex/api/package-tree.html b/docs/io/github/simplex/api/package-tree.html index ede69c8..e2f27b0 100644 --- a/docs/io/github/simplex/api/package-tree.html +++ b/docs/io/github/simplex/api/package-tree.html @@ -2,11 +2,11 @@ -io.github.simplex.api Class Hierarchy +io.github.simplexdevelopment.api Class Hierarchy - + @@ -48,7 +48,7 @@ loadScripts(document, 'script');
    -

    Hierarchy For Package io.github.simplex.api

    +

    Hierarchy For Package io.github.simplexdevelopment.api

    Package Hierarchies:
    @@ -134,7 +134,7 @@ loadScripts(document, 'script');
    Modifier and Type
    Method
    Description
    - +
     
    void
    @@ -172,13 +172,13 @@ loadScripts(document, 'script');
  • pool

    -
    public ServicePool pool
    +
    public ServicePool pool
  • scheduler

    -
    private SchedulingSystem<Main> scheduler
    +
    private SchedulingSystem<Main> scheduler
  • @@ -236,7 +236,7 @@ loadScripts(document, 'script');
  • getScheduler

    -
    public SchedulingSystem<Main> getScheduler()
    +
    public SchedulingSystem<Main> getScheduler()
  • diff --git a/docs/io/github/simplex/impl/ServiceImpl.html b/docs/io/github/simplex/impl/ServiceImpl.html index e6e0077..864b244 100644 --- a/docs/io/github/simplex/impl/ServiceImpl.html +++ b/docs/io/github/simplex/impl/ServiceImpl.html @@ -6,7 +6,7 @@ - + @@ -68,22 +68,22 @@ loadScripts(document, 'script');
    - +

    Class ServiceImpl

    java.lang.Object -
    io.github.simplex.api.ExecutableService -
    io.github.simplex.impl.ServiceImpl
    +
    io.github.simplexdevelopment.api.ExecutableService +
    io.github.simplexdevelopment.impl.ServiceImpl
    All Implemented Interfaces:
    -
    IService, Runnable
    +
    IService, Runnable

    public class ServiceImpl -extends ExecutableService
    +extends ExecutableService
      @@ -96,7 +96,7 @@ loadScripts(document, 'script');
      Modifier and Type
      Field
      Description
      -
      private final Main
      +
      private final Main
       
    @@ -110,7 +110,7 @@ loadScripts(document, 'script');
    Constructor
    Description
    -
    ServiceImpl(Main plugin)
    +
    ServiceImpl(Main plugin)
     
    @@ -126,10 +126,10 @@ loadScripts(document, 'script');
    Modifier and Type
    Method
    Description
    -
    reactor.core.publisher.Mono<ServicePool>
    +
    reactor.core.publisher.Mono<ServicePool>
     
    - +
     
    reactor.core.publisher.Mono<Void>
    @@ -146,13 +146,13 @@ loadScripts(document, 'script');
    -

    Methods inherited from class io.github.simplex.api.ExecutableService

    +

    Methods inherited from class io.github.simplexdevelopment.api.ExecutableService

    getDelay, getNamespacedKey, getPeriod, isCancelled, isPeriodic, setCancelled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    -

    Methods inherited from interface io.github.simplex.api.IService

    +

    Methods inherited from interface io.github.simplexdevelopment.api.IService

    run
    @@ -168,7 +168,7 @@ loadScripts(document, 'script');
  • plugin

    -
    private final Main plugin
    +
    private final Main plugin
  • @@ -180,9 +180,9 @@ loadScripts(document, 'script');

    Constructor Details

    • -
      +

      ServiceImpl

      -
      public ServiceImpl(Main plugin)
      +
      public ServiceImpl(Main plugin)
    @@ -222,7 +222,7 @@ loadScripts(document, 'script');
  • getPlugin

    -
    public Main getPlugin()
    +
    public Main getPlugin()
    Returns:
    The plugin which was defined in the constructor. @@ -233,14 +233,14 @@ loadScripts(document, 'script');
  • getParentPool

    -
    public reactor.core.publisher.Mono<ServicePool> getParentPool()
    +
    public reactor.core.publisher.Mono<ServicePool> getParentPool()
    Specified by:
    -
    getParentPool in interface IService
    +
    getParentPool in interface IService
    Overrides:
    -
    getParentPool in class ExecutableService
    +
    getParentPool in class ExecutableService
    Returns:
    -
    The ServicePool which this service is executing on.
    +
    The ServicePool which this service is executing on.
  • diff --git a/docs/io/github/simplex/impl/package-summary.html b/docs/io/github/simplex/impl/package-summary.html index fcded61..31c9464 100644 --- a/docs/io/github/simplex/impl/package-summary.html +++ b/docs/io/github/simplex/impl/package-summary.html @@ -2,11 +2,11 @@ -io.github.simplex.impl +io.github.simplexdevelopment.impl - + @@ -56,10 +56,10 @@ loadScripts(document, 'script');
    -

    Package io.github.simplex.impl

    +

    Package io.github.simplexdevelopment.impl


    -
    package io.github.simplex.impl
    +
    package io.github.simplexdevelopment.impl
    diff --git a/docs/io/github/simplex/impl/package-tree.html b/docs/io/github/simplex/impl/package-tree.html index 1d2a59a..ab2e0de 100644 --- a/docs/io/github/simplex/impl/package-tree.html +++ b/docs/io/github/simplex/impl/package-tree.html @@ -2,11 +2,11 @@ -io.github.simplex.impl Class Hierarchy +io.github.simplexdevelopment.impl Class Hierarchy - + @@ -48,7 +48,7 @@ loadScripts(document, 'script');
    -

    Hierarchy For Package io.github.simplex.impl

    +

    Hierarchy For Package io.github.simplexdevelopment.impl

    Package Hierarchies:
    • All Packages
    • @@ -59,16 +59,16 @@ loadScripts(document, 'script');
      • java.lang.Object
          -
        • io.github.simplex.api.ExecutableService (implements io.github.simplex.api.IService) +
        • io.github.simplexdevelopment.api.ExecutableService (implements io.github.simplexdevelopment.api.IService)
        • org.bukkit.plugin.PluginBase (implements org.bukkit.plugin.Plugin)
          • org.bukkit.plugin.java.JavaPlugin
              -
            • io.github.simplex.impl.Main
            • +
            • io.github.simplexdevelopment.impl.Main
          diff --git a/docs/io/github/simplex/simplexss/SchedulingSystem.html b/docs/io/github/simplex/simplexss/SchedulingSystem.html index 0930b34..d02fc7b 100644 --- a/docs/io/github/simplex/simplexss/SchedulingSystem.html +++ b/docs/io/github/simplex/simplexss/SchedulingSystem.html @@ -6,7 +6,7 @@ - + @@ -68,21 +68,21 @@ loadScripts(document, 'script');
          - +

          Class SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>

          java.lang.Object -
          io.github.simplex.simplexss.SchedulingSystem<T>
          +
          io.github.simplexdevelopment.scheduler.SchedulingSystem<T>
          All Implemented Interfaces:
          -
          ISchedule
          +
          ISchedule

          public final class SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin> extends Object -implements ISchedule
          +implements ISchedule
  • @@ -193,7 +193,7 @@ implements

    repeatingPools

    -
    +
    private final Set<ServicePool> repeatingPools
  • @@ -211,10 +211,10 @@ implements
  • -
    -

    SchedulingSystem

    +
    +

    SchedulingSystem

    public SchedulingSystem(@NotNull - @NotNull ServiceManager serviceManager, + @NotNull ServiceManager serviceManager, T plugin)
    Creates a new instance of the scheduling system. This is used to manage the scheduling of services.
    @@ -236,10 +236,10 @@ implements

    getRepeatingPools

    +public Set<ServicePool> getRepeatingPools()
    Returns:
    -
    A set of ServicePools which contain repeating services.
    +
    A set of ServicePools which contain repeating services.
  • @@ -247,24 +247,24 @@ implements

    getServiceManager

    +public @NotNull reactor.core.publisher.Mono<ServiceManager> getServiceManager()
    Specified by:
    -
    getServiceManager in interface ISchedule
    +
    getServiceManager in interface ISchedule
    Returns:
    The service manager which exerts control over the service pools and their associated services.
  • -
    +

    queue

    @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> queue(@NotNull - @NotNull IService service)
    +public @NotNull reactor.core.publisher.Mono<ServicePool> queue(@NotNull + @NotNull IService service)
    Specified by:
    -
    queue in interface ISchedule
    +
    queue in interface ISchedule
    Parameters:
    service - The service to use to locate the associated service pool and queue the service for execution.
    Returns:
    @@ -274,13 +274,13 @@ implements +

    runOnce

    +public @NotNull reactor.core.publisher.Mono<Void> runOnce(IService service)
    Specified by:
    -
    runOnce in interface ISchedule
    +
    runOnce in interface ISchedule
    Parameters:
    service - The service to run once.
    Returns:
    @@ -289,12 +289,12 @@ implements +

    forceStop

    -
    +
    public reactor.core.publisher.Mono<Void> forceStop(IService service)
    Specified by:
    -
    forceStop in interface ISchedule
    +
    forceStop in interface ISchedule
    Parameters:
    service - The service to forcefully stop.
    Returns:
    @@ -303,12 +303,12 @@ implements +

    forceStart

    -
    +
    public reactor.core.publisher.Mono<Void> forceStart(IService service)
    Specified by:
    -
    forceStart in interface ISchedule
    +
    forceStart in interface ISchedule
    Parameters:
    service - The service to forcefully start.
    Returns:
    diff --git a/docs/io/github/simplex/simplexss/ServiceManager.html b/docs/io/github/simplex/simplexss/ServiceManager.html index b29ba96..5566a46 100644 --- a/docs/io/github/simplex/simplexss/ServiceManager.html +++ b/docs/io/github/simplex/simplexss/ServiceManager.html @@ -6,7 +6,7 @@ - + @@ -68,11 +68,11 @@ loadScripts(document, 'script');
    - +

    Class ServiceManager

    java.lang.Object -
    io.github.simplex.simplexss.ServiceManager
    +
    io.github.simplexdevelopment.scheduler.ServiceManager

    @@ -90,7 +90,7 @@ loadScripts(document, 'script');
    Modifier and Type
    Field
    Description
    -
    private final Set<ServicePool>
    +
    private final Set<ServicePool>
     
    @@ -122,34 +122,34 @@ loadScripts(document, 'script');
    Modifier and Type
    Method
    Description
    -
    @NotNull reactor.core.publisher.Mono<ServicePool>
    -
    addToExistingPool(@NotNull ServicePool pool, - IService... services)
    +
    @NotNull reactor.core.publisher.Mono<ServicePool>
    +
    addToExistingPool(@NotNull ServicePool pool, + IService... services)
     
    -
    @NotNull reactor.core.publisher.Mono<ServicePool>
    -
    createServicePool(org.bukkit.NamespacedKey poolName, - IService... services)
    +
    @NotNull reactor.core.publisher.Mono<ServicePool>
    +
    createServicePool(org.bukkit.NamespacedKey poolName, + IService... services)
     
    -
    @NotNull reactor.core.publisher.Mono<ServicePool>
    +
    @NotNull reactor.core.publisher.Mono<ServicePool>
    emptyServicePool(org.bukkit.NamespacedKey poolName, boolean multithreaded)
     
    -
    @NotNull reactor.core.publisher.Mono<ServicePool>
    - +
    @NotNull reactor.core.publisher.Mono<ServicePool>
    +
     
    -
    @NotNull reactor.core.publisher.Flux<ServicePool>
    +
    @NotNull reactor.core.publisher.Flux<ServicePool>
     
    boolean
    - +
     
    -
    @NotNull reactor.core.publisher.Mono<ServicePool>
    -
    multithreadedServicePool(org.bukkit.NamespacedKey name, - IService... services)
    +
    @NotNull reactor.core.publisher.Mono<ServicePool>
    +
    multithreadedServicePool(org.bukkit.NamespacedKey name, + IService... services)
     
    -
    @NotNull reactor.core.publisher.Mono<ServicePool>
    -
    takeFromExistingPool(@NotNull ServicePool pool, - IService... services)
    +
    @NotNull reactor.core.publisher.Mono<ServicePool>
    +
    takeFromExistingPool(@NotNull ServicePool pool, + IService... services)
     
    @@ -171,7 +171,7 @@ loadScripts(document, 'script');
  • servicePools

    -
    private final Set<ServicePool> servicePools
    +
    private final Set<ServicePool> servicePools
  • @@ -190,7 +190,7 @@ loadScripts(document, 'script'); This class acts as a Service Pool factory, and can be used to create both single and multithreaded Service Pools, empty service pools, as well as retrieve existing Service Pools. It also provides methods for you to add and remove - IServices from the {ServicePool} parameter. + IServices from the {ServicePool} parameter.
  • @@ -202,37 +202,37 @@ loadScripts(document, 'script');

    Method Details

    • -
      +

      createServicePool

      @Contract(pure=true, value="_, _ -> new") @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> createServicePool(org.bukkit.NamespacedKey poolName, - IService... services)
      +public @NotNull reactor.core.publisher.Mono<ServicePool> createServicePool(org.bukkit.NamespacedKey poolName, + IService... services)
      Parameters:
      poolName - The name of the service pool.
      services - The services to register within the service pool.
      Returns:
      -
      A Mono object which contains a ServicePool element. +
      A Mono object which contains a ServicePool element. This service pool will execute each service consecutively within a singular non-blocking thread.
    • -
      +

      multithreadedServicePool

      @Contract(pure=true, value="_, _ -> new") @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> multithreadedServicePool(org.bukkit.NamespacedKey name, - IService... services)
      +public @NotNull reactor.core.publisher.Mono<ServicePool> multithreadedServicePool(org.bukkit.NamespacedKey name, + IService... services)
      Parameters:
      name - The name of the service pool.
      services - The services to register within the service pool.
      Returns:
      -
      A Mono object which contains a ServicePool element. +
      A Mono object which contains a ServicePool element. This service pool will execute each service across a set of non-blocking threads.
      @@ -243,51 +243,51 @@ loadScripts(document, 'script');
      @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(org.bukkit.NamespacedKey poolName, boolean multithreaded)
      Parameters:
      poolName - The name of the service pool.
      multithreaded - Whether the service pool should be multithreaded, or operate upon a single thread.
      Returns:
      -
      A Mono object which contains a ServicePool element. +
      A Mono object which contains a ServicePool element. This pool is empty, meaning it contains no services. Any attempt to run services on this pool while it remains empty will either fail or error. - You can add services to this pool by using addToExistingPool(ServicePool, IService...), - or by using ServicePool.addService(IService).
      + You can add services to this pool by using addToExistingPool(ServicePool, IService...), + or by using ServicePool.addService(IService).
    • -
      +

      addToExistingPool

      @Contract("_, _ -> new") @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> addToExistingPool(@NotNull - @NotNull ServicePool pool, - IService... services)
      +public @NotNull reactor.core.publisher.Mono<ServicePool> addToExistingPool(@NotNull + @NotNull ServicePool pool, + IService... services)
      Parameters:
      pool - The service pool to add to.
      services - The services to register within the service pool.
      Returns:
      -
      A Mono object which contains the ServicePool element that now contains the registered services.
      +
      A Mono object which contains the ServicePool element that now contains the registered services.
    • -
      +

      takeFromExistingPool

      @Contract("_, _ -> new") @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> takeFromExistingPool(@NotNull - @NotNull ServicePool pool, - IService... services)
      +public @NotNull reactor.core.publisher.Mono<ServicePool> takeFromExistingPool(@NotNull + @NotNull ServicePool pool, + IService... services)
      Parameters:
      pool - The service pool to take from.
      services - The services to remove from the pool.
      Returns:
      -
      A Mono object which contains the ServicePool that no longer contains the removed services.
      +
      A Mono object which contains the ServicePool that no longer contains the removed services.
    • @@ -296,7 +296,7 @@ loadScripts(document, 'script');

      getServicePools

      @Contract(" -> new") @NotNull -public @NotNull reactor.core.publisher.Flux<ServicePool> getServicePools()
      +public @NotNull reactor.core.publisher.Flux<ServicePool> getServicePools()
      Returns:
      A Flux object which contains all the service pools currently available.
      @@ -304,10 +304,10 @@ loadScripts(document, 'script');
    • -
      +

      locateServiceWithinPools

      @Contract(pure=true) -public boolean locateServiceWithinPools(IService service)
      +public boolean locateServiceWithinPools(IService service)
      Parameters:
      service - The service to locate.
      @@ -317,16 +317,16 @@ loadScripts(document, 'script');
    • -
      +

      getAssociatedServicePool

      @Contract("_ -> new") @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> getAssociatedServicePool(IService service)
      +public @NotNull reactor.core.publisher.Mono<ServicePool> getAssociatedServicePool(IService service)
      Parameters:
      service - The service pool to call from.
      Returns:
      -
      A Mono object which contains a ServicePool element which contains the specified service. +
      A Mono object which contains a ServicePool element which contains the specified service. If no service pool can be found, an empty Mono is returned.
      diff --git a/docs/io/github/simplex/simplexss/ServicePool.html b/docs/io/github/simplex/simplexss/ServicePool.html index 60c3287..42e91e5 100644 --- a/docs/io/github/simplex/simplexss/ServicePool.html +++ b/docs/io/github/simplex/simplexss/ServicePool.html @@ -6,7 +6,7 @@ - + @@ -68,11 +68,11 @@ loadScripts(document, 'script');
      java.lang.Object -
      io.github.simplex.simplexss.ServicePool
      +
      io.github.simplexdevelopment.scheduler.ServicePool

      @@ -90,7 +90,7 @@ loadScripts(document, 'script');
      Modifier and Type
      Field
      Description
      -
      private final Set<IService>
      +
      private final Set<IService>
      A collection of services related to this service pool.
      @@ -139,9 +139,9 @@ loadScripts(document, 'script');
      Method
      Description
      (package private) void
      - +
       
      -
      @NotNull Set<IService>
      +
      @NotNull Set<IService>
       
      (package private) static org.bukkit.NamespacedKey
      @@ -150,20 +150,20 @@ loadScripts(document, 'script');
      reactor.core.scheduler.Scheduler
       
      -
      @NotNull reactor.core.publisher.Mono<IService>
      +
      @NotNull reactor.core.publisher.Mono<IService>
      getService(org.bukkit.NamespacedKey service_name)
       
      (package private) boolean
      - +
       
      @NotNull reactor.core.publisher.Mono<reactor.core.Disposable>
      queueService(org.bukkit.NamespacedKey service_name)
       
      -
      @NotNull reactor.core.publisher.Mono<ServicePool>
      +
      @NotNull reactor.core.publisher.Mono<ServicePool>
       
      (package private) void
      - +
       
      @NotNull reactor.core.publisher.Flux<reactor.core.Disposable>
      @@ -195,7 +195,7 @@ loadScripts(document, 'script');
    • associatedServices

      -
      private final Set<IService> associatedServices
      +
      private final Set<IService> associatedServices
      A collection of services related to this service pool.
    • @@ -259,9 +259,9 @@ loadScripts(document, 'script');
    • -
      +

      addService

      -
      void addService(IService service)
      +
      void addService(IService service)
      Parameters:
      service - Add a service to the pool's service collection.
      @@ -269,9 +269,9 @@ loadScripts(document, 'script');
    • -
      +

      isValidService

      -
      boolean isValidService(IService service)
      +
      boolean isValidService(IService service)
      Parameters:
      service - The service to check against this pool.
      @@ -285,10 +285,10 @@ loadScripts(document, 'script');

      getAssociatedServices

      @Contract(pure=true) @NotNull -public @NotNull Set<IService> getAssociatedServices()
      +public @NotNull Set<IService> getAssociatedServices()
      Returns:
      -
      A Set of IService objects which are registered with this pool.
      +
      A Set of IService objects which are registered with this pool.
    • @@ -354,7 +354,7 @@ 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(org.bukkit.NamespacedKey service_name)
      Parameters:
      service_name - The name of the service to get.
      @@ -364,9 +364,9 @@ loadScripts(document, 'script');
    • -
      +

      removeService

      -
      void removeService(IService service)
      +
      void removeService(IService service)
      Parameters:
      service - The service to remove from the pool's service collection.
      @@ -377,7 +377,7 @@ loadScripts(document, 'script');

      recycle

      @NotNull -public @NotNull reactor.core.publisher.Mono<ServicePool> recycle()
      +public @NotNull reactor.core.publisher.Mono<ServicePool> recycle()
      Returns:
      This service pool after being cleared of all services. diff --git a/docs/io/github/simplex/simplexss/package-summary.html b/docs/io/github/simplex/simplexss/package-summary.html index b267119..376debb 100644 --- a/docs/io/github/simplex/simplexss/package-summary.html +++ b/docs/io/github/simplex/simplexss/package-summary.html @@ -2,11 +2,11 @@ -io.github.simplex.simplexss +io.github.simplexdevelopment.scheduler - + @@ -56,10 +56,10 @@ loadScripts(document, 'script');
      -

      Package io.github.simplex.simplexss

      +

      Package io.github.simplexdevelopment.scheduler


      -
      package io.github.simplex.simplexss
      +
      package io.github.simplexdevelopment.scheduler
      diff --git a/docs/io/github/simplex/simplexss/package-tree.html b/docs/io/github/simplex/simplexss/package-tree.html index 1002240..4288b27 100644 --- a/docs/io/github/simplex/simplexss/package-tree.html +++ b/docs/io/github/simplex/simplexss/package-tree.html @@ -2,11 +2,11 @@ -io.github.simplex.simplexss Class Hierarchy +io.github.simplexdevelopment.scheduler Class Hierarchy - + @@ -48,7 +48,7 @@ loadScripts(document, 'script');
      -

      Hierarchy For Package io.github.simplex.simplexss

      +

      Hierarchy For Package io.github.simplexdevelopment.scheduler

      Package Hierarchies:
      • All Packages
      • @@ -59,9 +59,9 @@ loadScripts(document, 'script'); diff --git a/docs/io/github/simplexdevelopment/api/Context.html b/docs/io/github/simplexdevelopment/api/Context.html new file mode 100644 index 0000000..d772f4a --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/Context.html @@ -0,0 +1,169 @@ + + + + +Context + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Interface Context<S>

        +
        +
        +
        +
        public interface Context<S>
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            getContext

            +
            reactor.core.publisher.Mono<S> getContext()
            +
            +
            Returns:
            +
            A Mono object which contains a single element represented by the definer of this Context class.
            +
            +
            +
          • +
          • +
            +

            setContext

            +
            reactor.core.publisher.Mono<Void> setContext(S context)
            +
            +
            Parameters:
            +
            context - A separate (or identical) object identified by the definer of this Context class.
            +
            Returns:
            +
            A Mono object which can be used to set the element of this Context class in a non-blocking manner.
            +
            +
            +
          • +
          • +
            +

            contextCollection

            +
            Collection<S> contextCollection()
            +
            +
            Returns:
            +
            A collection of objects related to the definer of this Context class.
            +
            +
            +
          • +
          • +
            +

            fluxFromCollection

            +
            default reactor.core.publisher.Flux<S> fluxFromCollection()
            +
            +
            Returns:
            +
            A Flux object which contains the values of the contextCollection(), for non-blocking interpretation.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/ExecutableService.html b/docs/io/github/simplexdevelopment/api/ExecutableService.html new file mode 100644 index 0000000..e34ec48 --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/ExecutableService.html @@ -0,0 +1,504 @@ + + + + +ExecutableService + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class ExecutableService

        +
        +
        java.lang.Object +
        io.github.simplexdevelopment.api.ExecutableService
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        IService, Runnable
        +
        +
        +
        Direct Known Subclasses:
        +
        ServiceImpl
        +
        +
        +
        public abstract class ExecutableService +extends Object +implements IService
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            service_name

            +
            private final org.bukkit.NamespacedKey service_name
            +
            +
          • +
          • +
            +

            delay

            +
            private final long delay
            +
            +
          • +
          • +
            +

            period

            +
            private final long period
            +
            +
          • +
          • +
            +

            repeating

            +
            private final boolean repeating
            +
            +
          • +
          • +
            +

            mayInterruptWhenRunning

            +
            private final boolean mayInterruptWhenRunning
            +
            +
          • +
          • +
            +

            cancelled

            +
            private boolean cancelled
            +
            +
          • +
          • +
            +

            parentPool

            +
            private ServicePool parentPool
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            ExecutableService

            +
            public ExecutableService(@NotNull + @NotNull org.bukkit.NamespacedKey service_name)
            +
            Creates a new instance of an executable service. + Each service is registered with a NamespacedKey, + to allow for easy identification within the associated ServicePool.
            +
            +
            Parameters:
            +
            service_name - A namespaced key which can be used to identify the service.
            +
            +
            +
          • +
          • +
            +

            ExecutableService

            +
            public ExecutableService(@Nullable + @Nullable ServicePool parentPool, + @NotNull + @NotNull org.bukkit.NamespacedKey service_name)
            +
            Creates a new instance of an executable service. + Each service is registered with a NamespacedKey, + to allow for easy identification within the associated ServicePool.
            +
            +
            Parameters:
            +
            parentPool - The ServicePool which this service is executing on.
            +
            service_name - A namespaced key which can be used to identify the service.
            +
            +
            +
          • +
          • +
            +

            ExecutableService

            +
            public ExecutableService(@Nullable + @Nullable ServicePool parentPool, + @NotNull + @NotNull org.bukkit.NamespacedKey service_name, + @Nullable + @Nullable Long delay)
            +
            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 NamespacedKey, + to allow for easy identification within the associated ServicePool.
            +
            +
            Parameters:
            +
            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.
            +
            +
            +
          • +
          • +
            +

            ExecutableService

            +
            public ExecutableService(@Nullable + @Nullable ServicePool parentPool, + @NotNull + @NotNull org.bukkit.NamespacedKey service_name, + @NotNull + @NotNull Long delay, + @NotNull + @NotNull Long period, + @NotNull + @NotNull Boolean repeating)
            +
            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 repeating as true, and the period is null, + then the period will automatically be set to 20 minutes. + Each service is registered with a NamespacedKey, + to allow for easy identification within the associated ServicePool.
            +
            +
            Parameters:
            +
            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.
            +
            +
            +
          • +
          • +
            +

            ExecutableService

            +
            public ExecutableService(@Nullable + @Nullable ServicePool parentPool, + @NotNull + @NotNull org.bukkit.NamespacedKey service_name, + @Nullable + @Nullable Long delay, + @Nullable + @Nullable Long period, + @NotNull + @NotNull Boolean repeating, + @NotNull + @NotNull Boolean mayInterruptWhenRunning)
            +
            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 repeating as true, and the period is null, + then the period will automatically be set to 20 minutes. + Each service is registered with a NamespacedKey, + to allow for easy identification within the associated ServicePool.
            +
            +
            Parameters:
            +
            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.
            +
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            getNamespacedKey

            +
            public org.bukkit.NamespacedKey getNamespacedKey()
            +
            +
            Specified by:
            +
            getNamespacedKey in interface IService
            +
            Returns:
            +
            The NamespacedKey of this service.
            +
            +
            +
          • +
          • +
            +

            getDelay

            +
            public long getDelay()
            +
            +
            Specified by:
            +
            getDelay in interface IService
            +
            Returns:
            +
            How long the service should wait before executing the first time.
            +
            +
            +
          • +
          • +
            +

            getPeriod

            +
            public long getPeriod()
            +
            +
            Specified by:
            +
            getPeriod in interface IService
            +
            Returns:
            +
            How long the service should wait between subsequent executions.
            +
            +
            +
          • +
          • +
            +

            isPeriodic

            +
            public boolean isPeriodic()
            +
            +
            Specified by:
            +
            isPeriodic in interface IService
            +
            Returns:
            +
            If the service should be scheduled for repeated executions or not.
            +
            +
            +
          • +
          • +
            +

            isCancelled

            +
            public boolean isCancelled()
            +
            Cancels the execution of this service.
            +
            +
            Returns:
            +
            true if the service was cancelled, false if not.
            +
            +
            +
          • +
          • +
            +

            setCancelled

            +
            public reactor.core.publisher.Mono<Void> setCancelled(boolean cancel)
            +
            Cancels the execution of this service.
            +
            +
            Parameters:
            +
            cancel - Whether the service should be cancelled or not.
            +
            +
            +
          • +
          • +
            +

            cancel

            +
            @Contract(pure=true) +reactor.core.publisher.Mono<Void> cancel()
            +
            Actual stop call, to ensure that the service actually #isCancelled().
            +
            +
          • +
          • +
            +

            getParentPool

            +
            public reactor.core.publisher.Mono<ServicePool> getParentPool()
            +
            +
            Specified by:
            +
            getParentPool in interface IService
            +
            Returns:
            +
            The ServicePool which this service is executing on.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/ISchedule.html b/docs/io/github/simplexdevelopment/api/ISchedule.html new file mode 100644 index 0000000..4dd7c1e --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/ISchedule.html @@ -0,0 +1,193 @@ + + + + +ISchedule + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Interface ISchedule

        +
        +
        +
        +
        All Known Implementing Classes:
        +
        SchedulingSystem
        +
        +
        +
        public interface ISchedule
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            getServiceManager

            +
            reactor.core.publisher.Mono<ServiceManager> getServiceManager()
            +
            +
            Returns:
            +
            The service manager which exerts control over the service pools and their associated services.
            +
            +
            +
          • +
          • +
            +

            queue

            +
            reactor.core.publisher.Mono<ServicePool> queue(IService service)
            +
            +
            Parameters:
            +
            service - The service to use to locate the associated service pool and queue the service for execution.
            +
            Returns:
            +
            A Mono that can be used to prepare the service for execution within it's associated service pool. + If the service has no associated pool, a new pool will be created.
            +
            +
            +
          • +
          • +
            +

            runOnce

            +
            reactor.core.publisher.Mono<Void> runOnce(IService service)
            +
            +
            Parameters:
            +
            service - The service to run once.
            +
            Returns:
            +
            A Mono object which can be used to run the service one time using Mono.subscribe().
            +
            +
            +
          • +
          • +
            +

            forceStop

            +
            reactor.core.publisher.Mono<Void> forceStop(IService service)
            +
            +
            Parameters:
            +
            service - The service to forcefully stop.
            +
            Returns:
            +
            A Mono object which can be used to forcefully stop the service with Mono.subscribe().
            +
            +
            +
          • +
          • +
            +

            forceStart

            +
            reactor.core.publisher.Mono<Void> forceStart(IService service)
            +
            +
            Parameters:
            +
            service - The service to forcefully start.
            +
            Returns:
            +
            A Mono object which can be used to forcefully start the service with Mono.subscribe().
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/IService.html b/docs/io/github/simplexdevelopment/api/IService.html new file mode 100644 index 0000000..442d162 --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/IService.html @@ -0,0 +1,284 @@ + + + + +IService + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Interface IService

        +
        +
        +
        +
        All Superinterfaces:
        +
        Runnable
        +
        +
        +
        All Known Implementing Classes:
        +
        ExecutableService, ServiceImpl
        +
        +
        +
        public interface IService +extends Runnable
        +
        +
        +
          + +
        • +
          +

          Method Summary

          +
          +
          +
          +
          +
          Modifier and Type
          +
          Method
          +
          Description
          +
          static @NotNull org.bukkit.NamespacedKey
          + +
           
          +
          long
          + +
           
          +
          org.bukkit.NamespacedKey
          + +
           
          +
          reactor.core.publisher.Mono<ServicePool>
          + +
           
          +
          long
          + +
           
          +
          org.bukkit.plugin.java.JavaPlugin
          + +
           
          +
          boolean
          + +
           
          +
          static @NotNull org.bukkit.NamespacedKey
          + +
          +
          This is an easy static call for creating a new namespaced key for services and service pools.
          +
          +
          default void
          +
          run()
          +
           
          +
          reactor.core.publisher.Mono<Void>
          + +
          +
          The actual start method for the service.
          +
          +
          reactor.core.publisher.Mono<Void>
          + +
          +
          The actual end method for the service.
          +
          +
          +
          +
          +
          +
        • +
        +
        +
        +
          + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            getDefaultNamespacedKey

            +
            @Contract(" -> new") +@NotNull +static @NotNull org.bukkit.NamespacedKey getDefaultNamespacedKey()
            +
            +
          • +
          • +
            +

            getNamespacedKey

            +
            org.bukkit.NamespacedKey getNamespacedKey()
            +
            +
            Returns:
            +
            The NamespacedKey of this service.
            +
            +
            +
          • +
          • +
            +

            isPeriodic

            +
            boolean isPeriodic()
            +
            +
            Returns:
            +
            If the service should be scheduled for repeated executions or not.
            +
            +
            +
          • +
          • +
            +

            getPeriod

            +
            long getPeriod()
            +
            +
            Returns:
            +
            How long the service should wait between subsequent executions.
            +
            +
            +
          • +
          • +
            +

            getDelay

            +
            long getDelay()
            +
            +
            Returns:
            +
            How long the service should wait before executing the first time.
            +
            +
            +
          • +
          • +
            +

            start

            +
            reactor.core.publisher.Mono<Void> start()
            +
            The actual start method for the service. This should be overridden by subclasses, + and should include all the required code necessary to execute when the service is queued.
            +
            +
            Returns:
            +
            An encapsulated Mono object representing the start method for the service.
            +
            +
            +
          • +
          • +
            +

            stop

            +
            reactor.core.publisher.Mono<Void> stop()
            +
            The actual end method for the service. This should be overridden by subclasses, + and should include all the required code necessary to execute when the service is stopped.
            +
            +
            Returns:
            +
            An encapsulated Mono object representing the end method for the service.
            +
            +
            +
          • +
          • +
            +

            getPlugin

            +
            org.bukkit.plugin.java.JavaPlugin getPlugin()
            +
            +
            Returns:
            +
            The plugin which was defined in the constructor. + This should be an instance of your main plugin class.
            +
            +
            +
          • +
          • +
            +

            getParentPool

            +
            reactor.core.publisher.Mono<ServicePool> getParentPool()
            +
            +
            Returns:
            +
            The ServicePool which this service is executing on.
            +
            +
            +
          • +
          • +
            +

            run

            +
            default void run()
            +
            +
            Specified by:
            +
            run in interface Runnable
            +
            +
            +
          • +
          • +
            +

            newNamespacedKey

            +
            @Contract("_, _ -> new") +@NotNull +static @NotNull org.bukkit.NamespacedKey newNamespacedKey(String space, + String key)
            +
            This is an easy static call for creating a new namespaced key for services and service pools.
            +
            +
            Parameters:
            +
            space - The namespace of the service.
            +
            key - The key name of the service.
            +
            Returns:
            +
            A NamespacedKey object representing the service.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/InvalidServiceException.html b/docs/io/github/simplexdevelopment/api/InvalidServiceException.html new file mode 100644 index 0000000..528d4c4 --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/InvalidServiceException.html @@ -0,0 +1,187 @@ + + + + +InvalidServiceException + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class InvalidServiceException

        +
        +
        java.lang.Object +
        java.lang.Throwable +
        java.lang.Exception +
        java.lang.RuntimeException +
        io.github.simplexdevelopment.api.InvalidServiceException
        +
        +
        +
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        Serializable
        +
        +
        +
        public class InvalidServiceException +extends RuntimeException
        +
        +
        See Also:
        +
        + +
        +
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            InvalidServiceException

            +
            public InvalidServiceException(IService service)
            +
            +
          • +
          • +
            +

            InvalidServiceException

            +
            public InvalidServiceException(Throwable th)
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          + +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/InvalidServicePoolException.html b/docs/io/github/simplexdevelopment/api/InvalidServicePoolException.html new file mode 100644 index 0000000..7e0f8a2 --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/InvalidServicePoolException.html @@ -0,0 +1,198 @@ + + + + +InvalidServicePoolException + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class InvalidServicePoolException

        +
        +
        java.lang.Object +
        java.lang.Throwable +
        java.lang.Exception +
        java.lang.RuntimeException +
        io.github.simplexdevelopment.api.InvalidServicePoolException
        +
        +
        +
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        Serializable
        +
        +
        +
        public class InvalidServicePoolException +extends RuntimeException
        +
        +
        See Also:
        +
        + +
        +
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            InvalidServicePoolException

            +
            public InvalidServicePoolException()
            +
            +
          • +
          • +
            +

            InvalidServicePoolException

            +
            public InvalidServicePoolException(@NotNull + @NotNull String string)
            +
            +
          • +
          • +
            +

            InvalidServicePoolException

            +
            public InvalidServicePoolException(Throwable ex)
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          + +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/package-summary.html b/docs/io/github/simplexdevelopment/api/package-summary.html new file mode 100644 index 0000000..1e57726 --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/package-summary.html @@ -0,0 +1,98 @@ + + + + +io.github.simplexdevelopment.api + + + + + + + + + + + + + + + +
        + +
        +
        +
        +

        Package io.github.simplexdevelopment.api

        +
        +
        +
        package io.github.simplexdevelopment.api
        +
        + +
        +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/api/package-tree.html b/docs/io/github/simplexdevelopment/api/package-tree.html new file mode 100644 index 0000000..ed4aa21 --- /dev/null +++ b/docs/io/github/simplexdevelopment/api/package-tree.html @@ -0,0 +1,97 @@ + + + + +io.github.simplexdevelopment.api Class Hierarchy + + + + + + + + + + + + + + + +
        + +
        +
        +
        +

        Hierarchy For Package io.github.simplexdevelopment.api

        +Package Hierarchies: + +
        +
        +

        Class Hierarchy

        + +
        +
        +

        Interface Hierarchy

        +
          +
        • io.github.simplexdevelopment.api.Context<S>
        • +
        • io.github.simplexdevelopment.api.ISchedule
        • +
        • java.lang.Runnable +
            +
          • io.github.simplexdevelopment.api.IService
          • +
          +
        • +
        +
        +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/impl/Main.html b/docs/io/github/simplexdevelopment/impl/Main.html new file mode 100644 index 0000000..d8ca188 --- /dev/null +++ b/docs/io/github/simplexdevelopment/impl/Main.html @@ -0,0 +1,252 @@ + + + + +Main + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class Main

        +
        +
        java.lang.Object +
        org.bukkit.plugin.PluginBase +
        org.bukkit.plugin.java.JavaPlugin +
        io.github.simplexdevelopment.impl.Main
        +
        +
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin
        +
        +
        +
        public class Main +extends org.bukkit.plugin.java.JavaPlugin
        +
        +
        +
          + +
        • +
          +

          Field Summary

          +
          Fields
          +
          +
          Modifier and Type
          +
          Field
          +
          Description
          +
          private reactor.core.publisher.Flux<reactor.core.Disposable>
          + +
           
          + + +
           
          + + +
           
          +
          +
          +
        • + +
        • +
          +

          Constructor Summary

          +
          Constructors
          +
          +
          Constructor
          +
          Description
          + +
           
          +
          +
          +
        • + +
        • +
          +

          Method Summary

          +
          +
          +
          +
          +
          Modifier and Type
          +
          Method
          +
          Description
          + + +
           
          +
          void
          + +
           
          +
          void
          + +
           
          +
          +
          +
          +
          +

          Methods inherited from class org.bukkit.plugin.java.JavaPlugin

          +getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
          +
          +

          Methods inherited from class org.bukkit.plugin.PluginBase

          +equals, getName, hashCode
          +
          +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
          +
          +

          Methods inherited from interface org.bukkit.plugin.Plugin

          +getComponentLogger, getLog4JLogger, getSLF4JLogger
          +
          +
        • +
        +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            pool

            +
            public ServicePool pool
            +
            +
          • +
          • +
            +

            scheduler

            +
            private SchedulingSystem<Main> scheduler
            +
            +
          • +
          • +
            +

            disposables

            +
            private reactor.core.publisher.Flux<reactor.core.Disposable> disposables
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            Main

            +
            public Main()
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            onEnable

            +
            public void onEnable()
            +
            +
            Specified by:
            +
            onEnable in interface org.bukkit.plugin.Plugin
            +
            Overrides:
            +
            onEnable in class org.bukkit.plugin.java.JavaPlugin
            +
            +
            +
          • +
          • +
            +

            onDisable

            +
            public void onDisable()
            +
            +
            Specified by:
            +
            onDisable in interface org.bukkit.plugin.Plugin
            +
            Overrides:
            +
            onDisable in class org.bukkit.plugin.java.JavaPlugin
            +
            +
            +
          • +
          • +
            +

            getScheduler

            +
            public SchedulingSystem<Main> getScheduler()
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/impl/ServiceImpl.html b/docs/io/github/simplexdevelopment/impl/ServiceImpl.html new file mode 100644 index 0000000..3c99261 --- /dev/null +++ b/docs/io/github/simplexdevelopment/impl/ServiceImpl.html @@ -0,0 +1,257 @@ + + + + +ServiceImpl + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class ServiceImpl

        +
        +
        java.lang.Object +
        io.github.simplexdevelopment.api.ExecutableService +
        io.github.simplexdevelopment.impl.ServiceImpl
        +
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        IService, Runnable
        +
        +
        +
        public class ServiceImpl +extends ExecutableService
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            plugin

            +
            private final Main plugin
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            ServiceImpl

            +
            public ServiceImpl(Main plugin)
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            start

            +
            public reactor.core.publisher.Mono<Void> start()
            +
            Description copied from interface: IService
            +
            The actual start method for the service. This should be overridden by subclasses, + and should include all the required code necessary to execute when the service is queued.
            +
            +
            Returns:
            +
            An encapsulated Mono object representing the start method for the service.
            +
            +
            +
          • +
          • +
            +

            stop

            +
            public reactor.core.publisher.Mono<Void> stop()
            +
            Description copied from interface: IService
            +
            The actual end method for the service. This should be overridden by subclasses, + and should include all the required code necessary to execute when the service is stopped.
            +
            +
            Returns:
            +
            An encapsulated Mono object representing the end method for the service.
            +
            +
            +
          • +
          • +
            +

            getPlugin

            +
            public Main getPlugin()
            +
            +
            Returns:
            +
            The plugin which was defined in the constructor. + This should be an instance of your main plugin class.
            +
            +
            +
          • +
          • +
            +

            getParentPool

            +
            public reactor.core.publisher.Mono<ServicePool> getParentPool()
            +
            +
            Specified by:
            +
            getParentPool in interface IService
            +
            Overrides:
            +
            getParentPool in class ExecutableService
            +
            Returns:
            +
            The ServicePool which this service is executing on.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/impl/package-summary.html b/docs/io/github/simplexdevelopment/impl/package-summary.html new file mode 100644 index 0000000..dce6304 --- /dev/null +++ b/docs/io/github/simplexdevelopment/impl/package-summary.html @@ -0,0 +1,84 @@ + + + + +io.github.simplexdevelopment.impl + + + + + + + + + + + + + + + +
        + +
        +
        +
        +

        Package io.github.simplexdevelopment.impl

        +
        +
        +
        package io.github.simplexdevelopment.impl
        +
        + +
        +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/impl/package-tree.html b/docs/io/github/simplexdevelopment/impl/package-tree.html new file mode 100644 index 0000000..97ff96e --- /dev/null +++ b/docs/io/github/simplexdevelopment/impl/package-tree.html @@ -0,0 +1,84 @@ + + + + +io.github.simplexdevelopment.impl Class Hierarchy + + + + + + + + + + + + + + + +
        + +
        +
        +
        +

        Hierarchy For Package io.github.simplexdevelopment.impl

        +Package Hierarchies: + +
        +
        +

        Class Hierarchy

        +
          +
        • java.lang.Object +
            +
          • io.github.simplexdevelopment.api.ExecutableService (implements io.github.simplexdevelopment.api.IService) + +
          • +
          • org.bukkit.plugin.PluginBase (implements org.bukkit.plugin.Plugin) +
              +
            • org.bukkit.plugin.java.JavaPlugin +
                +
              • io.github.simplexdevelopment.impl.Main
              • +
              +
            • +
            +
          • +
          +
        • +
        +
        +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/BukkitDisposable.html b/docs/io/github/simplexdevelopment/scheduler/BukkitDisposable.html new file mode 100644 index 0000000..7d674c0 --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/BukkitDisposable.html @@ -0,0 +1,310 @@ + + + + +BukkitDisposable + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Record Class BukkitDisposable

        +
        +
        java.lang.Object +
        java.lang.Record +
        io.github.simplexdevelopment.scheduler.BukkitDisposable
        +
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        reactor.core.Disposable
        +
        +
        +
        public record BukkitDisposable(org.bukkit.scheduler.BukkitTask task) +extends Record +implements reactor.core.Disposable
        +
        +
        +
          + +
        • +
          +

          Nested Class Summary

          +
          +

          Nested classes/interfaces inherited from interface reactor.core.Disposable

          +reactor.core.Disposable.Composite, reactor.core.Disposable.Swap
          +
          +
        • + +
        • +
          +

          Field Summary

          +
          Fields
          +
          +
          Modifier and Type
          +
          Field
          +
          Description
          +
          private final org.bukkit.scheduler.BukkitTask
          + +
          +
          The field for the task record component.
          +
          +
          +
          +
        • + +
        • +
          +

          Constructor Summary

          +
          Constructors
          +
          +
          Constructor
          +
          Description
          +
          BukkitDisposable(org.bukkit.scheduler.BukkitTask task)
          +
          +
          Creates an instance of a BukkitDisposable record class.
          +
          +
          +
          +
        • + +
        • +
          +

          Method Summary

          +
          +
          +
          +
          +
          Modifier and Type
          +
          Method
          +
          Description
          +
          void
          + +
          +
          Disposes of the task upstream on the Bukkit scheduler.
          +
          +
          final boolean
          + +
          +
          Indicates whether some other object is "equal to" this one.
          +
          +
          final int
          + +
          +
          Returns a hash code value for this object.
          +
          +
          boolean
          + +
          +
          Checks if the task is cancelled.
          +
          +
          org.bukkit.scheduler.BukkitTask
          + +
          +
          Returns the value of the task record component.
          +
          +
          final String
          + +
          +
          Returns a string representation of this record class.
          +
          +
          +
          +
          +
          +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
          +
          +
        • +
        +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            task

            +
            private final org.bukkit.scheduler.BukkitTask task
            +
            The field for the task record component.
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            BukkitDisposable

            +
            public BukkitDisposable(org.bukkit.scheduler.BukkitTask task)
            +
            Creates an instance of a BukkitDisposable record class.
            +
            +
            Parameters:
            +
            task - the value for the task record component
            +
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            dispose

            +
            public void dispose()
            +
            Disposes of the task upstream on the Bukkit scheduler.
            +
            +
            Specified by:
            +
            dispose in interface reactor.core.Disposable
            +
            +
            +
          • +
          • +
            +

            isDisposed

            +
            public boolean isDisposed()
            +
            Checks if the task is cancelled.
            +
            +
            Specified by:
            +
            isDisposed in interface reactor.core.Disposable
            +
            Returns:
            +
            true if the task is cancelled, false otherwise.
            +
            +
            +
          • +
          • +
            +

            toString

            +
            public final String toString()
            +
            Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
            +
            +
            Specified by:
            +
            toString in class Record
            +
            Returns:
            +
            a string representation of this object
            +
            +
            +
          • +
          • +
            +

            hashCode

            +
            public final int hashCode()
            +
            Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
            +
            +
            Specified by:
            +
            hashCode in class Record
            +
            Returns:
            +
            a hash code value for this object
            +
            +
            +
          • +
          • +
            +

            equals

            +
            public final boolean equals(Object o)
            +
            Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
            +
            +
            Specified by:
            +
            equals in class Record
            +
            Parameters:
            +
            o - the object with which to compare
            +
            Returns:
            +
            true if this object is the same as the o argument; false otherwise.
            +
            +
            +
          • +
          • +
            +

            task

            +
            public org.bukkit.scheduler.BukkitTask task()
            +
            Returns the value of the task record component.
            +
            +
            Returns:
            +
            the value of the task record component
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.html b/docs/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.html new file mode 100644 index 0000000..419d442 --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.html @@ -0,0 +1,445 @@ + + + + +ReactorBukkitScheduler + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Record Class ReactorBukkitScheduler

        +
        +
        java.lang.Object +
        java.lang.Record +
        io.github.simplexdevelopment.scheduler.ReactorBukkitScheduler
        +
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        reactor.core.Disposable, reactor.core.scheduler.Scheduler, reactor.core.scheduler.Scheduler.Worker
        +
        +
        +
        public record ReactorBukkitScheduler(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.scheduler.BukkitScheduler scheduler) +extends Record +implements reactor.core.scheduler.Scheduler, reactor.core.scheduler.Scheduler.Worker
        +
        +
        +
          + +
        • +
          +

          Nested Class Summary

          +
          +

          Nested classes/interfaces inherited from interface reactor.core.Disposable

          +reactor.core.Disposable.Composite, reactor.core.Disposable.Swap
          +
          +

          Nested classes/interfaces inherited from interface reactor.core.scheduler.Scheduler

          +reactor.core.scheduler.Scheduler.Worker
          +
          +
        • + +
        • +
          +

          Field Summary

          +
          Fields
          +
          +
          Modifier and Type
          +
          Field
          +
          Description
          +
          private final org.bukkit.plugin.java.JavaPlugin
          + +
          +
          The field for the plugin record component.
          +
          +
          private final org.bukkit.scheduler.BukkitScheduler
          + +
          +
          The field for the scheduler record component.
          +
          +
          +
          +
        • + +
        • +
          +

          Constructor Summary

          +
          Constructors
          +
          +
          Constructor
          +
          Description
          +
          ReactorBukkitScheduler(org.bukkit.plugin.java.JavaPlugin plugin, + org.bukkit.scheduler.BukkitScheduler scheduler)
          +
          +
          Creates an instance of a ReactorBukkitScheduler record class.
          +
          +
          +
          +
        • + +
        • +
          +

          Method Summary

          +
          +
          +
          +
          +
          Modifier and Type
          +
          Method
          +
          Description
          +
          @NotNull reactor.core.scheduler.Scheduler.Worker
          + +
          +
          A new Scheduler.Worker.
          +
          +
          void
          + +
          +
          This method does nothing and is unused.
          +
          +
          final boolean
          + +
          +
          Indicates whether some other object is "equal to" this one.
          +
          +
          final int
          + +
          +
          Returns a hash code value for this object.
          +
          +
          org.bukkit.plugin.java.JavaPlugin
          + +
          +
          Returns the value of the plugin record component.
          +
          +
          @NotNull reactor.core.Disposable
          +
          schedule(@NotNull Runnable task)
          +
          +
          Delegates to the BukkitScheduler.
          +
          +
          @NotNull reactor.core.Disposable
          +
          schedule(@NotNull Runnable task, + long delay, + @Nullable TimeUnit unit)
          +
          +
          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
          + +
          +
          Returns a string representation of this record class.
          +
          +
          +
          +
          +
          +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
          +
          +

          Methods inherited from interface reactor.core.Disposable

          +isDisposed
          +
          +

          Methods inherited from interface reactor.core.scheduler.Scheduler

          +now, start
          +
          +
        • +
        +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            plugin

            +
            private final org.bukkit.plugin.java.JavaPlugin plugin
            +
            The field for the plugin record component.
            +
            +
          • +
          • +
            +

            scheduler

            +
            private final org.bukkit.scheduler.BukkitScheduler scheduler
            +
            The field for the scheduler record component.
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            ReactorBukkitScheduler

            +
            public ReactorBukkitScheduler(org.bukkit.plugin.java.JavaPlugin plugin, + org.bukkit.scheduler.BukkitScheduler scheduler)
            +
            Creates an instance of a ReactorBukkitScheduler record class.
            +
            +
            Parameters:
            +
            plugin - the value for the plugin record component
            +
            scheduler - the value for the scheduler record component
            +
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            schedule

            +
            @NotNull +public @NotNull reactor.core.Disposable schedule(@NotNull + @NotNull Runnable task)
            +
            Delegates to the BukkitScheduler.
            +
            +
            Specified by:
            +
            schedule in interface reactor.core.scheduler.Scheduler
            +
            Specified by:
            +
            schedule in interface reactor.core.scheduler.Scheduler.Worker
            +
            Parameters:
            +
            task - The task to delegate.
            +
            Returns:
            +
            A disposable that can be used to cancel the task.
            +
            +
            +
          • +
          • +
            +

            schedule

            +
            @NotNull +public @NotNull reactor.core.Disposable schedule(@NotNull + @NotNull Runnable task, + long delay, + @Nullable + @Nullable TimeUnit unit)
            +
            Delegates to the BukkitScheduler with a delay.
            +
            +
            Specified by:
            +
            schedule in interface reactor.core.scheduler.Scheduler
            +
            Specified by:
            +
            schedule in interface reactor.core.scheduler.Scheduler.Worker
            +
            Parameters:
            +
            task - The task to delegate
            +
            delay - The amount of time to wait before running the task
            +
            unit - Unused parameter in this implementation. + Regardless of what value you use, this parameter will never be called.
            +
            Returns:
            +
            A disposable that can be used to cancel the task.
            +
            +
            +
          • +
          • +
            +

            schedulePeriodically

            +
            @NotNull +public @NotNull reactor.core.Disposable schedulePeriodically(@NotNull + @NotNull Runnable task, + long initialDelay, + long period, + @Nullable + @Nullable TimeUnit unit)
            +
            Delegates to the BukkitScheduler with a delay and a period. + The initial delay may be 0L, but the period must be greater than 0L.
            +
            +
            Specified by:
            +
            schedulePeriodically in interface reactor.core.scheduler.Scheduler
            +
            Specified by:
            +
            schedulePeriodically in interface reactor.core.scheduler.Scheduler.Worker
            +
            Parameters:
            +
            task - The task to delegate.
            +
            initialDelay - The amount of time to wait before running the task.
            +
            period - The amount of time to wait between each execution of the task.
            +
            unit - Unused parameter in this implementation. + Regardless of what value you use, this parameter will never be called.
            +
            Returns:
            +
            A disposable that can be used to cancel the task.
            +
            +
            +
          • +
          • +
            +

            createWorker

            +
            @NotNull +public @NotNull reactor.core.scheduler.Scheduler.Worker createWorker()
            +
            A new Scheduler.Worker.
            +
            +
            Specified by:
            +
            createWorker in interface reactor.core.scheduler.Scheduler
            +
            Returns:
            +
            This class instance, as it implements Scheduler.Worker.
            +
            +
            +
          • +
          • +
            +

            dispose

            +
            public void dispose()
            +
            This method does nothing and is unused.
            +
            +
            Specified by:
            +
            dispose in interface reactor.core.Disposable
            +
            Specified by:
            +
            dispose in interface reactor.core.scheduler.Scheduler
            +
            +
            +
          • +
          • +
            +

            toString

            +
            public final String toString()
            +
            Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
            +
            +
            Specified by:
            +
            toString in class Record
            +
            Returns:
            +
            a string representation of this object
            +
            +
            +
          • +
          • +
            +

            hashCode

            +
            public final int hashCode()
            +
            Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
            +
            +
            Specified by:
            +
            hashCode in class Record
            +
            Returns:
            +
            a hash code value for this object
            +
            +
            +
          • +
          • +
            +

            equals

            +
            public final boolean equals(Object o)
            +
            Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
            +
            +
            Specified by:
            +
            equals in class Record
            +
            Parameters:
            +
            o - the object with which to compare
            +
            Returns:
            +
            true if this object is the same as the o argument; false otherwise.
            +
            +
            +
          • +
          • +
            +

            plugin

            +
            public org.bukkit.plugin.java.JavaPlugin plugin()
            +
            Returns the value of the plugin record component.
            +
            +
            Returns:
            +
            the value of the plugin record component
            +
            +
            +
          • +
          • +
            +

            scheduler

            +
            public org.bukkit.scheduler.BukkitScheduler scheduler()
            +
            Returns the value of the scheduler record component.
            +
            +
            Returns:
            +
            the value of the scheduler record component
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/SchedulingSystem.html b/docs/io/github/simplexdevelopment/scheduler/SchedulingSystem.html new file mode 100644 index 0000000..88146d3 --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/SchedulingSystem.html @@ -0,0 +1,347 @@ + + + + +SchedulingSystem + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin>

        +
        +
        java.lang.Object +
        io.github.simplexdevelopment.scheduler.SchedulingSystem<T>
        +
        +
        +
        +
        All Implemented Interfaces:
        +
        ISchedule
        +
        +
        +
        public final class SchedulingSystem<T extends org.bukkit.plugin.java.JavaPlugin> +extends Object +implements ISchedule
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            serviceManager

            +
            private final ServiceManager serviceManager
            +
            +
          • +
          • +
            +

            plugin

            +
            private final T extends org.bukkit.plugin.java.JavaPlugin plugin
            +
            +
          • +
          • +
            +

            repeatingPools

            +
            private final Set<ServicePool> repeatingPools
            +
            +
          • +
          • +
            +

            mainScheduler

            +
            private final ReactorBukkitScheduler mainScheduler
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            SchedulingSystem

            +
            public SchedulingSystem(T plugin)
            +
            Creates a new instance of the scheduling system. This is used to manage the scheduling of services.
            +
            +
            Parameters:
            +
            plugin - The plugin to use for this scheduling system. This should be an instance of your plugin.
            +
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            getRepeatingPools

            +
            @Contract(pure=true) +public Set<ServicePool> getRepeatingPools()
            +
            +
            Returns:
            +
            A set of ServicePools which contain repeating services.
            +
            +
            +
          • +
          • +
            +

            getServiceManager

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<ServiceManager> getServiceManager()
            +
            +
            Specified by:
            +
            getServiceManager in interface ISchedule
            +
            Returns:
            +
            The service manager which exerts control over the service pools and their associated services.
            +
            +
            +
          • +
          • +
            +

            queue

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> queue(@NotNull + @NotNull IService service)
            +
            +
            Specified by:
            +
            queue in interface ISchedule
            +
            Parameters:
            +
            service - The service to use to locate the associated service pool and queue the service for execution.
            +
            Returns:
            +
            A Mono that can be used to prepare the service for execution within it's associated service pool. + If the service has no associated pool, a new pool will be created.
            +
            +
            +
          • +
          • +
            +

            runOnce

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<Void> runOnce(IService service)
            +
            +
            Specified by:
            +
            runOnce in interface ISchedule
            +
            Parameters:
            +
            service - The service to run once.
            +
            Returns:
            +
            A Mono object which can be used to run the service one time using Mono.subscribe().
            +
            +
            +
          • +
          • +
            +

            forceStop

            +
            public reactor.core.publisher.Mono<Void> forceStop(IService service)
            +
            +
            Specified by:
            +
            forceStop in interface ISchedule
            +
            Parameters:
            +
            service - The service to forcefully stop.
            +
            Returns:
            +
            A Mono object which can be used to forcefully stop the service with Mono.subscribe().
            +
            +
            +
          • +
          • +
            +

            forceStart

            +
            public reactor.core.publisher.Mono<Void> forceStart(IService service)
            +
            +
            Specified by:
            +
            forceStart in interface ISchedule
            +
            Parameters:
            +
            service - The service to forcefully start.
            +
            Returns:
            +
            A Mono object which can be used to forcefully start the service with Mono.subscribe().
            +
            +
            +
          • +
          • +
            +

            getProvidingPlugin

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<T> getProvidingPlugin()
            +
            +
            Returns:
            +
            A Mono object containing your plugin, for non-blocking communication.
            +
            +
            +
          • +
          • +
            +

            getMainScheduler

            +
            @Contract(pure=true) +public ReactorBukkitScheduler getMainScheduler()
            +
            +
            Returns:
            +
            The main thread which the scheduling system operates on.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/ServiceManager.html b/docs/io/github/simplexdevelopment/scheduler/ServiceManager.html new file mode 100644 index 0000000..e0363e5 --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/ServiceManager.html @@ -0,0 +1,344 @@ + + + + +ServiceManager + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class ServiceManager

        +
        +
        java.lang.Object +
        io.github.simplexdevelopment.scheduler.ServiceManager
        +
        +
        +
        +
        public final class ServiceManager +extends Object
        +
        +
        + +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            servicePools

            +
            private final Set<ServicePool> servicePools
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            ServiceManager

            +
            public ServiceManager()
            +
            Creates a new instance of the Service Manager class. + This class acts as a Service Pool factory, and can be used to create + both single and multithreaded Service Pools, empty service pools, as well as + retrieve existing Service Pools. It also provides methods for you to add and remove + IServices from the {ServicePool} parameter.
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            createServicePool

            +
            @Contract(pure=true, + value="_, _ -> new") +@NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> createServicePool(org.bukkit.NamespacedKey poolName, + IService... services)
            +
            +
            Parameters:
            +
            poolName - The name of the service pool.
            +
            services - The services to register within the service pool.
            +
            Returns:
            +
            A Mono object which contains a ServicePool element. + This service pool will execute each service consecutively within a singular non-blocking thread.
            +
            +
            +
          • +
          • +
            +

            multithreadedServicePool

            +
            @Contract(pure=true, + value="_, _ -> new") +@NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> multithreadedServicePool(org.bukkit.NamespacedKey name, + IService... services)
            +
            +
            Parameters:
            +
            name - The name of the service pool.
            +
            services - The services to register within the service pool.
            +
            Returns:
            +
            A Mono object which contains a ServicePool element. + This service pool will execute each service across a set of non-blocking threads.
            +
            +
            +
          • +
          • +
            +

            emptyServicePool

            +
            @Contract(pure=true, + value="_, _ -> new") +@NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> emptyServicePool(org.bukkit.NamespacedKey poolName, + boolean multithreaded)
            +
            +
            Parameters:
            +
            poolName - The name of the service pool.
            +
            multithreaded - Whether the service pool should be multithreaded, or operate upon a single thread.
            +
            Returns:
            +
            A Mono object which contains a ServicePool element. + This pool is empty, meaning it contains no services. Any attempt to run services on this pool while it remains empty will either fail or error. + You can add services to this pool by using addToExistingPool(ServicePool, IService...), + or by using ServicePool.addService(IService).
            +
            +
            +
          • +
          • +
            +

            addToExistingPool

            +
            @Contract("_, _ -> new") +@NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> addToExistingPool(@NotNull + @NotNull ServicePool pool, + IService... services)
            +
            +
            Parameters:
            +
            pool - The service pool to add to.
            +
            services - The services to register within the service pool.
            +
            Returns:
            +
            A Mono object which contains the ServicePool element that now contains the registered services.
            +
            +
            +
          • +
          • +
            +

            takeFromExistingPool

            +
            @Contract("_, _ -> new") +@NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> takeFromExistingPool(@NotNull + @NotNull ServicePool pool, + IService... services)
            +
            +
            Parameters:
            +
            pool - The service pool to take from.
            +
            services - The services to remove from the pool.
            +
            Returns:
            +
            A Mono object which contains the ServicePool that no longer contains the removed services.
            +
            +
            +
          • +
          • +
            +

            getServicePools

            +
            @Contract(" -> new") +@NotNull +public @NotNull reactor.core.publisher.Flux<ServicePool> getServicePools()
            +
            +
            Returns:
            +
            A Flux object which contains all the service pools currently available.
            +
            +
            +
          • +
          • +
            +

            locateServiceWithinPools

            +
            @Contract(pure=true) +public boolean locateServiceWithinPools(IService service)
            +
            +
            Parameters:
            +
            service - The service to locate.
            +
            Returns:
            +
            True if the service is somewhere within a service pool, false otherwise.
            +
            +
            +
          • +
          • +
            +

            getAssociatedServicePool

            +
            @Contract("_ -> new") +@NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> getAssociatedServicePool(IService service)
            +
            +
            Parameters:
            +
            service - The service pool to call from.
            +
            Returns:
            +
            A Mono object which contains a ServicePool element which contains the specified service. + If no service pool can be found, an empty Mono is returned.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/ServicePool.html b/docs/io/github/simplexdevelopment/scheduler/ServicePool.html new file mode 100644 index 0000000..7f4d9db --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/ServicePool.html @@ -0,0 +1,440 @@ + + + + +ServicePool + + + + + + + + + + + + + + + +
        + +
        +
        + +
        + +

        Class ServicePool

        +
        +
        java.lang.Object +
        io.github.simplexdevelopment.scheduler.ServicePool
        +
        +
        +
        +
        public final class ServicePool +extends Object
        +
        +
        +
          + +
        • +
          +

          Field Summary

          +
          Fields
          +
          +
          Modifier and Type
          +
          Field
          +
          Description
          +
          private final Set<IService>
          + +
          +
          A collection of services related to this service pool.
          +
          +
          private static final org.bukkit.NamespacedKey
          + +
          +
          The default NamespacedKey used to identify unmarked services.
          +
          +
          private final org.bukkit.NamespacedKey
          + +
          +
          The key used to identify this service pool.
          +
          + + +
           
          +
          private final reactor.core.scheduler.Scheduler
          + +
          +
          The scheduler used to run the services in this pool.
          +
          +
          +
          +
        • + +
        • +
          +

          Constructor Summary

          +
          Constructors
          +
          +
          Constructor
          +
          Description
          +
          ServicePool(org.bukkit.NamespacedKey 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, + org.bukkit.plugin.java.JavaPlugin plugin)
          +
          +
          This will create a new instance of a Service Pool with the ReactorBukkitScheduler as its main scheduler.
          +
          +
          +
          +
        • + +
        • +
          +

          Method Summary

          +
          +
          +
          +
          +
          Modifier and Type
          +
          Method
          +
          Description
          +
          (package private) void
          + +
           
          +
          @NotNull Set<IService>
          + +
           
          +
          (package private) static org.bukkit.NamespacedKey
          + +
           
          +
          reactor.core.scheduler.Scheduler
          + +
           
          +
          @NotNull reactor.core.publisher.Mono<IService>
          +
          getService(org.bukkit.NamespacedKey service_name)
          +
           
          +
          (package private) boolean
          + +
           
          +
          @NotNull reactor.core.publisher.Mono<reactor.core.Disposable>
          + +
           
          +
          @NotNull reactor.core.publisher.Mono<ServicePool>
          + +
           
          +
          (package private) void
          + +
           
          +
          @NotNull reactor.core.publisher.Flux<reactor.core.Disposable>
          + +
           
          +
          @NotNull reactor.core.publisher.Mono<Void>
          +
          stopService(@NotNull org.bukkit.NamespacedKey service_name, + @Nullable reactor.core.publisher.Mono<reactor.core.Disposable> disposable)
          +
           
          +
          @NotNull reactor.core.publisher.Mono<Void>
          +
          stopServices(@NotNull reactor.core.publisher.Flux<reactor.core.Disposable> disposableThread)
          +
           
          +
          +
          +
          +
          +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
          +
          +
        • +
        +
        +
        +
          + +
        • +
          +

          Field Details

          +
            +
          • +
            +

            DEFAULT

            +
            private static final org.bukkit.NamespacedKey DEFAULT
            +
            The default NamespacedKey used to identify unmarked services. This will cause errors if left unchecked.
            +
            +
          • +
          • +
            +

            associatedServices

            +
            private final Set<IService> associatedServices
            +
            A collection of services related to this service pool.
            +
            +
          • +
          • +
            +

            scheduler

            +
            private final reactor.core.scheduler.Scheduler scheduler
            +
            The scheduler used to run the services in this pool.
            +
            +
          • +
          • +
            +

            name

            +
            private final org.bukkit.NamespacedKey name
            +
            The key used to identify this service pool.
            +
            +
          • +
          • +
            +

            rbScheduler

            +
            private final ReactorBukkitScheduler rbScheduler
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Constructor Details

          +
            +
          • +
            +

            ServicePool

            +
            public ServicePool(org.bukkit.NamespacedKey name, + boolean multithreaded)
            +
            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.
            +
            +
            Parameters:
            +
            name - The name of this service pool.
            +
            multithreaded - Whether this service pool should be multithreaded, or operate upon a single thread.
            +
            +
            +
          • +
          • +
            +

            ServicePool

            +
            public ServicePool(org.bukkit.NamespacedKey name, + org.bukkit.plugin.java.JavaPlugin plugin)
            +
            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.
            +
            +
            Parameters:
            +
            name - The name of this service pool.
            +
            +
            +
          • +
          +
          +
        • + +
        • +
          +

          Method Details

          +
            +
          • +
            +

            getDefaultNamespacedKey

            +
            static org.bukkit.NamespacedKey getDefaultNamespacedKey()
            +
            +
            Returns:
            +
            The default namespaced key to use if one is not assigned.
            +
            +
            +
          • +
          • +
            +

            addService

            +
            void addService(IService service)
            +
            +
            Parameters:
            +
            service - Add a service to the pool's service collection.
            +
            +
            +
          • +
          • +
            +

            isValidService

            +
            boolean isValidService(IService service)
            +
            +
            Parameters:
            +
            service - The service to check against this pool.
            +
            Returns:
            +
            Whether the service is registered with this pool.
            +
            +
            +
          • +
          • +
            +

            getAssociatedServices

            +
            @Contract(pure=true) +@NotNull +public @NotNull Set<IService> getAssociatedServices()
            +
            +
            Returns:
            +
            A Set of IService objects which are registered with this pool.
            +
            +
            +
          • +
          • +
            +

            queueService

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<reactor.core.Disposable> queueService(IService service)
            +
            +
            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.
            +
            Returns:
            +
            A Mono object which contains a Disposable element which can be used to destroy the registered service.
            +
            +
            +
          • +
          • +
            +

            startServices

            +
            @NotNull +public @NotNull reactor.core.publisher.Flux<reactor.core.Disposable> startServices()
            +
            +
            Returns:
            +
            A Flux object which contains a collection of Disposable elements, + which can be used to destroy the registered services using stopServices(Flux).
            +
            +
            +
          • +
          • +
            +

            stopServices

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<Void> stopServices(@NotNull + @NotNull reactor.core.publisher.Flux<reactor.core.Disposable> disposableThread)
            +
            +
            Parameters:
            +
            disposableThread - A reactor.core.publisher.Flux<reactor.core.Disposable> which contains all the services that should be disposed..
            +
            Returns:
            +
            A reactor.core.publisher.Mono<Void> object which can be used to stop the services.
            +
            +
            +
          • +
          • +
            +

            stopService

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<Void> stopService(@NotNull + @NotNull org.bukkit.NamespacedKey service_name, + @Nullable + @Nullable reactor.core.publisher.Mono<reactor.core.Disposable> disposable)
            +
            +
            Parameters:
            +
            service_name - The name of the service to stop.
            +
            disposable - A Disposable object which contains the service that should be disposed.
            +
            Returns:
            +
            A reactor.core.publisher.Mono<Void> object which can be used to stop the service.
            +
            +
            +
          • +
          • +
            +

            getService

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<IService> getService(org.bukkit.NamespacedKey service_name)
            +
            +
            Parameters:
            +
            service_name - The name of the service to get.
            +
            Returns:
            +
            A Mono object which contains the service.
            +
            +
            +
          • +
          • +
            +

            removeService

            +
            void removeService(IService service)
            +
            +
            Parameters:
            +
            service - The service to remove from the pool's service collection.
            +
            +
            +
          • +
          • +
            +

            recycle

            +
            @NotNull +public @NotNull reactor.core.publisher.Mono<ServicePool> recycle()
            +
            +
            Returns:
            +
            This service pool after being cleared of all services. + You will need to register services with this pool again before using it.
            +
            +
            +
          • +
          • +
            +

            getScheduler

            +
            @Contract(pure=true) +public reactor.core.scheduler.Scheduler getScheduler()
            +
            +
            Returns:
            +
            The Scheduler which hosts the threads for the service pool.
            +
            +
            +
          • +
          +
          +
        • +
        +
        + +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/package-summary.html b/docs/io/github/simplexdevelopment/scheduler/package-summary.html new file mode 100644 index 0000000..e8bab64 --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/package-summary.html @@ -0,0 +1,96 @@ + + + + +io.github.simplexdevelopment.scheduler + + + + + + + + + + + + + + + +
        + +
        +
        +
        +

        Package io.github.simplexdevelopment.scheduler

        +
        +
        +
        package io.github.simplexdevelopment.scheduler
        +
        + +
        +
        +
        +
        + + diff --git a/docs/io/github/simplexdevelopment/scheduler/package-tree.html b/docs/io/github/simplexdevelopment/scheduler/package-tree.html new file mode 100644 index 0000000..f21567d --- /dev/null +++ b/docs/io/github/simplexdevelopment/scheduler/package-tree.html @@ -0,0 +1,79 @@ + + + + +io.github.simplexdevelopment.scheduler Class Hierarchy + + + + + + + + + + + + + + + +
        + +
        +
        +
        +

        Hierarchy For Package io.github.simplexdevelopment.scheduler

        +Package Hierarchies: + +
        +
        +

        Class Hierarchy

        +
          +
        • java.lang.Object +
            +
          • 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)
          • +
          • io.github.simplexdevelopment.scheduler.ServiceManager
          • +
          • io.github.simplexdevelopment.scheduler.ServicePool
          • +
          +
        • +
        +
        +
        +
        +
        + + diff --git a/docs/member-search-index.js b/docs/member-search-index.js index 1242ee8..12e206d 100644 --- a/docs/member-search-index.js +++ b/docs/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"addService(IService)","u":"addService(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"addToExistingPool(ServicePool, IService...)","u":"addToExistingPool(io.github.simplex.simplexss.ServicePool,io.github.simplex.api.IService...)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"associatedServices"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"cancel()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"cancelled"},{"p":"io.github.simplex.api","c":"Context","l":"contextCollection()"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"createServicePool(NamespacedKey, IService...)","u":"createServicePool(org.bukkit.NamespacedKey,io.github.simplex.api.IService...)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"DEFAULT"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"delay"},{"p":"io.github.simplex.impl","c":"Main","l":"disposables"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"emptyServicePool(NamespacedKey, boolean)","u":"emptyServicePool(org.bukkit.NamespacedKey,boolean)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"ExecutableService(NamespacedKey)","u":"%3Cinit%3E(org.bukkit.NamespacedKey)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey)","u":"%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey, Long)","u":"%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey,java.lang.Long)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean)","u":"%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey,java.lang.Long,java.lang.Long,java.lang.Boolean)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"ExecutableService(ServicePool, NamespacedKey, Long, Long, Boolean, Boolean)","u":"%3Cinit%3E(io.github.simplex.simplexss.ServicePool,org.bukkit.NamespacedKey,java.lang.Long,java.lang.Long,java.lang.Boolean,java.lang.Boolean)"},{"p":"io.github.simplex.api","c":"Context","l":"fluxFromCollection()"},{"p":"io.github.simplex.api","c":"ISchedule","l":"forceStart(IService)","u":"forceStart(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"forceStart(IService)","u":"forceStart(io.github.simplex.api.IService)"},{"p":"io.github.simplex.api","c":"ISchedule","l":"forceStop(IService)","u":"forceStop(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"forceStop(IService)","u":"forceStop(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"getAssociatedServicePool(IService)","u":"getAssociatedServicePool(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"getAssociatedServices()"},{"p":"io.github.simplex.api","c":"Context","l":"getContext()"},{"p":"io.github.simplex.api","c":"IService","l":"getDefaultNamespacedKey()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"getDefaultNamespacedKey()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"getDelay()"},{"p":"io.github.simplex.api","c":"IService","l":"getDelay()"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"getMainSchedulerThread()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"getNamespacedKey()"},{"p":"io.github.simplex.api","c":"IService","l":"getNamespacedKey()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"getParentPool()"},{"p":"io.github.simplex.api","c":"IService","l":"getParentPool()"},{"p":"io.github.simplex.impl","c":"ServiceImpl","l":"getParentPool()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"getPeriod()"},{"p":"io.github.simplex.api","c":"IService","l":"getPeriod()"},{"p":"io.github.simplex.api","c":"IService","l":"getPlugin()"},{"p":"io.github.simplex.impl","c":"ServiceImpl","l":"getPlugin()"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"getProvidingPlugin()"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"getRepeatingPools()"},{"p":"io.github.simplex.impl","c":"Main","l":"getScheduler()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"getScheduler()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"getService(NamespacedKey)","u":"getService(org.bukkit.NamespacedKey)"},{"p":"io.github.simplex.api","c":"ISchedule","l":"getServiceManager()"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"getServiceManager()"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"getServicePools()"},{"p":"io.github.simplex.api","c":"InvalidServiceException","l":"InvalidServiceException(IService)","u":"%3Cinit%3E(io.github.simplex.api.IService)"},{"p":"io.github.simplex.api","c":"InvalidServiceException","l":"InvalidServiceException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"io.github.simplex.api","c":"InvalidServicePoolException","l":"InvalidServicePoolException()","u":"%3Cinit%3E()"},{"p":"io.github.simplex.api","c":"InvalidServicePoolException","l":"InvalidServicePoolException(Throwable)","u":"%3Cinit%3E(java.lang.Throwable)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"isCancelled()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"isPeriodic()"},{"p":"io.github.simplex.api","c":"IService","l":"isPeriodic()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"isValidService(IService)","u":"isValidService(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"locateServiceWithinPools(IService)","u":"locateServiceWithinPools(io.github.simplex.api.IService)"},{"p":"io.github.simplex.impl","c":"Main","l":"Main()","u":"%3Cinit%3E()"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"mainScheduler"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"mayInterruptWhenRunning"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"multithreadedServicePool(NamespacedKey, IService...)","u":"multithreadedServicePool(org.bukkit.NamespacedKey,io.github.simplex.api.IService...)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"name"},{"p":"io.github.simplex.api","c":"IService","l":"newNamespacedKey(String, String)","u":"newNamespacedKey(java.lang.String,java.lang.String)"},{"p":"io.github.simplex.impl","c":"Main","l":"onDisable()"},{"p":"io.github.simplex.impl","c":"Main","l":"onEnable()"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"parentPool"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"period"},{"p":"io.github.simplex.impl","c":"ServiceImpl","l":"plugin"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"plugin"},{"p":"io.github.simplex.impl","c":"Main","l":"pool"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"queue(IService)","u":"queue(io.github.simplex.api.IService)"},{"p":"io.github.simplex.api","c":"ISchedule","l":"queue(IService)","u":"queue(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"queueService(NamespacedKey)","u":"queueService(org.bukkit.NamespacedKey)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"recycle()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"removeService(IService)","u":"removeService(io.github.simplex.api.IService)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"repeating"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"repeatingPools"},{"p":"io.github.simplex.api","c":"IService","l":"run()"},{"p":"io.github.simplex.api","c":"ISchedule","l":"runOnce(IService)","u":"runOnce(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"runOnce(IService)","u":"runOnce(io.github.simplex.api.IService)"},{"p":"io.github.simplex.impl","c":"Main","l":"scheduler"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"scheduler"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"SchedulingSystem(ServiceManager, T)","u":"%3Cinit%3E(io.github.simplex.simplexss.ServiceManager,T)"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"service_name"},{"p":"io.github.simplex.impl","c":"ServiceImpl","l":"ServiceImpl(Main)","u":"%3Cinit%3E(io.github.simplex.impl.Main)"},{"p":"io.github.simplex.simplexss","c":"SchedulingSystem","l":"serviceManager"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"ServiceManager()","u":"%3Cinit%3E()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"ServicePool(NamespacedKey, boolean)","u":"%3Cinit%3E(org.bukkit.NamespacedKey,boolean)"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"servicePools"},{"p":"io.github.simplex.api","c":"ExecutableService","l":"setCancelled(boolean)"},{"p":"io.github.simplex.api","c":"Context","l":"setContext(S)"},{"p":"io.github.simplex.api","c":"IService","l":"start()"},{"p":"io.github.simplex.impl","c":"ServiceImpl","l":"start()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"startServices()"},{"p":"io.github.simplex.api","c":"IService","l":"stop()"},{"p":"io.github.simplex.impl","c":"ServiceImpl","l":"stop()"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"stopService(NamespacedKey, Mono)","u":"stopService(org.bukkit.NamespacedKey,reactor.core.publisher.Mono)"},{"p":"io.github.simplex.simplexss","c":"ServicePool","l":"stopServices(Flux)","u":"stopServices(reactor.core.publisher.Flux)"},{"p":"io.github.simplex.api","c":"InvalidServicePoolException","l":"supplyException()"},{"p":"io.github.simplex.api","c":"InvalidServiceException","l":"supplyException(IService)","u":"supplyException(io.github.simplex.api.IService)"},{"p":"io.github.simplex.simplexss","c":"ServiceManager","l":"takeFromExistingPool(ServicePool, IService...)","u":"takeFromExistingPool(io.github.simplex.simplexss.ServicePool,io.github.simplex.api.IService...)"}];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.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 diff --git a/docs/overview-summary.html b/docs/overview-summary.html index 244c0ea..f6dc9a5 100644 --- a/docs/overview-summary.html +++ b/docs/overview-summary.html @@ -1,11 +1,11 @@ - + Generated Documentation (Untitled) - + diff --git a/docs/overview-tree.html b/docs/overview-tree.html index 4c1e915..ed5f22b 100644 --- a/docs/overview-tree.html +++ b/docs/overview-tree.html @@ -1,11 +1,11 @@ - + Class Hierarchy - + @@ -51,9 +51,9 @@ loadScripts(document, 'script');

        Hierarchy For All Packages

        Package Hierarchies:
      @@ -61,31 +61,37 @@ loadScripts(document, 'script');
      • java.lang.Object
          -
        • io.github.simplex.api.ExecutableService (implements io.github.simplex.api.IService) +
        • io.github.simplexdevelopment.api.ExecutableService (implements io.github.simplexdevelopment.api.IService)
        • org.bukkit.plugin.PluginBase (implements org.bukkit.plugin.Plugin)
          • org.bukkit.plugin.java.JavaPlugin
              -
            • io.github.simplex.impl.Main
            • +
            • io.github.simplexdevelopment.impl.Main
        • -
        • io.github.simplex.simplexss.SchedulingSystem<T> (implements io.github.simplex.api.ISchedule)
        • -
        • io.github.simplex.simplexss.ServiceManager
        • -
        • io.github.simplex.simplexss.ServicePool
        • +
        • 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)
        • +
        • io.github.simplexdevelopment.scheduler.ServiceManager
        • +
        • io.github.simplexdevelopment.scheduler.ServicePool
        • java.lang.Throwable (implements java.io.Serializable)
          • java.lang.Exception @@ -99,11 +105,11 @@ loadScripts(document, 'script');

            Interface Hierarchy

            diff --git a/docs/package-search-index.js b/docs/package-search-index.js index f0590e9..e0ef01c 100644 --- a/docs/package-search-index.js +++ b/docs/package-search-index.js @@ -1 +1 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"io.github.simplex.api"},{"l":"io.github.simplex.impl"},{"l":"io.github.simplex.simplexss"}];updateSearchResults(); \ No newline at end of file +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"io.github.simplexdevelopment.api"},{"l":"io.github.simplexdevelopment.impl"},{"l":"io.github.simplexdevelopment.scheduler"}];updateSearchResults(); \ No newline at end of file diff --git a/docs/serialized-form.html b/docs/serialized-form.html index 2ac593d..b6e0548 100644 --- a/docs/serialized-form.html +++ b/docs/serialized-form.html @@ -1,11 +1,11 @@ - + Serialized Form - + @@ -53,17 +53,17 @@ loadScripts(document, 'script');
            • -

              Package io.github.simplex.api

              +

              Package io.github.simplexdevelopment.api

              • -
                -

                Exception io.github.simplex.api.InvalidServiceException

                +
                +

                Exception io.github.simplexdevelopment.api.InvalidServiceException

                class InvalidServiceException extends RuntimeException implements Serializable
              • -
                -

                Exception io.github.simplex.api.InvalidServicePoolException

                +
                +

                Exception io.github.simplexdevelopment.api.InvalidServicePoolException

                class InvalidServicePoolException extends RuntimeException implements Serializable
              • diff --git a/docs/type-search-index.js b/docs/type-search-index.js index eea9ac5..fba3818 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.simplex.api","l":"Context"},{"p":"io.github.simplex.api","l":"ExecutableService"},{"p":"io.github.simplex.api","l":"InvalidServiceException"},{"p":"io.github.simplex.api","l":"InvalidServicePoolException"},{"p":"io.github.simplex.api","l":"ISchedule"},{"p":"io.github.simplex.api","l":"IService"},{"p":"io.github.simplex.impl","l":"Main"},{"p":"io.github.simplex.simplexss","l":"SchedulingSystem"},{"p":"io.github.simplex.impl","l":"ServiceImpl"},{"p":"io.github.simplex.simplexss","l":"ServiceManager"},{"p":"io.github.simplex.simplexss","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.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 diff --git a/src/main/java/io/github/simplex/api/Context.java b/src/main/java/io/github/simplexdevelopment/api/Context.java similarity index 95% rename from src/main/java/io/github/simplex/api/Context.java rename to src/main/java/io/github/simplexdevelopment/api/Context.java index 8b1a023..2c0becd 100644 --- a/src/main/java/io/github/simplex/api/Context.java +++ b/src/main/java/io/github/simplexdevelopment/api/Context.java @@ -1,4 +1,4 @@ -package io.github.simplex.api; +package io.github.simplexdevelopment.api; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/src/main/java/io/github/simplex/api/ExecutableService.java b/src/main/java/io/github/simplexdevelopment/api/ExecutableService.java similarity index 98% rename from src/main/java/io/github/simplex/api/ExecutableService.java rename to src/main/java/io/github/simplexdevelopment/api/ExecutableService.java index 8b30ea2..8999d20 100644 --- a/src/main/java/io/github/simplex/api/ExecutableService.java +++ b/src/main/java/io/github/simplexdevelopment/api/ExecutableService.java @@ -1,6 +1,6 @@ -package io.github.simplex.api; +package io.github.simplexdevelopment.api; -import io.github.simplex.simplexss.ServicePool; +import io.github.simplexdevelopment.scheduler.ServicePool; import org.bukkit.NamespacedKey; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/io/github/simplex/api/ISchedule.java b/src/main/java/io/github/simplexdevelopment/api/ISchedule.java similarity index 88% rename from src/main/java/io/github/simplex/api/ISchedule.java rename to src/main/java/io/github/simplexdevelopment/api/ISchedule.java index 355824d..c5e5545 100644 --- a/src/main/java/io/github/simplex/api/ISchedule.java +++ b/src/main/java/io/github/simplexdevelopment/api/ISchedule.java @@ -1,7 +1,7 @@ -package io.github.simplex.api; +package io.github.simplexdevelopment.api; -import io.github.simplex.simplexss.ServiceManager; -import io.github.simplex.simplexss.ServicePool; +import io.github.simplexdevelopment.scheduler.ServiceManager; +import io.github.simplexdevelopment.scheduler.ServicePool; import reactor.core.publisher.Mono; public interface ISchedule { diff --git a/src/main/java/io/github/simplex/api/IService.java b/src/main/java/io/github/simplexdevelopment/api/IService.java similarity index 96% rename from src/main/java/io/github/simplex/api/IService.java rename to src/main/java/io/github/simplexdevelopment/api/IService.java index 97af0a1..e900228 100644 --- a/src/main/java/io/github/simplex/api/IService.java +++ b/src/main/java/io/github/simplexdevelopment/api/IService.java @@ -1,6 +1,6 @@ -package io.github.simplex.api; +package io.github.simplexdevelopment.api; -import io.github.simplex.simplexss.ServicePool; +import io.github.simplexdevelopment.scheduler.ServicePool; import org.bukkit.NamespacedKey; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/io/github/simplex/api/InvalidServiceException.java b/src/main/java/io/github/simplexdevelopment/api/InvalidServiceException.java similarity index 92% rename from src/main/java/io/github/simplex/api/InvalidServiceException.java rename to src/main/java/io/github/simplexdevelopment/api/InvalidServiceException.java index 157dcc8..7306a85 100644 --- a/src/main/java/io/github/simplex/api/InvalidServiceException.java +++ b/src/main/java/io/github/simplexdevelopment/api/InvalidServiceException.java @@ -1,4 +1,4 @@ -package io.github.simplex.api; +package io.github.simplexdevelopment.api; import java.util.function.Supplier; diff --git a/src/main/java/io/github/simplex/api/InvalidServicePoolException.java b/src/main/java/io/github/simplexdevelopment/api/InvalidServicePoolException.java similarity index 81% rename from src/main/java/io/github/simplex/api/InvalidServicePoolException.java rename to src/main/java/io/github/simplexdevelopment/api/InvalidServicePoolException.java index a73616c..3ac425c 100644 --- a/src/main/java/io/github/simplex/api/InvalidServicePoolException.java +++ b/src/main/java/io/github/simplexdevelopment/api/InvalidServicePoolException.java @@ -1,4 +1,4 @@ -package io.github.simplex.api; +package io.github.simplexdevelopment.api; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -10,6 +10,10 @@ public class InvalidServicePoolException extends RuntimeException { 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); } diff --git a/src/main/java/io/github/simplex/impl/Main.java b/src/main/java/io/github/simplexdevelopment/impl/Main.java similarity index 68% rename from src/main/java/io/github/simplex/impl/Main.java rename to src/main/java/io/github/simplexdevelopment/impl/Main.java index dc8a4c4..d618d7a 100644 --- a/src/main/java/io/github/simplex/impl/Main.java +++ b/src/main/java/io/github/simplexdevelopment/impl/Main.java @@ -1,9 +1,9 @@ -package io.github.simplex.impl; +package io.github.simplexdevelopment.impl; -import io.github.simplex.api.IService; -import io.github.simplex.simplexss.SchedulingSystem; -import io.github.simplex.simplexss.ServiceManager; -import io.github.simplex.simplexss.ServicePool; +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 reactor.core.Disposable; import reactor.core.publisher.Flux; @@ -17,8 +17,7 @@ public class Main extends JavaPlugin { @Override public void onEnable() { - ServiceManager serviceManager = new ServiceManager(); - this.scheduler = new SchedulingSystem<>(serviceManager, this); + this.scheduler = new SchedulingSystem<>(this); IService service = new ServiceImpl(this); service.getParentPool().subscribe(element -> disposables = element.startServices()); } @@ -28,7 +27,6 @@ public class Main extends JavaPlugin { scheduler.getServiceManager().subscribe(manager -> { manager.getServicePools().doOnEach(signal -> Objects.requireNonNull(signal.get()) .stopServices(disposables) - .subscribeOn(scheduler.getMainSchedulerThread()) .subscribe()); }); } diff --git a/src/main/java/io/github/simplex/impl/ServiceImpl.java b/src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java similarity index 84% rename from src/main/java/io/github/simplex/impl/ServiceImpl.java rename to src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java index a4a597f..781a293 100644 --- a/src/main/java/io/github/simplex/impl/ServiceImpl.java +++ b/src/main/java/io/github/simplexdevelopment/impl/ServiceImpl.java @@ -1,8 +1,8 @@ -package io.github.simplex.impl; +package io.github.simplexdevelopment.impl; -import io.github.simplex.api.ExecutableService; -import io.github.simplex.api.IService; -import io.github.simplex.simplexss.ServicePool; +import io.github.simplexdevelopment.api.ExecutableService; +import io.github.simplexdevelopment.api.IService; +import io.github.simplexdevelopment.scheduler.ServicePool; import org.bukkit.plugin.java.JavaPlugin; import reactor.core.publisher.Mono; diff --git a/src/main/java/io/github/simplexdevelopment/scheduler/BukkitDisposable.java b/src/main/java/io/github/simplexdevelopment/scheduler/BukkitDisposable.java new file mode 100644 index 0000000..5ee9bbb --- /dev/null +++ b/src/main/java/io/github/simplexdevelopment/scheduler/BukkitDisposable.java @@ -0,0 +1,24 @@ +package io.github.simplexdevelopment.scheduler; + +import org.bukkit.scheduler.BukkitTask; +import reactor.core.Disposable; + +public record BukkitDisposable(BukkitTask task) implements Disposable { + /** + * Disposes of the task upstream on the Bukkit scheduler. + */ + @Override + public void dispose() { + task.cancel(); + } + + /** + * Checks if the task is cancelled. + * + * @return true if the task is cancelled, false otherwise. + */ + @Override + public boolean isDisposed() { + return task.isCancelled(); + } +} diff --git a/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java b/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java new file mode 100644 index 0000000..eda8f56 --- /dev/null +++ b/src/main/java/io/github/simplexdevelopment/scheduler/ReactorBukkitScheduler.java @@ -0,0 +1,77 @@ +package io.github.simplexdevelopment.scheduler; + +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scheduler.BukkitScheduler; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import reactor.core.Disposable; +import reactor.core.scheduler.Scheduler; + +import java.util.concurrent.TimeUnit; + +public record ReactorBukkitScheduler(JavaPlugin plugin, BukkitScheduler scheduler) + implements Scheduler, Scheduler.Worker { + + /** + * Delegates to the {@link BukkitScheduler}. + * + * @param task The task to delegate. + * @return A disposable that can be used to cancel the task. + */ + @Override + public @NotNull Disposable schedule(@NotNull Runnable task) { + return new BukkitDisposable(scheduler.runTask(plugin, task)); + } + + /** + * Delegates to the {@link BukkitScheduler} with a delay. + * + * @param task The task to delegate + * @param delay The amount of time to wait before running the task + * @param unit Unused parameter in this implementation. + * Regardless of what value you use, this parameter will never be called. + * @return A disposable that can be used to cancel the task. + */ + @Override + public @NotNull Disposable schedule(@NotNull Runnable task, long delay, @Nullable TimeUnit unit) { + return new BukkitDisposable(scheduler.runTaskLater(plugin, task, delay)); + } + + /** + * Delegates to the {@link BukkitScheduler} with a delay and a period. + * The initial delay may be 0L, but the period must be greater than 0L. + * + * @param task The task to delegate. + * @param initialDelay The amount of time to wait before running the task. + * @param period The amount of time to wait between each execution of the task. + * @param unit Unused parameter in this implementation. + * Regardless of what value you use, this parameter will never be called. + * @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) { + if (period <= 0L) { + throw new IllegalArgumentException("Period must be greater than 0L"); + } + + return new BukkitDisposable(scheduler.runTaskTimer(plugin, task, initialDelay, period)); + } + + /** + * A new {@link Scheduler.Worker}. + * + * @return This class instance, as it implements {@link Scheduler.Worker}. + */ + @Override + public @NotNull Worker createWorker() { + return this; + } + + /** + * This method does nothing and is unused. + */ + @Override + public void dispose() { + + } +} diff --git a/src/main/java/io/github/simplex/simplexss/SchedulingSystem.java b/src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java similarity index 82% rename from src/main/java/io/github/simplex/simplexss/SchedulingSystem.java rename to src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java index 6ce84d6..debe445 100644 --- a/src/main/java/io/github/simplex/simplexss/SchedulingSystem.java +++ b/src/main/java/io/github/simplexdevelopment/scheduler/SchedulingSystem.java @@ -1,8 +1,9 @@ -package io.github.simplex.simplexss; +package io.github.simplexdevelopment.scheduler; -import io.github.simplex.api.ISchedule; -import io.github.simplex.api.IService; +import io.github.simplexdevelopment.api.ISchedule; +import io.github.simplexdevelopment.api.IService; import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scheduler.BukkitScheduler; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import reactor.core.publisher.Mono; @@ -17,19 +18,18 @@ public final class SchedulingSystem implements ISchedule { private final ServiceManager serviceManager; private final T plugin; private final Set repeatingPools; - private final Scheduler mainScheduler; + private final ReactorBukkitScheduler mainScheduler; /** * Creates a new instance of the scheduling system. This is used to manage the scheduling of services. * - * @param serviceManager The service manager to use for this scheduling system. * @param plugin The plugin to use for this scheduling system. This should be an instance of your plugin. */ - public SchedulingSystem(@NotNull ServiceManager serviceManager, T plugin) { - this.serviceManager = serviceManager; + public SchedulingSystem(T plugin) { + this.serviceManager = new ServiceManager(); this.plugin = plugin; this.repeatingPools = new HashSet<>(); - this.mainScheduler = Schedulers.boundedElastic(); + this.mainScheduler = new ReactorBukkitScheduler(plugin, plugin.getServer().getScheduler()); } /** @@ -84,7 +84,7 @@ public final class SchedulingSystem implements ISchedule { * @return The main thread which the scheduling system operates on. */ @Contract(pure = true) - public Scheduler getMainSchedulerThread() { + public ReactorBukkitScheduler getMainScheduler() { return mainScheduler; } } diff --git a/src/main/java/io/github/simplex/simplexss/ServiceManager.java b/src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java similarity index 98% rename from src/main/java/io/github/simplex/simplexss/ServiceManager.java rename to src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java index bff0c5b..5533ef0 100644 --- a/src/main/java/io/github/simplex/simplexss/ServiceManager.java +++ b/src/main/java/io/github/simplexdevelopment/scheduler/ServiceManager.java @@ -1,6 +1,6 @@ -package io.github.simplex.simplexss; +package io.github.simplexdevelopment.scheduler; -import io.github.simplex.api.IService; +import io.github.simplexdevelopment.api.IService; import org.bukkit.NamespacedKey; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/io/github/simplex/simplexss/ServicePool.java b/src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java similarity index 62% rename from src/main/java/io/github/simplex/simplexss/ServicePool.java rename to src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java index d9e2332..190b2bf 100644 --- a/src/main/java/io/github/simplex/simplexss/ServicePool.java +++ b/src/main/java/io/github/simplexdevelopment/scheduler/ServicePool.java @@ -1,7 +1,9 @@ -package io.github.simplex.simplexss; +package io.github.simplexdevelopment.scheduler; -import io.github.simplex.api.IService; +import io.github.simplexdevelopment.api.IService; +import io.github.simplexdevelopment.api.InvalidServicePoolException; import org.bukkit.NamespacedKey; +import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -13,10 +15,13 @@ import reactor.core.scheduler.Schedulers; import java.util.HashSet; import java.util.Set; -import java.util.concurrent.Executors; 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. + */ + private static final NamespacedKey DEFAULT = new NamespacedKey("simplex_ss", "default_service_pool"); /** * A collection of services related to this service pool. */ @@ -29,23 +34,37 @@ public final class ServicePool { * The key used to identify this service pool. */ private final NamespacedKey name; - /** - * The default {@link NamespacedKey} 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 final ReactorBukkitScheduler rbScheduler; /** - * @param name The name of this service pool. + * This will create a new instance of a Service Pool with a {@link Scheduler} as its main scheduler. + * This should be used if you'd like to execute tasks without communicating on the main server thread. + * + * @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) { this.name = name; this.associatedServices = new HashSet<>(); if (multithreaded) { - this.scheduler = Schedulers.newBoundedElastic(4, 10, ""); + this.scheduler = Schedulers.boundedElastic(); } else { - this.scheduler = Schedulers.fromExecutorService(Executors.newSingleThreadExecutor()); + this.scheduler = Schedulers.single(); } + this.rbScheduler = null; + } + + /** + * This will create a new instance of a Service Pool with the {@link ReactorBukkitScheduler} as its main scheduler. + * This should be used if you'd like to execute tasks while communicating on the main server thread. + * + * @param name The name of this service pool. + */ + public ServicePool(NamespacedKey name, JavaPlugin plugin) { + this.name = name; + this.associatedServices = new HashSet<>(); + this.scheduler = null; + this.rbScheduler = new ReactorBukkitScheduler(plugin, plugin.getServer().getScheduler()); } /** @@ -80,48 +99,52 @@ public final class ServicePool { } /** - * @param service_name The name of the service to queue. This should be a service that is located within this service pool. + * @param 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. * @return A {@link Mono} object which contains a {@link Disposable} element which can be used to destroy the registered service. */ - public @NotNull Mono queueService(NamespacedKey service_name) { - Mono service = getService(service_name); - return service.map(s -> { + public @NotNull Mono queueService(IService service) { + return Mono.just(service).map(s -> { if (s.isPeriodic()) { - return scheduler.schedulePeriodically(s, - s.getDelay() * 50, - s.getPeriod() * 50, - TimeUnit.MILLISECONDS); + if (scheduler != null) { + return scheduler.schedulePeriodically(s, + s.getDelay() * 50, + s.getPeriod() * 50, + TimeUnit.MILLISECONDS); + } else if (rbScheduler != null) { + return rbScheduler.schedulePeriodically(s, + s.getDelay() * 50, + s.getPeriod() * 50, + TimeUnit.MILLISECONDS); + } else { + throw new InvalidServicePoolException("Service pool is not initialized properly."); + } + } else { + if (scheduler != null) { + return scheduler.schedule(s, + s.getDelay() * 50, + TimeUnit.MILLISECONDS); + } else if (rbScheduler != null) { + return rbScheduler.schedule(s, + s.getDelay() * 50, + TimeUnit.MILLISECONDS); + } else { + throw new InvalidServicePoolException("Service pool is not initialized properly."); + } } - return scheduler.schedule(s, - s.getDelay() * 50, - TimeUnit.MILLISECONDS); - }); } /** * @return A {@link Flux} object which contains a collection of {@link Disposable} elements, - * which can be used to destroy the registered services using {@link ServicePool#stopServices(Flux)}. + * which can be used to destroy the registered services using {@link ServicePool#stopServices(Flux)}. */ public @NotNull Flux startServices() { - return Mono.just(getAssociatedServices()).flatMapMany(services -> { - Set disposables = new HashSet<>(); - for (IService service : services) { - if (service.isPeriodic()) { - disposables.add(scheduler.schedulePeriodically(service, - service.getDelay() * 50, - service.getPeriod() * 50, - TimeUnit.MILLISECONDS)); - } else { - disposables.add(scheduler.schedule(service, - service.getDelay() * 50, - TimeUnit.MILLISECONDS)); - } - } - return Flux.fromIterable(disposables); - }); + Set disposables = new HashSet<>(); + return Flux.fromIterable(getAssociatedServices()) + .doOnEach(service -> disposables.add(queueService(service.get()).block())) + .flatMap(service -> Flux.fromIterable(disposables)); } /** @@ -135,7 +158,7 @@ public final class ServicePool { /** * @param service_name The name of the service to stop. - * @param disposable A {@link Disposable} object which contains the service that should be disposed. + * @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) {