congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ContentMirrorStoreStrategy.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy
constructor

Best Java code snippets using org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy.<init> (Showing top 15 results out of 315)

origin: apache/jackrabbit-oak

private static IndexStoreStrategy newMirrorStrategy(String defaultName) {
  if (INDEX_CONTENT_NODE_NAME.equals(defaultName)) {
    return MIRROR;
  } else {
    return new ContentMirrorStoreStrategy(defaultName);
  }
}
origin: org.apache.jackrabbit/oak-core

private static IndexStoreStrategy newMirrorStrategy(String defaultName) {
  if (INDEX_CONTENT_NODE_NAME.equals(defaultName)) {
    return MIRROR;
  } else {
    return new ContentMirrorStoreStrategy(defaultName);
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

private static IndexStoreStrategy newMirrorStrategy(String defaultName) {
  if (INDEX_CONTENT_NODE_NAME.equals(defaultName)) {
    return MIRROR;
  } else {
    return new ContentMirrorStoreStrategy(defaultName);
  }
}
origin: apache/jackrabbit-oak

  private Iterable<String> queryBucket(Filter filter, String indexName, NodeState propIndexNode,
                     String bucketPropName, Set<String> values) {
    String bucketName = propIndexNode.getString(bucketPropName);
    if (bucketName == null) {
      return Collections.emptyList();
    }

    NodeState bucket = propIndexNode.getChildNode(bucketName);
    if (bucket.getChildNodeCount(1) == 0) {
      return Collections.emptyList();
    }

    ContentMirrorStoreStrategy s = new ContentMirrorStoreStrategy(bucketName, pathPrefix, prependPathPrefix);
    return s.query(filter, indexName, propIndexNode, bucketName, values);
  }
}
origin: apache/jackrabbit-oak

private static IndexStoreStrategy newStrategy(boolean unique,
    boolean defaultMount, String name, Mount m) {
  Predicate<String> filter = newFilter(m);
  boolean readOnly = unique && !m.isDefault() && RO_PRIVATE_UNIQUE_INDEX;
  return unique ? new FilteringIndexStoreStrategy(
      new UniqueEntryStoreStrategy(name), filter, readOnly)
      : new FilteringIndexStoreStrategy(
          new ContentMirrorStoreStrategy(name), filter);
}
origin: org.apache.jackrabbit/oak-lucene

  private Iterable<String> queryBucket(Filter filter, String indexName, NodeState propIndexNode,
                     String bucketPropName, Set<String> values) {
    String bucketName = propIndexNode.getString(bucketPropName);
    if (bucketName == null) {
      return Collections.emptyList();
    }

    NodeState bucket = propIndexNode.getChildNode(bucketName);
    if (bucket.getChildNodeCount(1) == 0) {
      return Collections.emptyList();
    }

    ContentMirrorStoreStrategy s = new ContentMirrorStoreStrategy(bucketName, pathPrefix, prependPathPrefix);
    return s.query(filter, indexName, propIndexNode, bucketName, values);
  }
}
origin: org.apache.jackrabbit/oak-core

