Class VariableCache
java.lang.Object
com.beassolution.rule.engine.cache.VariableCache
Cache for rule variables and context.
This class provides a thread-safe cache for storing variables and context data that are used during rule execution in the Beas Rule Engine. The cache stores rule-specific variables that are made available during MVEL expression evaluation.
Key features include:
- Thread-safe operations using ConcurrentHashMap
- Rule-specific variable 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 rule variables from the cache.boolean
Checks if variables for a rule are cached.Retrieves variables for a rule from the cache.getAll()
Retrieves all cached rule variables.void
Stores variables for a rule in the cache.void
Stores multiple rule variable sets in the cache.void
Removes variables for a rule from the cache.toString()
Returns a string representation of the cache.
-
Constructor Details
-
VariableCache
public VariableCache()
-
-
Method Details
-
put
-
putAll
-
get
-
remove
Removes variables for a rule from the cache.- Parameters:
key
- The rule name to remove
-
clear
public void clear()Clears all rule variables from the cache.This method removes all entries from the cache, typically used during cache synchronization or system reset.
-
getAll
-
contains
Checks if variables for a rule are cached.- Parameters:
key
- The rule name to check- Returns:
- true if variables are cached, false otherwise
-
toString
-