Klasse ThreadBridge
java.lang.Object
de.delinkedde.areashopreborn.application.ThreadBridge
Bridges asynchronous database stages back to Paper's server thread.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interfaceRepresents a checked server-thread operation.static interfaceRepresents a checked value-producing server-thread operation. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungThreadBridge(org.bukkit.plugin.Plugin plugin) Creates a server-thread bridge. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungrunSync(ThreadBridge.CheckedRunnable runnable) Executes an operation on the server thread.<T> CompletableFuture<T> supplySync(Supplier<T> supplier) Executes a value-producing operation on the server thread.<T> CompletableFuture<T> supplySyncChecked(ThreadBridge.CheckedSupplier<T> supplier) Executes a value-producing operation that may throw a checked exception on the server thread.
-
Konstruktordetails
-
ThreadBridge
public ThreadBridge(org.bukkit.plugin.Plugin plugin) Creates a server-thread bridge.- Parameter:
plugin- scheduler owner
-
-
Methodendetails
-
supplySync
Executes a value-producing operation on the server thread.- Typparameter:
T- result type- Parameter:
supplier- operation requiring the Paper thread- Gibt zurück:
- completion future
-
supplySyncChecked
Executes a value-producing operation that may throw a checked exception on the server thread.- Typparameter:
T- result type- Parameter:
supplier- checked operation- Gibt zurück:
- completion future containing the result or checked failure
-
runSync
Executes an operation on the server thread.- Parameter:
runnable- operation requiring the Paper thread- Gibt zurück:
- completion future
-