com.jme.util
Class GameTaskQueueManager

java.lang.Object
  extended by 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

Field Summary
protected  java.util.concurrent.ConcurrentMap<java.lang.String,GameTaskQueue> managedQueues
           
 
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
 

Field Detail

managedQueues

protected final java.util.concurrent.ConcurrentMap<java.lang.String,GameTaskQueue> managedQueues
Method Detail

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