Class FunctionCache
java.lang.Object
com.beassolution.rule.engine.cache.FunctionCache
Cache for function library code.
This class provides a thread-safe cache for storing MVEL function code from function libraries. The cache improves performance by avoiding repeated loading of function code during rule compilation.
Key features include:
- Thread-safe operations using ConcurrentHashMap
- MVEL function code storage
- Bulk operations support
- Cache management operations
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Beas Solution Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears all function codes from the cache.boolean
Checks if function code is cached.Retrieves function code from the cache.getAll()
Retrieves all cached function codes.void
Stores function code in the cache.void
Stores multiple function codes in the cache.void
Removes function code from the cache.toString()
Returns a string representation of the cache.
-
Constructor Details
-
FunctionCache
public FunctionCache()
-
-
Method Details
-
put
-
putAll
-
get
-
remove
Removes function code from the cache.- Parameters:
key
- The function library name to remove
-
clear
public void clear()Clears all function codes from the cache.This method removes all entries from the cache, typically used during cache synchronization or system reset.
-
getAll
-
contains
Checks if function code is cached.- Parameters:
key
- The function library name to check- Returns:
- true if the function code is cached, false otherwise
-
toString
-