|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.util.FunctionCache
Allows to cache softly-referenced Function instances, which
provides automatic removal of unreferenced instances under low memory
conditions. When initialized with a library name, the cache automatically
creates the library instance.
SoftCache| Constructor Summary | |
FunctionCache(Library library)
Creates a cache that uses the passed library instance. |
|
FunctionCache(java.lang.String libraryName)
Creates a cache for the library with the passed name. |
|
| Method Summary | |
Function |
getFunction(java.lang.String name)
Gets a function specified by the name in the cache, or queries the function instance from the associated library, and caches it for subsequent requests. |
void |
getVariable(java.lang.String name,
Parameter variable)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FunctionCache(java.lang.String libraryName)
libraryName - a name of the library.
java.lang.IllegalArgumentException - of the passed value is
null or empty string.public FunctionCache(Library library)
library - a library to be used by the cache.
java.lang.NullPointerException - if the passed library instance is
null.| Method Detail |
public Function getFunction(java.lang.String name)
name - the name of the function to get.
Function instance.
NoSuchFunctionException - if a function is not found in the
associated library.
public void getVariable(java.lang.String name,
Parameter variable)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||