com.jme.util
Class GameTaskQueueManager
java.lang.Object
com.jme.util.GameTaskQueueManager
public final class GameTaskQueueManager
- extends java.lang.Object
GameTaskQueueManager
is just a simple Singleton class allowing
easy access to task queues.
- Version:
- $Id: GameTaskQueueManager.java 4131 2009-03-19 20:15:28Z blaine.dev $
- Author:
- Joshua Slack
Method Summary |
void |
addQueue(java.lang.String name,
GameTaskQueue queue)
|
static GameTaskQueueManager |
getManager()
|
GameTaskQueue |
getQueue(java.lang.String name)
|
<V> java.util.concurrent.Future<V> |
|
render(java.util.concurrent.Callable<V> callable)
This method adds callable to the queue to be invoked in
the render() method in the OpenGL thread. |
<V> java.util.concurrent.Future<V> |
|
update(java.util.concurrent.Callable<V> callable)
This method adds callable to the queue to be invoked in
the update() method in the OpenGL thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
managedQueues
protected final java.util.concurrent.ConcurrentMap<java.lang.String,GameTaskQueue> managedQueues
getManager
public static GameTaskQueueManager getManager()
addQueue
public void addQueue(java.lang.String name,
GameTaskQueue queue)
getQueue
public GameTaskQueue getQueue(java.lang.String name)
update
public <V> java.util.concurrent.Future<V> update(java.util.concurrent.Callable<V> callable)
- This method adds
callable
to the queue to be invoked in
the update() method in the OpenGL thread. The Future returned may be
utilized to cancel the task or wait for the return object.
- Parameters:
callable
-
- Returns:
- Future
render
public <V> java.util.concurrent.Future<V> render(java.util.concurrent.Callable<V> callable)
- This method adds
callable
to the queue to be invoked in
the render() method in the OpenGL thread. The Future returned may be
utilized to cancel the task or wait for the return object.
- Parameters:
callable
-
- Returns:
- Future