Package org.pentaho.di.base
Interface IMetaFileCache
- 
- All Known Implementing Classes:
- MetaFileCacheImpl
 
 public interface IMetaFileCacheThis cache lives for the runtime of the parent Job or Trans. It is used to cache the JobMeta or TransMeta of any kjb or ktr that it needs to load to the course of the main job/trans execution. The intent here is to minimize the overhead of loading and parsing the jobs/transformations into their associated metas. Loading a ktr/kjb will require a call to the server if attached. If that kjb/ktr is called multiple times during the run, then each execution will again make the call to get the meta. This cache eliminates the need to repetitively load the kjb/ktr.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcacheMeta(String key, JobMeta meta)voidcacheMeta(String key, TransMeta meta)JobMetagetCachedJobMeta(String key)TransMetagetCachedTransMeta(String key)default StringgetKey(org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod, String realFilenameOrId)Keys to the cache should always be generated using a method provided by this interface.static IMetaFileCacheinitialize(Job parentJob, org.pentaho.di.core.logging.LogChannelInterface logger)Each new job/transformation should call this method once to get the instance of the cache for the currently running job.static IMetaFileCacheinitialize(Trans parentTrans, org.pentaho.di.core.logging.LogChannelInterface logger)Each new transformation should call this method once to get the instance of the cache for the currently running parent transformation/job.voidlogCacheSummary(org.pentaho.di.core.logging.LogChannelInterface logger)static voidsetCacheInstance(JobMeta jobMeta, IMetaFileCache cache)static voidsetCacheInstance(TransMeta transMeta, IMetaFileCache cache)
 
- 
- 
- 
Method Detail- 
initializestatic IMetaFileCache initialize(Job parentJob, org.pentaho.di.core.logging.LogChannelInterface logger) Each new job/transformation should call this method once to get the instance of the cache for the currently running job. This instance should then be passed to the new job's/transformation's meta by callingsetCacheInstance(org.pentaho.di.job.JobMeta, org.pentaho.di.base.IMetaFileCache)after the Meta has been created. ThereAfter the cache can be referenced throughAbstractMeta.getMetaFileCache()- Parameters:
- parentJob- The parent job, or null if none.
- Returns:
- the IMetaFileCache in play
 
 - 
initializestatic IMetaFileCache initialize(Trans parentTrans, org.pentaho.di.core.logging.LogChannelInterface logger) Each new transformation should call this method once to get the instance of the cache for the currently running parent transformation/job. This instance should then be passed to the new job's/transformation's meta by callingsetCacheInstance(org.pentaho.di.job.JobMeta, org.pentaho.di.base.IMetaFileCache)after the Meta has been created. ThereAfter the cache can be referenced throughAbstractMeta.getMetaFileCache()- Parameters:
- parentTrans- The parent job, or null if none.
- Returns:
- the IMetaFileCache in play
 
 - 
setCacheInstancestatic void setCacheInstance(JobMeta jobMeta, IMetaFileCache cache) 
 - 
setCacheInstancestatic void setCacheInstance(TransMeta transMeta, IMetaFileCache cache) 
 - 
logCacheSummaryvoid logCacheSummary(org.pentaho.di.core.logging.LogChannelInterface logger) 
 - 
getKeydefault String getKey(org.pentaho.di.core.ObjectLocationSpecificationMethod specificationMethod, String realFilenameOrId) Keys to the cache should always be generated using a method provided by this interface. This ensures that keys will remain unique across different nameSpace catagories.- Parameters:
- specificationMethod- Defines different sources for the Meta defined by the- ObjectLocationSpecificationMethodenum.
- realFilenameOrId- Contains the full file path or jackrabbit Id for the node
- Returns:
- The key to use to load or save an item to the cache.
 
 
- 
 
-