Class InstanceCache
java.lang.Object
com.beassolution.rule.engine.cache.InstanceCache
Cache for helper class instances.
This class provides a thread-safe cache for storing instantiated helper class objects. The cache improves performance by avoiding repeated instantiation of helper classes during rule execution.
Key features include:
- Thread-safe operations using ConcurrentHashMap
- Helper class instance 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 helper instances from the cache.boolean
Checks if helper instances are cached.Retrieves helper instances from the cache.getAll()
Retrieves all cached helper instances.void
Stores helper instances in the cache.void
Stores multiple helper instance sets in the cache.void
Removes helper instances from the cache.toString()
Returns a string representation of the cache.
-
Constructor Details
-
InstanceCache
public InstanceCache()
-
-
Method Details
-
put
-
putAll
-
get
-
remove
Removes helper instances from the cache.- Parameters:
key
- The helper name to remove
-
clear
public void clear()Clears all helper instances from the cache.This method removes all entries from the cache, typically used during cache synchronization or system reset.
-
getAll
-
contains
Checks if helper instances are cached.- Parameters:
key
- The helper name to check- Returns:
- true if helper instances are cached, false otherwise
-
toString
-