Class BlockingQueueCompiledScriptPool
java.lang.Object
org.openspaces.remoting.scripting.cache.BlockingQueueCompiledScriptPool
- All Implemented Interfaces:
CompiledScriptPool
A
BlockingQueue script pool with a configurable size.
Upon initialization the pool compiles "size" scripts and puts it in the queue.
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BlockingQueueCompiledScriptPool
public BlockingQueueCompiledScriptPool(int size)
-
-
Method Details
-
init
Description copied from interface:CompiledScriptPoolInits the pool by compiling zero or more scripts. This is benefitial when we have a pool and we wish to initialize it with a pre set of compiled scripts.Also, the local executor and the script can be store for later compilatation and shutdowm.
- Specified by:
initin interfaceCompiledScriptPool- Parameters:
executor- The local script executor to compile the script and close it.script- The script to compile.- Throws:
ScriptingException
-
get
Description copied from interface:CompiledScriptPoolReturns a compiled script from the pool.- Specified by:
getin interfaceCompiledScriptPool- Throws:
ScriptingException
-
put
Description copied from interface:CompiledScriptPoolPuts back a compiled script to the pool.- Specified by:
putin interfaceCompiledScriptPool- Throws:
ScriptingException
-
close
public void close()Description copied from interface:CompiledScriptPoolCloses the pool. Note, compiled scripts in the pool should be closed.- Specified by:
closein interfaceCompiledScriptPool
-