public class AsyncReloader<S> extends java.lang.Object implements IAsyncReloader
Modifier and Type | Class and Description |
---|---|
static interface |
AsyncReloader.IStateFactory<S> |
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.CompletableFuture<Unit> |
allAsyncCompleted |
protected IResourceManager |
resourceManager |
protected java.util.concurrent.CompletableFuture<java.util.List<S>> |
resultListFuture |
Modifier | Constructor and Description |
---|---|
protected |
AsyncReloader(java.util.concurrent.Executor backgroundExecutor,
java.util.concurrent.Executor gameExecutor,
IResourceManager resourceManager,
java.util.List<IFutureReloadListener> listeners,
AsyncReloader.IStateFactory<S> stateFactory,
java.util.concurrent.CompletableFuture<Unit> alsoWaitedFor) |
Modifier and Type | Method and Description |
---|---|
boolean |
asyncPartDone() |
static AsyncReloader<java.lang.Void> |
create(IResourceManager resourceManager,
java.util.List<IFutureReloadListener> listeners,
java.util.concurrent.Executor backgroundExecutor,
java.util.concurrent.Executor gameExecutor,
java.util.concurrent.CompletableFuture<Unit> alsoWaitedFor) |
float |
estimateExecutionSpeed() |
boolean |
fullyDone() |
void |
join() |
java.util.concurrent.CompletableFuture<Unit> |
onceDone() |
protected final IResourceManager resourceManager
protected final java.util.concurrent.CompletableFuture<Unit> allAsyncCompleted
protected final java.util.concurrent.CompletableFuture<java.util.List<S>> resultListFuture
protected AsyncReloader(java.util.concurrent.Executor backgroundExecutor, java.util.concurrent.Executor gameExecutor, IResourceManager resourceManager, java.util.List<IFutureReloadListener> listeners, AsyncReloader.IStateFactory<S> stateFactory, java.util.concurrent.CompletableFuture<Unit> alsoWaitedFor)
public static AsyncReloader<java.lang.Void> create(IResourceManager resourceManager, java.util.List<IFutureReloadListener> listeners, java.util.concurrent.Executor backgroundExecutor, java.util.concurrent.Executor gameExecutor, java.util.concurrent.CompletableFuture<Unit> alsoWaitedFor)
public java.util.concurrent.CompletableFuture<Unit> onceDone()
onceDone
in interface IAsyncReloader
public float estimateExecutionSpeed()
estimateExecutionSpeed
in interface IAsyncReloader
public boolean asyncPartDone()
asyncPartDone
in interface IAsyncReloader
public boolean fullyDone()
fullyDone
in interface IAsyncReloader
public void join()
join
in interface IAsyncReloader