Author: shawkins
Date: 2011-04-06 14:00:20 -0400 (Wed, 06 Apr 2011)
New Revision: 3067
Modified:
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
Log:
TEIID-1489 updating the fix to reuse the metadata caches
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2011-04-05
19:07:59 UTC (rev 3066)
+++
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2011-04-06
18:00:20 UTC (rev 3067)
@@ -134,10 +134,10 @@
/*
* TODO: move caching to jboss cache structure
*/
- private final Map<String, Object> metadataCache =
Collections.synchronizedMap(new LRUCache<String, Object>(250));
- private final Map<String, Object> groupInfoCache =
Collections.synchronizedMap(new LRUCache<String, Object>(250));
- private final Map<String, Collection<Table>> partialNameToFullNameCache =
Collections.synchronizedMap(new LRUCache<String, Collection<Table>>(1000));
- private final Map<String, Collection<StoredProcedureInfo>> procedureCache
= Collections.synchronizedMap(new LRUCache<String,
Collection<StoredProcedureInfo>>(200));
+ private Map<String, Object> metadataCache = Collections.synchronizedMap(new
LRUCache<String, Object>(250));
+ private Map<String, Object> groupInfoCache = Collections.synchronizedMap(new
LRUCache<String, Object>(250));
+ private Map<String, Collection<Table>> partialNameToFullNameCache =
Collections.synchronizedMap(new LRUCache<String, Collection<Table>>(1000));
+ private Map<String, Collection<StoredProcedureInfo>> procedureCache =
Collections.synchronizedMap(new LRUCache<String,
Collection<StoredProcedureInfo>>(200));
/**
* TransformationMetadata constructor
* @param context Object containing the info needed to lookup metadta.
@@ -1076,6 +1076,11 @@
@Override
public QueryMetadataInterface getDesignTimeMetadata() {
- return new TransformationMetadata(store, functionLibrary);
+ TransformationMetadata tm = new TransformationMetadata(store, functionLibrary);
+ tm.groupInfoCache = this.groupInfoCache;
+ tm.metadataCache = this.metadataCache;
+ tm.partialNameToFullNameCache = this.partialNameToFullNameCache;
+ tm.procedureCache = this.procedureCache;
+ return tm;
}
}
\ No newline at end of file
Show replies by date