Class FWSimResourceCache

java.lang.Object
net.simplace.sim.io.FWSimCache
net.simplace.sim.io.resources.FWSimResourceCache
All Implemented Interfaces:
FWSimFieldContainer

public class FWSimResourceCache extends FWSimCache
Cache of the data read by a resource adapter or transformer. For fast access every data line is stored as Object[] (one value per header variable) under its key: the value of the key variable, or a list of values if the resource has several key variables. During the simulation the line matching the current key values is copied into the variable map (fillVarMapFromCache(FWSimVarMap)).

If configured, the cache is also stored as table in an internal database, so it can be used by the DefaultSQLStatementTransformer.

Author:
Andreas Enders
  • Constructor Details

    • FWSimResourceCache

      public FWSimResourceCache(FWSimSession aFwSimSession, LinkedHashMap<String,String> aKeyMap, FWSimInputAdapter aResourceAdapter, String aUniqueID, FWSimInterface.INTERFACE_TYPE aInterfaceType)
      Creates an empty cache for an adapter or transformer; header variables, frequency, name and order number are taken from the adapter.
      Parameters:
      aFwSimSession - the session
      aKeyMap - key variables of the resource
      aResourceAdapter - the adapter or transformer
      aUniqueID - unique id of the cache
      aInterfaceType - type of the interface the data is read from
  • Method Details