private static IndexStoreStrategy newStrategy(boolean unique,
    boolean defaultMount, String name, Mount m) {
  Predicate<String> filter = newFilter(m);
  boolean readOnly = unique && !m.isDefault() && RO_PRIVATE_UNIQUE_INDEX;
  return unique ? new FilteringIndexStoreStrategy(
      new UniqueEntryStoreStrategy(name), filter, readOnly)
      : new FilteringIndexStoreStrategy(
          new ContentMirrorStoreStrategy(name), filter);
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

private static IndexStoreStrategy newStrategy(boolean unique,
    boolean defaultMount, String name, Mount m) {
  Predicate<String> filter = newFilter(m);
  boolean readOnly = unique && !m.isDefault() && RO_PRIVATE_UNIQUE_INDEX;
  return unique ? new FilteringIndexStoreStrategy(
      new UniqueEntryStoreStrategy(name), filter, readOnly)
      : new FilteringIndexStoreStrategy(
          new ContentMirrorStoreStrategy(name), filter);
}
origin: apache/jackrabbit-oak

  uniquenessConstraintValidator.add(propertyRelativePath, afterKeys);
} else {
  ContentMirrorStoreStrategy s = new ContentMirrorStoreStrategy();
  s.update(ofInstance(indexNode),
      nodePath,
origin: org.apache.jackrabbit/oak-lucene

  uniquenessConstraintValidator.add(propertyRelativePath, afterKeys);
} else {
  ContentMirrorStoreStrategy s = new ContentMirrorStoreStrategy();
  s.update(ofInstance(indexNode),
      nodePath,
origin: apache/jackrabbit-oak

@Test
public void testUnique() throws CommitFailedException {
  IndexStoreStrategy store = new ContentMirrorStoreStrategy();
  NodeState root = EMPTY_NODE;
  NodeBuilder indexMeta = root.builder();
  Supplier<NodeBuilder> index = memoize(() -> indexMeta.child(INDEX_CONTENT_NODE_NAME));
  store.update(index, "a", null, null, EMPTY, KEY);
  store.update(index, "b", null, null, EMPTY, KEY);
  Assert.assertTrue(
      "ContentMirrorStoreStrategy should guarantee uniqueness on insert",
      store.count(root, indexMeta.getNodeState(), Collections.singleton("key"), 2) > 1);
}

origin: apache/jackrabbit-oak

@Test
public void nonRootStorage() throws Exception{
  IndexStoreStrategy store = new ContentMirrorStoreStrategy(INDEX_CONTENT_NODE_NAME, "/content", false);
  NodeState root = EMPTY_NODE;
  NodeBuilder builder = root.builder();
  Supplier<NodeBuilder> index = () -> builder;
  for (String path : asList("a", "a/c", "b")) {
    store.update(index, path, null, null, EMPTY, KEY);
  }
  FilterImpl filter = FilterImpl.newTestInstance();
  filter.restrictPath("/content", Filter.PathRestriction.ALL_CHILDREN);
  NodeBuilder indexMeta = EMPTY_NODE.builder();
  indexMeta.setChildNode(INDEX_CONTENT_NODE_NAME, builder.getNodeState());
  Iterable<String> paths = store.query(filter, null, indexMeta.getNodeState(), KEY);
  assertThat(copyOf(paths), containsInAnyOrder("a", "a/c", "b"));
  FilterImpl filter2 = FilterImpl.newTestInstance();
  filter2.restrictPath("/content/a", Filter.PathRestriction.ALL_CHILDREN);
  paths = store.query(filter2, null, indexMeta.getNodeState(), KEY);
  assertThat(copyOf(paths), containsInAnyOrder("a", "a/c"));
  store = new ContentMirrorStoreStrategy(INDEX_CONTENT_NODE_NAME, "/content", true);
  paths = store.query(filter, null, indexMeta.getNodeState(), KEY);
  assertThat(copyOf(paths), containsInAnyOrder("/content/a", "/content/a/c", "/content/b"));
  paths = store.query(filter2, null, indexMeta.getNodeState(), KEY);
  assertThat(copyOf(paths), containsInAnyOrder("/content/a", "/content/a/c"));
}
origin: apache/jackrabbit-oak

final String approxPropName = COUNT_PROPERTY_PREFIX + "gen_uuid";
IndexStoreStrategy store = new ContentMirrorStoreStrategy();
NodeState root = EMPTY_NODE;
NodeBuilder indexMeta = root.builder();
origin: apache/jackrabbit-oak

final String approxPropName = COUNT_PROPERTY_PREFIX + "gen_uuid";
IndexStoreStrategy store = new ContentMirrorStoreStrategy();
NodeBuilder rootBuilder = EMPTY_NODE.builder();
origin: apache/jackrabbit-oak

IndexStoreStrategy store = new ContentMirrorStoreStrategy();
org.apache.jackrabbit.oak.plugins.index.property.strategyContentMirrorStoreStrategy<init>

Javadoc

Constructs a ContentMirrorStoreStrategy

Popular methods of ContentMirrorStoreStrategy

  • query
  • count
  • fetchKeyNode
    fetch from the index the key node
  • getChildNodeEntries
  • insert
  • prune
    Physically prune a list of nodes from the index
  • remove
  • update

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Menu (java.awt)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now