test_class.declarator: EMPTY = newHashSet()
test_class.modifier: private static final
test_class.original_string: private static final Set<String> EMPTY = newHashSet();
test_class.type: Set<String>
test_class.var_name: EMPTY
test_class.declarator: KEY = newHashSet("key")
test_class.modifier: private static final
test_class.original_string: private static final Set<String> KEY = newHashSet("key");
test_class.type: Set<String>
test_class.var_name: KEY
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategyTest.java
test_class.identifier: ContentMirrorStoreStrategyTest
test_case.body: @Test
      public void testIndexCountersUsageWithoutPathRestriction() {
          final long approxNodeCount = 50;
          final long approxKeyCount = 25;
          final long entryCount = 30 * DEFAULT_RESOLUTION;
          final long keyCount = 75;
          final int maxTraversal = 200;
          final String keyValue = KEY.iterator().next();
          final String approxPropName = COUNT_PROPERTY_PREFIX + "gen_uuid";
  
          IndexStoreStrategy store = new ContentMirrorStoreStrategy();
          NodeState root = EMPTY_NODE;
          NodeBuilder indexMeta = root.builder();
          NodeBuilder index = indexMeta.child(INDEX_CONTENT_NODE_NAME);
          NodeBuilder key = index.child(keyValue);
  
          // is-not-null query without entryCount
          index.setProperty(approxPropName, approxNodeCount, Type.LONG);
          Assert.assertEquals("Approximate count not used for is-not-null query",
                  approxNodeCount, store.count(root, indexMeta.getNodeState(),
                          null, maxTraversal));
  
          // prop=value query without entryCount
          key.setProperty(approxPropName, approxKeyCount, Type.LONG);
          Assert.assertEquals("Approximate count not used for key=value query",
                  approxKeyCount, store.count(root, indexMeta.getNodeState(),
                          KEY, maxTraversal));
  
          // is-not-null query with entryCount
          indexMeta
                  .setProperty(ENTRY_COUNT_PROPERTY_NAME, entryCount, Type.LONG);
          Assert.assertEquals(
                  "Entry count not used even when present for is-not-null query",
                  entryCount, store.count(root, indexMeta.getNodeState(), null,
                          maxTraversal));
  
          // prop=value query with entryCount but without keyCount
          Assert.assertTrue("Rough key count not considered for key=value query",
                  entryCount > store.count(root, indexMeta.getNodeState(), KEY,
                          maxTraversal));
  
          // prop=value query with entryCount and keyCount
          indexMeta.setProperty(KEY_COUNT_PROPERTY_NAME, keyCount, Type.LONG);
          Assert.assertTrue("Key count not considered for key=value query",
                  entryCount > store.count(root, indexMeta.getNodeState(), KEY,
                          maxTraversal));
  
          // is-not-null query with entryCount=-1 (this should lead to traversal
          // and hence should result in '0'
          indexMeta.setProperty(ENTRY_COUNT_PROPERTY_NAME, (long) -1, Type.LONG);
          Assert.assertEquals(
                  "Entry count not used even when present for is-not-null query",
                  0, store.count(root, indexMeta.getNodeState(), null,
                          maxTraversal));
      }
