com.jme3.asset
Class ThreadingManager

java.lang.Object
  extended by com.jme3.asset.ThreadingManager

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.


Nested Class Summary
protected  class ThreadingManager.LoadingTask<T>
           
protected  class ThreadingManager.LoadingThreadFactory
           
 
Field Summary
protected  java.util.concurrent.ExecutorService executor
           
protected  int nextThreadId
           
protected  AssetManager owner
           
 
Constructor Summary
ThreadingManager(AssetManager owner)
           
 
Method Summary
static boolean isLoadingThread()
           
<T> java.util.concurrent.Future<T>
loadAsset(AssetKey<T> assetKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executor

protected final java.util.concurrent.ExecutorService executor

owner

protected final AssetManager owner

nextThreadId

protected int nextThreadId
Constructor Detail

ThreadingManager

public ThreadingManager(AssetManager owner)
Method Detail

loadAsset

public <T> java.util.concurrent.Future<T> loadAsset(AssetKey<T> assetKey)

isLoadingThread

public static boolean isLoadingThread()