public class BlockingQueueCompiledScriptPool extends Object implements CompiledScriptPool
BlockingQueue script pool with a configurable size.
Upon initialization the pool compiles "size" scripts and puts it in the queue.
| Constructor and Description |
|---|
BlockingQueueCompiledScriptPool(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the pool.
|
Object |
get()
Returns a compiled script from the pool.
|
void |
init(LocalScriptExecutor executor,
Script script)
Inits the pool by compiling zero or more scripts.
|
void |
put(Object compiledScript)
Puts back a compiled script to the pool.
|
public void init(LocalScriptExecutor executor, Script script) throws ScriptingException
CompiledScriptPoolAlso, the local executor and the script can be store for later compilatation and shutdowm.
init in interface CompiledScriptPoolexecutor - The local script executor to compile the script and close it.script - The script to compile.ScriptingExceptionpublic Object get() throws ScriptingException
CompiledScriptPoolget in interface CompiledScriptPoolScriptingExceptionpublic void put(Object compiledScript) throws ScriptingException
CompiledScriptPoolput in interface CompiledScriptPoolScriptingExceptionpublic void close()
CompiledScriptPoolclose in interface CompiledScriptPoolCopyright © GigaSpaces.