|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.common.core.util.RequestCollapser
public class RequestCollapser
This class is used to collapse multiple requests by simply spawning a thread the first time it receives a request, execute that request in the thread, and once the thread finishes execution it will come back to execute the next request if any. The request collapsing stems from the fact that while the thread is busy executing one request, all the newly posted ones will be ignored except for the most recent.
Constructor Summary | |
---|---|
RequestCollapser()
Constructor for RequestCollapser. |
Method Summary | |
---|---|
protected void |
executeRequest(java.lang.Runnable runnable)
executes the runnable request |
protected java.lang.Runnable |
getRequest()
returns the most recently posted request and nullifies it afterwards so it doesn't return it again if invoked again immedialtely |
void |
postRequest(java.lang.Runnable runnable)
Posts the request from the client to run in the thread at the next possible chance. |
void |
start()
Start this automation object by starting the thread. |
void |
stop()
Stops this automation object by interrupting the thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestCollapser()
Method Detail |
---|
protected void executeRequest(java.lang.Runnable runnable)
runnable
- The request Runnable to executeprotected java.lang.Runnable getRequest()
public void postRequest(java.lang.Runnable runnable)
runnable
- the Runnable request to runpublic void start()
public void stop()
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.