|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.util.GameTaskQueue
public class GameTaskQueue
GameTaskQueue is a simple queueing system to enqueue tasks
that need to be accomplished in the OpenGL thread and get back a Future
object to be able to retrieve a return from the Callable that was passed
in.
Future,
Callable| Field Summary | |
|---|---|
static java.lang.String |
RENDER
|
static java.lang.String |
UPDATE
|
| Constructor Summary | |
|---|---|
GameTaskQueue()
|
|
| Method Summary | ||
|---|---|---|
|
enqueue(java.util.concurrent.Callable<V> callable)
Adds the Callable to the internal queue to invoked and returns a Future that wraps the return. |
|
void |
execute()
This method should be invoked in the update() or render() method inside the main game to make sure the tasks are invoked in the OpenGL thread. |
|
boolean |
isExecuteAll()
The state of this GameTaskQueue if it
will execute all enqueued Callables on an execute
invokation. |
|
void |
setExecuteAll(boolean executeAll)
Sets the executeAll boolean value to determine if when execute() is invoked if it should simply execute one Callable, or if it should invoke all. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RENDER
public static final java.lang.String UPDATE
| Constructor Detail |
|---|
public GameTaskQueue()
| Method Detail |
|---|
public boolean isExecuteAll()
GameTaskQueue if it
will execute all enqueued Callables on an execute
invokation.
public void setExecuteAll(boolean executeAll)
executeAll - public <V> java.util.concurrent.Future<V> enqueue(java.util.concurrent.Callable<V> callable)
V - callable -
public void execute()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||