|
RuneHive-Game
|
An ExecutorService that waits for all its events to finish executing.
More...
Public Member Functions | |
| boolean | awaitTermination (long timeout, TimeUnit unit) throws InterruptedException |
| void | awaitUntilFinished (long timeout, TimeUnit timeUnit) |
| void | execute (Runnable command) |
| int | getPendingTaskAmount () |
| Gets the number of pending tasks. | |
| boolean | isShutdown () |
| boolean | isTerminated () |
| void | shutdown () |
| List< Runnable > | shutdownNow () |
| Future<?> | submit (Runnable task) |
| void | waitForPendingTasks () throws ExecutionException |
| Waits for pending tasks to complete. | |
Package Functions | |
| public< T > List< Future< T > > | invokeAll (Collection<? extends Callable< T > > tasks) throws InterruptedException |
| public< T > List< Future< T > > | invokeAll (Collection<? extends Callable< T > > tasks, long timeout, TimeUnit unit) throws InterruptedException |
| public< T > T | invokeAny (Collection<? extends Callable< T > > tasks) throws InterruptedException, ExecutionException |
| public< T > T | invokeAny (Collection<? extends Callable< T > > tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException |
| public< T > Future< T > | submit (Callable< T > task) |
| public< T > Future< T > | submit (Runnable task, T result) |
Private Attributes | |
| BlockingQueue< Future<?> > | pendingTasks = new LinkedBlockingQueue<>() |
| A list of pending tasks. | |
| ExecutorService | service = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()) |
| The service backing this service. | |
An ExecutorService that waits for all its events to finish executing.
Definition at line 13 of file StartupService.java.
| boolean com.runehive.game.service.StartupService.awaitTermination | ( | long | timeout, |
| TimeUnit | unit ) throws InterruptedException |
Definition at line 58 of file StartupService.java.
References service.
| void com.runehive.game.service.StartupService.awaitUntilFinished | ( | long | timeout, |
| TimeUnit | timeUnit ) |
Definition at line 40 of file StartupService.java.
References service.
| void com.runehive.game.service.StartupService.execute | ( | Runnable | command | ) |
Definition at line 134 of file StartupService.java.
References service.
| int com.runehive.game.service.StartupService.getPendingTaskAmount | ( | ) |
Gets the number of pending tasks.
Definition at line 53 of file StartupService.java.
References pendingTasks.
|
package |
Definition at line 63 of file StartupService.java.
References pendingTasks, and service.
|
package |
Definition at line 72 of file StartupService.java.
References pendingTasks, and service.
|
package |
Definition at line 82 of file StartupService.java.
References service.
|
package |
Definition at line 87 of file StartupService.java.
References service.
| boolean com.runehive.game.service.StartupService.isShutdown | ( | ) |
Definition at line 93 of file StartupService.java.
References service.
Referenced by waitForPendingTasks().
| boolean com.runehive.game.service.StartupService.isTerminated | ( | ) |
Definition at line 98 of file StartupService.java.
References service.
| void com.runehive.game.service.StartupService.shutdown | ( | ) |
Definition at line 103 of file StartupService.java.
References service.
| List< Runnable > com.runehive.game.service.StartupService.shutdownNow | ( | ) |
Definition at line 108 of file StartupService.java.
References service.
|
package |
Definition at line 113 of file StartupService.java.
References pendingTasks, and service.
| Future<?> com.runehive.game.service.StartupService.submit | ( | Runnable | task | ) |
Definition at line 120 of file StartupService.java.
References pendingTasks, and service.
|
package |
Definition at line 127 of file StartupService.java.
References pendingTasks, and service.
| void com.runehive.game.service.StartupService.waitForPendingTasks | ( | ) | throws ExecutionException |
Waits for pending tasks to complete.
| ExecutionException | if an error in a task occurred. |
Definition at line 27 of file StartupService.java.
References isShutdown(), and pendingTasks.
|
private |
A list of pending tasks.
Definition at line 19 of file StartupService.java.
Referenced by getPendingTaskAmount(), invokeAll(), invokeAll(), submit(), submit(), submit(), and waitForPendingTasks().
|
private |
The service backing this service.
Definition at line 16 of file StartupService.java.
Referenced by awaitTermination(), awaitUntilFinished(), execute(), invokeAll(), invokeAll(), invokeAny(), invokeAny(), isShutdown(), isTerminated(), shutdown(), shutdownNow(), submit(), submit(), and submit().