Class LRUNonThreadSafeCompiledScriptCache

java.lang.Object
org.openspaces.remoting.scripting.cache.LRUNonThreadSafeCompiledScriptCache
All Implemented Interfaces:
CompiledScriptCache

public class LRUNonThreadSafeCompiledScriptCache extends Object implements CompiledScriptCache
An LRU cache that can handle compiled scripts that are not thread safe. Non thread safe compiled scripts are scripts that can not be executed by more than one thread at once.

The cache holds a CompiledScriptPool per script name, and allocates a pool when a new one is required. The pool allows to get and put compiled scripts.

Uses a simple LinkedHashMap to implement the LRU.

Author:
kimchy
  • Field Details

  • Constructor Details

    • LRUNonThreadSafeCompiledScriptCache

      public LRUNonThreadSafeCompiledScriptCache()
    • LRUNonThreadSafeCompiledScriptCache

      public LRUNonThreadSafeCompiledScriptCache(int cacheSize)
    • LRUNonThreadSafeCompiledScriptCache

      public LRUNonThreadSafeCompiledScriptCache(int cacheSize, CompiledScriptPoolFactory compiledScriptPoolFactory)
  • Method Details