Get an instance of the current cache implementation
- 引数:
-
| granularityValue | of the parsing |
| maxEntries | to the cache |
| pendingTimeout | before pending query timeout |
- 戻り値:
ResultCache implementation of the AbstractResultCache
- 例外:
-
| InstantiationException | if parsing granularity is not valid |
ResultCacheFactory.java の 52 行で定義されています。00054 {
00055 AbstractResultCache currentRequestCache = null;
00056 switch (granularityValue)
00057 {
00058 case CachingGranularities.TABLE :
00059 currentRequestCache = new ResultCacheTable(maxEntries, pendingTimeout);
00060 break;
00061 case CachingGranularities.DATABASE :
00062 currentRequestCache = new ResultCacheDatabase(maxEntries,
00063 pendingTimeout);
00064 break;
00065 case CachingGranularities.COLUMN :
00066 currentRequestCache = new ResultCacheColumn(maxEntries, pendingTimeout);
00067 break;
00068 case CachingGranularities.COLUMN_UNIQUE :
00069 currentRequestCache = new ResultCacheColumnUnique(maxEntries,
00070 pendingTimeout);
00071 break;
00072 default :
00073 throw new InstantiationException("Invalid Granularity Value");
00074 }
00075 return currentRequestCache;
00076 }
|