test_class.file: imhotep-server/src/test/java/com/indeed/imhotep/service/TestCachedFlamdexReader.java
test_class.identifier: TestCachedFlamdexReader
test_case.body: @Test
      public void testLookupWrap() throws FlamdexOutOfMemoryException {
          final ImhotepMemoryCache<MetricKey, IntValueLookup> cache = new ImhotepMemoryCache<MetricKey, IntValueLookup>();
          FlamdexReader r = new SillyFlamdexReader();
          CachedFlamdexReader cfr = new CachedFlamdexReader(new MemoryReservationContext(new CachedMemoryReserver(new ImhotepMemoryPool(Long.MAX_VALUE), cache)), r, null, "test", "test", cache);
          IntValueLookup l = cfr.getMetric("m1");
          int[] docIds = {0, 2, 4, 9000, Integer.MIN_VALUE};
          long[] values = new long[docIds.length];
          l.lookup(docIds, values, 3);
          assertEquals(Arrays.asList(1L, 9L, 25L, 0L, 0L), Longs.asList(values));
      }
test_case.class_method_signature: TestCachedFlamdexReader.testLookupWrap()
test_case.full_signature: @Test public void testLookupWrap()
test_case.identifier: testLookupWrap
test_case.invocations: getMetric lookup assertEquals asList asList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLookupWrap()
focal_class.declarator: log = Logger.getLogger(CachedFlamdexReader.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = Logger.getLogger(CachedFlamdexReader.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: memory
focal_class.modifier: private final @Nullable
focal_class.original_string: private final @Nullable MemoryReservationContext memory;
focal_class.type: MemoryReservationContext
focal_class.var_name: memory
focal_class.declarator: readLockRef
focal_class.modifier: private final @Nullable
focal_class.original_string: private final @Nullable Closeable readLockRef;
focal_class.type: Closeable
focal_class.var_name: readLockRef
focal_class.declarator: wrapped
focal_class.modifier: private final
focal_class.original_string: private final FlamdexReader wrapped;
focal_class.type: FlamdexReader
focal_class.var_name: wrapped
focal_class.declarator: metricCache
focal_class.modifier: private final
focal_class.original_string: private final MetricCache metricCache;
focal_class.type: MetricCache
focal_class.var_name: metricCache
focal_class.declarator: intDocFreqCache = new ConcurrentHashMap<String, Long>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Long> intDocFreqCache = new ConcurrentHashMap<String, Long>();
focal_class.type: Map<String, Long>
focal_class.var_name: intDocFreqCache
focal_class.declarator: stringDocFreqCache = new ConcurrentHashMap<String, Long>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Long> stringDocFreqCache = new ConcurrentHashMap<String, Long>();
focal_class.type: Map<String, Long>
focal_class.var_name: stringDocFreqCache
focal_class.file: imhotep-server/src/main/java/com/indeed/imhotep/service/CachedFlamdexReader.java
focal_class.identifier: CachedFlamdexReader
focal_class.interfaces: implements FlamdexReader, MetricCache
focal_class.class_method_signature: CachedFlamdexReader.CachedFlamdexReader(final MemoryReservationContext memory,
                                    final FlamdexReader wrapped,
                                    final @Nullable Closeable readLockRef,
                                    final @Nullable String indexName,
                                    final @Nullable String shardName,
                                    final @Nullable ImhotepMemoryCache<MetricKey, IntValueLookup> freeCache)
focal_class.full_signature: public  CachedFlamdexReader(final MemoryReservationContext memory,
                                    final FlamdexReader wrapped,
                                    final @Nullable Closeable readLockRef,
                                    final @Nullable String indexName,
                                    final @Nullable String shardName,
                                    final @Nullable ImhotepMemoryCache<MetricKey, IntValueLookup> freeCache)
focal_class.identifier: CachedFlamdexReader
focal_class.modifiers: public
focal_class.parameters: (final MemoryReservationContext memory,
                                    final FlamdexReader wrapped,
                                    final @Nullable Closeable readLockRef,
                                    final @Nullable String indexName,
                                    final @Nullable String shardName,
                                    final @Nullable ImhotepMemoryCache<MetricKey, IntValueLookup> freeCache)
focal_class.signature:  CachedFlamdexReader(final MemoryReservationContext memory,
                                    final FlamdexReader wrapped,
                                    final @Nullable Closeable readLockRef,
                                    final @Nullable String indexName,
                                    final @Nullable String shardName,
                                    final @Nullable ImhotepMemoryCache<MetricKey, IntValueLookup> freeCache)
focal_class.class_method_signature: CachedFlamdexReader.getIntFields()
focal_class.full_signature: @Override public Collection<String> getIntFields()
focal_class.identifier: getIntFields
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getIntFields()
focal_class.class_method_signature: CachedFlamdexReader.getStringFields()
focal_class.full_signature: @Override public Collection<String> getStringFields()
focal_class.identifier: getStringFields
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getStringFields()
focal_class.class_method_signature: CachedFlamdexReader.getNumDocs()
focal_class.full_signature: @Override public int getNumDocs()
focal_class.identifier: getNumDocs
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumDocs()
focal_class.class_method_signature: CachedFlamdexReader.getDirectory()
focal_class.full_signature: @Override public String getDirectory()
focal_class.identifier: getDirectory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDirectory()
focal_class.class_method_signature: CachedFlamdexReader.getDocIdStream()
focal_class.full_signature: @Override public DocIdStream getDocIdStream()
focal_class.identifier: getDocIdStream
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DocIdStream
focal_class.signature: DocIdStream getDocIdStream()
focal_class.class_method_signature: CachedFlamdexReader.getIntTermIterator(String field)
focal_class.full_signature: @Override public IntTermIterator getIntTermIterator(String field)
focal_class.identifier: getIntTermIterator
focal_class.modifiers: @Override public
focal_class.parameters: (String field)
focal_class.return: IntTermIterator
focal_class.signature: IntTermIterator getIntTermIterator(String field)
focal_class.class_method_signature: CachedFlamdexReader.getStringTermIterator(String field)
focal_class.full_signature: @Override public StringTermIterator getStringTermIterator(String field)
focal_class.identifier: getStringTermIterator
focal_class.modifiers: @Override public
focal_class.parameters: (String field)
focal_class.return: StringTermIterator
focal_class.signature: StringTermIterator getStringTermIterator(String field)
focal_class.class_method_signature: CachedFlamdexReader.getIntTermDocIterator(final String field)
focal_class.full_signature: @Override public IntTermDocIterator getIntTermDocIterator(final String field)
focal_class.identifier: getIntTermDocIterator
focal_class.modifiers: @Override public
focal_class.parameters: (final String field)
focal_class.return: IntTermDocIterator
focal_class.signature: IntTermDocIterator getIntTermDocIterator(final String field)
focal_class.class_method_signature: CachedFlamdexReader.getStringTermDocIterator(final String field)
focal_class.full_signature: @Override public StringTermDocIterator getStringTermDocIterator(final String field)
focal_class.identifier: getStringTermDocIterator
focal_class.modifiers: @Override public
focal_class.parameters: (final String field)
focal_class.return: StringTermDocIterator
focal_class.signature: StringTermDocIterator getStringTermDocIterator(final String field)
focal_class.class_method_signature: CachedFlamdexReader.getIntTotalDocFreq(String field)
focal_class.full_signature: @Override public long getIntTotalDocFreq(String field)
focal_class.identifier: getIntTotalDocFreq
focal_class.modifiers: @Override public
focal_class.parameters: (String field)
focal_class.return: long
focal_class.signature: long getIntTotalDocFreq(String field)
focal_class.class_method_signature: CachedFlamdexReader.getStringTotalDocFreq(String field)
focal_class.full_signature: @Override public long getStringTotalDocFreq(String field)
focal_class.identifier: getStringTotalDocFreq
focal_class.modifiers: @Override public
focal_class.parameters: (String field)
focal_class.return: long
focal_class.signature: long getStringTotalDocFreq(String field)
focal_class.class_method_signature: CachedFlamdexReader.getAvailableMetrics()
focal_class.full_signature: @Override public Collection<String> getAvailableMetrics()
focal_class.identifier: getAvailableMetrics
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getAvailableMetrics()
focal_class.class_method_signature: CachedFlamdexReader.getMetric(String metric)
focal_class.full_signature: @Override public IntValueLookup getMetric(String metric)
focal_class.identifier: getMetric
focal_class.modifiers: @Override public
focal_class.parameters: (String metric)
focal_class.return: IntValueLookup
focal_class.signature: IntValueLookup getMetric(String metric)
focal_class.class_method_signature: CachedFlamdexReader.getStringLookup(final String field)
focal_class.full_signature: public StringValueLookup getStringLookup(final String field)
focal_class.identifier: getStringLookup
focal_class.modifiers: public
focal_class.parameters: (final String field)
focal_class.return: StringValueLookup
focal_class.signature: StringValueLookup getStringLookup(final String field)
focal_class.class_method_signature: CachedFlamdexReader.getMetricDump()
focal_class.full_signature: @Override public List<ImhotepStatusDump.MetricDump> getMetricDump()
focal_class.identifier: getMetricDump
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<ImhotepStatusDump.MetricDump>
focal_class.signature: List<ImhotepStatusDump.MetricDump> getMetricDump()
focal_class.class_method_signature: CachedFlamdexReader.getLoadedMetrics()
focal_class.full_signature: @Override public Set<String> getLoadedMetrics()
focal_class.identifier: getLoadedMetrics
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getLoadedMetrics()
focal_class.class_method_signature: CachedFlamdexReader.memoryRequired(String metric)
focal_class.full_signature: @Override public long memoryRequired(String metric)
focal_class.identifier: memoryRequired
focal_class.modifiers: @Override public
focal_class.parameters: (String metric)
focal_class.return: long
focal_class.signature: long memoryRequired(String metric)
focal_class.class_method_signature: CachedFlamdexReader.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: @Override
      public IntValueLookup getMetric(String metric) throws FlamdexOutOfMemoryException {
          return metricCache.getMetric(metric);
      }
focal_method.class_method_signature: CachedFlamdexReader.getMetric(String metric)
focal_method.full_signature: @Override public IntValueLookup getMetric(String metric)
focal_method.identifier: getMetric
focal_method.invocations: getMetric
focal_method.modifiers: @Override public
focal_method.parameters: (String metric)
focal_method.return: IntValueLookup
focal_method.signature: IntValueLookup getMetric(String metric)