test_case.class_method_signature: ContentMirrorStoreStrategyTest.testIndexCountersUsageWithoutPathRestriction()
test_case.full_signature: @Test public void testIndexCountersUsageWithoutPathRestriction()
test_case.identifier: testIndexCountersUsageWithoutPathRestriction
test_case.invocations: next iterator builder child child setProperty assertEquals count getNodeState setProperty assertEquals count getNodeState setProperty assertEquals count getNodeState assertTrue count getNodeState setProperty assertTrue count getNodeState setProperty assertEquals count getNodeState
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIndexCountersUsageWithoutPathRestriction()
focal_class.declarator: LOG = LoggerFactory.getLogger(ContentMirrorStoreStrategy.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger LOG = LoggerFactory.getLogger(ContentMirrorStoreStrategy.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: TRAVERSING_WARN = Integer.getInteger("oak.traversing.warn", 10000)
focal_class.modifier: public static final
focal_class.original_string: public static final int TRAVERSING_WARN = Integer.getInteger("oak.traversing.warn", 10000);
focal_class.type: int
focal_class.var_name: TRAVERSING_WARN
focal_class.declarator: indexName
focal_class.modifier: private final
focal_class.original_string: private final String indexName;
focal_class.type: String
focal_class.var_name: indexName
focal_class.declarator: pathPrefix
focal_class.modifier: private final
focal_class.original_string: private final String pathPrefix;
focal_class.type: String
focal_class.var_name: pathPrefix
focal_class.declarator: prependPathPrefix
focal_class.modifier: private final
focal_class.original_string: private final boolean prependPathPrefix;
focal_class.type: boolean
focal_class.var_name: prependPathPrefix
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategy.java
focal_class.identifier: ContentMirrorStoreStrategy
focal_class.interfaces: implements IndexStoreStrategy
focal_class.class_method_signature: ContentMirrorStoreStrategy.ContentMirrorStoreStrategy()
focal_class.full_signature: public  ContentMirrorStoreStrategy()
focal_class.identifier: ContentMirrorStoreStrategy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ContentMirrorStoreStrategy()
focal_class.class_method_signature: ContentMirrorStoreStrategy.ContentMirrorStoreStrategy(String indexName)
focal_class.full_signature: public  ContentMirrorStoreStrategy(String indexName)
focal_class.identifier: ContentMirrorStoreStrategy
focal_class.modifiers: public
focal_class.parameters: (String indexName)
focal_class.signature:  ContentMirrorStoreStrategy(String indexName)
focal_class.class_method_signature: ContentMirrorStoreStrategy.ContentMirrorStoreStrategy(String indexName, String pathPrefix, boolean prependPathPrefix)
focal_class.full_signature: public  ContentMirrorStoreStrategy(String indexName, String pathPrefix, boolean prependPathPrefix)
focal_class.identifier: ContentMirrorStoreStrategy
focal_class.modifiers: public
focal_class.parameters: (String indexName, String pathPrefix, boolean prependPathPrefix)
focal_class.signature:  ContentMirrorStoreStrategy(String indexName, String pathPrefix, boolean prependPathPrefix)
focal_class.class_method_signature: ContentMirrorStoreStrategy.update(
              Supplier<NodeBuilder> index, String path,
              @Nullable final String indexName,
              @Nullable final NodeBuilder indexMeta,
              Set<String> beforeKeys, Set<String> afterKeys)
focal_class.full_signature: @Override public void update(
              Supplier<NodeBuilder> index, String path,
              @Nullable final String indexName,
              @Nullable final NodeBuilder indexMeta,
              Set<String> beforeKeys, Set<String> afterKeys)
focal_class.identifier: update
focal_class.modifiers: @Override public
focal_class.parameters: (
              Supplier<NodeBuilder> index, String path,
              @Nullable final String indexName,
              @Nullable final NodeBuilder indexMeta,
              Set<String> beforeKeys, Set<String> afterKeys)
focal_class.return: void
focal_class.signature: void update(
              Supplier<NodeBuilder> index, String path,
              @Nullable final String indexName,
              @Nullable final NodeBuilder indexMeta,
              Set<String> beforeKeys, Set<String> afterKeys)
focal_class.class_method_signature: ContentMirrorStoreStrategy.remove(NodeBuilder index, String key, String value)
focal_class.full_signature: private void remove(NodeBuilder index, String key, String value)
focal_class.identifier: remove
focal_class.modifiers: private
focal_class.parameters: (NodeBuilder index, String key, String value)
focal_class.return: void
focal_class.signature: void remove(NodeBuilder index, String key, String value)
focal_class.class_method_signature: ContentMirrorStoreStrategy.insert(NodeBuilder index, String key, String value)
focal_class.full_signature: private void insert(NodeBuilder index, String key, String value)
focal_class.identifier: insert
focal_class.modifiers: private
focal_class.parameters: (NodeBuilder index, String key, String value)
focal_class.return: void
focal_class.signature: void insert(NodeBuilder index, String key, String value)
focal_class.class_method_signature: ContentMirrorStoreStrategy.query(final Filter filter, final String indexName,
              final NodeState indexMeta, final String indexStorageNodeName,
              final Iterable<String> values)
focal_class.full_signature: public Iterable<String> query(final Filter filter, final String indexName,
              final NodeState indexMeta, final String indexStorageNodeName,
              final Iterable<String> values)
focal_class.identifier: query
focal_class.modifiers: public
focal_class.parameters: (final Filter filter, final String indexName,
              final NodeState indexMeta, final String indexStorageNodeName,
              final Iterable<String> values)
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> query(final Filter filter, final String indexName,
              final NodeState indexMeta, final String indexStorageNodeName,
              final Iterable<String> values)
focal_class.class_method_signature: ContentMirrorStoreStrategy.getChildNodeEntries(@NotNull
      final NodeState index)
focal_class.full_signature: @NotNull Iterable<? extends ChildNodeEntry> getChildNodeEntries(@NotNull
      final NodeState index)
focal_class.identifier: getChildNodeEntries
focal_class.modifiers: @NotNull
focal_class.parameters: (@NotNull
      final NodeState index)
focal_class.return: Iterable<? extends ChildNodeEntry>
focal_class.signature: Iterable<? extends ChildNodeEntry> getChildNodeEntries(@NotNull
      final NodeState index)
focal_class.class_method_signature: ContentMirrorStoreStrategy.query(final Filter filter, final String name,
              final NodeState indexMeta, final Iterable<String> values)
focal_class.full_signature: @Override public Iterable<String> query(final Filter filter, final String name,
              final NodeState indexMeta, final Iterable<String> values)
focal_class.identifier: query
focal_class.modifiers: @Override public
focal_class.parameters: (final Filter filter, final String name,
              final NodeState indexMeta, final Iterable<String> values)
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> query(final Filter filter, final String name,
              final NodeState indexMeta, final Iterable<String> values)
focal_class.class_method_signature: ContentMirrorStoreStrategy.count(NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.full_signature: @Override public long count(NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.identifier: count
focal_class.modifiers: @Override public
focal_class.parameters: (NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.return: long
focal_class.signature: long count(NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.class_method_signature: ContentMirrorStoreStrategy.count(final Filter filter, NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.full_signature: @Override public long count(final Filter filter, NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.identifier: count
focal_class.modifiers: @Override public
focal_class.parameters: (final Filter filter, NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.return: long
focal_class.signature: long count(final Filter filter, NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_class.class_method_signature: ContentMirrorStoreStrategy.count(Filter filter, NodeState root, NodeState indexMeta, final String indexStorageNodeName,
              Set<String> values, int max)
focal_class.full_signature:  long count(Filter filter, NodeState root, NodeState indexMeta, final String indexStorageNodeName,
              Set<String> values, int max)
focal_class.identifier: count
focal_class.parameters: (Filter filter, NodeState root, NodeState indexMeta, final String indexStorageNodeName,
              Set<String> values, int max)
focal_class.return: long
focal_class.signature: long count(Filter filter, NodeState root, NodeState indexMeta, final String indexStorageNodeName,
              Set<String> values, int max)
focal_class.class_method_signature: ContentMirrorStoreStrategy.fetchKeyNode(@NotNull NodeBuilder index, 
                               @NotNull String key)
focal_class.full_signature:  NodeBuilder fetchKeyNode(@NotNull NodeBuilder index, 
                               @NotNull String key)
focal_class.identifier: fetchKeyNode
focal_class.parameters: (@NotNull NodeBuilder index, 
                               @NotNull String key)
focal_class.return: NodeBuilder
focal_class.signature: NodeBuilder fetchKeyNode(@NotNull NodeBuilder index, 
                               @NotNull String key)
focal_class.class_method_signature: ContentMirrorStoreStrategy.prune(final NodeBuilder index, final Deque<NodeBuilder> builders, final String key)
focal_class.full_signature:  void prune(final NodeBuilder index, final Deque<NodeBuilder> builders, final String key)
focal_class.identifier: prune
focal_class.parameters: (final NodeBuilder index, final Deque<NodeBuilder> builders, final String key)
focal_class.return: void
focal_class.signature: void prune(final NodeBuilder index, final Deque<NodeBuilder> builders, final String key)
focal_class.class_method_signature: ContentMirrorStoreStrategy.exists(Supplier<NodeBuilder> index, String key)
focal_class.full_signature: @Override public boolean exists(Supplier<NodeBuilder> index, String key)
focal_class.identifier: exists
focal_class.modifiers: @Override public
focal_class.parameters: (Supplier<NodeBuilder> index, String key)
focal_class.return: boolean
focal_class.signature: boolean exists(Supplier<NodeBuilder> index, String key)
focal_class.class_method_signature: ContentMirrorStoreStrategy.getIndexNodeName()
focal_class.full_signature: @Override public String getIndexNodeName()
focal_class.identifier: getIndexNodeName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIndexNodeName()
focal_method.body: @Override
      public long count(NodeState root, NodeState indexMeta, Set<String> values, int max) {
          return count(null, root, indexMeta, this.indexName, values, max);
      }
focal_method.class_method_signature: ContentMirrorStoreStrategy.count(NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_method.full_signature: @Override public long count(NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_method.identifier: count
focal_method.invocations: count
focal_method.modifiers: @Override public
focal_method.parameters: (NodeState root, NodeState indexMeta, Set<String> values, int max)
focal_method.return: long
focal_method.signature: long count(NodeState root, NodeState indexMeta, Set<String> values, int max)