|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jexl2.CacheTest.Task
public abstract static class CacheTest.Task
The base class for MT tests.
| Method Summary | |
|---|---|
abstract Integer |
call()
|
Integer |
runAssign(Object value)
The actual test function; assigns and checks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public abstract Integer call()
throws Exception
call in interface Callable<Integer>Exceptionpublic Integer runAssign(Object value)
The expression will be evaluated against different classes in parallel. This verifies that neither the volatile cache in the AST nor the expression cache in the JEXL engine induce errors.
Using it as a micro benchmark, it shows creating expression as the dominating cost; the expression cache takes care of this. By moving the expression creations out of the main loop, it also shows that the volatile cache speeds things up around 2x.
value - the argument value to control
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||