Class StoExCache
- java.lang.Object
-
- de.uka.ipd.sdq.simucomframework.variables.cache.StoExCache
-
public class StoExCache extends Object
A cache for Stoex. This saves the time to parse the stoex again. Caches also theIRandomGenerator
which may contain a fixed seed.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StoExCache(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory)
Only protected because the cost model should have its own instance of the StoExCache so that it can be resetted independently of the main singleton instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StoExCacheEntry
getEntry(String spec)
Get a cached stoex parse tree and visitors.de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory
getProbabilityFunctionFactory()
de.uka.ipd.sdq.probfunction.math.IRandomGenerator
getRandomGenerator()
static void
initialiseStoExCache(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory)
static StoExCache
singleton()
-
-
-
Constructor Detail
-
StoExCache
protected StoExCache(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory)
Only protected because the cost model should have its own instance of the StoExCache so that it can be resetted independently of the main singleton instance.- Parameters:
randomGenerator
-
-
-
Method Detail
-
initialiseStoExCache
public static void initialiseStoExCache(de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory probFunctionFactory)
-
singleton
public static StoExCache singleton()
-
getEntry
public StoExCacheEntry getEntry(String spec)
Get a cached stoex parse tree and visitors. If entry is not in the cache it is created and added automatically.- Parameters:
spec
- The stoex to search for in the cache- Returns:
- The StoExCacheEntry containing the static information on the stoex
-
getRandomGenerator
public de.uka.ipd.sdq.probfunction.math.IRandomGenerator getRandomGenerator()
-
getProbabilityFunctionFactory
public de.uka.ipd.sdq.probfunction.math.IProbabilityFunctionFactory getProbabilityFunctionFactory()
-
-