public class ThreadingManager
extends java.lang.Object
ThreadingManager
manages the threads used to load content
within the Content Manager system. A pool of threads and a task queue
is used to load resource data and perform I/O while the application's
render thread is active.Modifier and Type | Class and Description |
---|---|
protected class |
ThreadingManager.LoadingTask<T> |
protected class |
ThreadingManager.LoadingThreadFactory |
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ExecutorService |
executor |
protected int |
nextThreadId |
protected AssetManager |
owner |
Constructor and Description |
---|
ThreadingManager(AssetManager owner) |
Modifier and Type | Method and Description |
---|---|
static boolean |
isLoadingThread() |
<T> java.util.concurrent.Future<T> |
loadAsset(AssetKey<T> assetKey) |
protected final java.util.concurrent.ExecutorService executor
protected final AssetManager owner
protected int nextThreadId
public ThreadingManager(AssetManager owner)
public <T> java.util.concurrent.Future<T> loadAsset(AssetKey<T> assetKey)
public static boolean isLoadingThread()