Package com.ericlam.mc.eld.services
Interface ScheduleService.BukkitPromise<E>
- Type Parameters:
E- 回傳數值
- Enclosing interface:
- ScheduleService
public static interface ScheduleService.BukkitPromise<E>
鏈式的計時及數值提取器 (bukkit promise)
-
Method Summary
Modifier and TypeMethodDescriptionblock()阻塞啟動voidjoin()啟動voidjoinWithCatch(Consumer<Throwable> handler) 啟動並手動處理錯誤(如有)thenApplyAsync(ChainCallable<E, R> function) 異步運行並傳遞數值thenApplySync(ChainCallable<E, R> function) 同步運行並傳遞數值thenRunAsync(Consumer<E> function) 異步運行thenRunSync(Consumer<E> function) 同步運行
-
Method Details
-
thenApplySync
同步運行並傳遞數值- Type Parameters:
R- 新的回傳數值- Parameters:
function- 運行- Returns:
- this
-
thenRunSync
同步運行- Parameters:
function- 運行- Returns:
- 沒有傳遞數值的 bukkit promise
-
thenApplyAsync
異步運行並傳遞數值- Type Parameters:
R- 新的回傳數值- Parameters:
function- 運行- Returns:
- this
-
thenRunAsync
異步運行- Parameters:
function- 運行- Returns:
- 沒有傳遞數值的 bukkit promise
-
join
void join()啟動 -
block
阻塞啟動- Returns:
- 回傳數值
- Throws:
Throwable- 阻塞時可能出現的錯誤
-
joinWithCatch
啟動並手動處理錯誤(如有)- Parameters:
handler- 錯誤處理
-