Tabnine Logo
UniqueEntryStoreStrategy.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/jackrabbit-oak

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

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

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

private static Iterable<String> queryUnique(Filter filter, String indexName, NodeState propIndexRootNode,
                      String propIdxNodeName, Set<String> values) {
  UniqueEntryStoreStrategy s = new UniqueEntryStoreStrategy(propIdxNodeName);
  return s.query(filter, indexName, propIndexRootNode, values);
}
origin: org.apache.jackrabbit/oak-lucene

private static Iterable<String> queryUnique(Filter filter, String indexName, NodeState propIndexRootNode,
                      String propIdxNodeName, Set<String> values) {
  UniqueEntryStoreStrategy s = new UniqueEntryStoreStrategy(propIdxNodeName);
  return s.query(filter, indexName, propIndexRootNode, values);
}
origin: apache/jackrabbit-oak

  private StrategyWrapper getWrapper(Entry<Mount, NodeState> indexEntry, String indexName, Context ctx) {
    NodeState indexNode = indexEntry.getValue();
    Mount mount = indexEntry.getKey();
    MountedNodeStore mountedNodeStore = ctx.mountedNodeStoresByName.get(mount.getName());
    
    UniqueEntryStoreStrategy strategy = mount.isDefault() ? new UniqueEntryStoreStrategy() : 
      new UniqueEntryStoreStrategy(Multiplexers.getNodeForMount(mount, INDEX_CONTENT_NODE_NAME));
    
    return new StrategyWrapper(strategy, indexNode.getChildNode(indexName), indexName, mountedNodeStore);
  }
}
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-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

UniqueEntryStoreStrategy s = new UniqueEntryStoreStrategy(INDEX_CONTENT_NODE_NAME,
    (nb) -> nb.setProperty(PROP_CREATED, updateTime));
s.update(ofInstance(indexNode),
origin: org.apache.jackrabbit/oak-lucene

UniqueEntryStoreStrategy s = new UniqueEntryStoreStrategy(INDEX_CONTENT_NODE_NAME,
    (nb) -> nb.setProperty(PROP_CREATED, updateTime));
s.update(ofInstance(indexNode),
origin: apache/jackrabbit-oak

  @Test
  public void callbackInvoked() throws Exception{
    AtomicBoolean callbackInvoked = new AtomicBoolean();
    store = new UniqueEntryStoreStrategy(INDEX_CONTENT_NODE_NAME, (nb) -> callbackInvoked.set(true));

    indexName = "foo";

    NodeState root = EMPTY_NODE;
    indexMeta = root.builder();
    Supplier<NodeBuilder> index = memoize(() -> indexMeta.child(INDEX_CONTENT_NODE_NAME));
    store.update(index, "/some/node1", null, null, EMPTY, newHashSet("key1"));

    assertTrue(callbackInvoked.get());
  }
}
origin: apache/jackrabbit-oak

@Before
public void fillIndex() throws Exception {
  
  store = new UniqueEntryStoreStrategy();
  
  indexName = "foo";
  
  NodeState root = EMPTY_NODE;
  indexMeta = root.builder();
  Supplier<NodeBuilder> index = memoize(() -> indexMeta.child(INDEX_CONTENT_NODE_NAME));
  store.update(index, "/some/node1", null, null, EMPTY, newHashSet("key1"));
  store.update(index, "/some/node2", null, null, EMPTY, newHashSet("key2"));
}
org.apache.jackrabbit.oak.plugins.index.property.strategyUniqueEntryStoreStrategy<init>

Popular methods of UniqueEntryStoreStrategy

  • count
  • getIndexNodeName
  • insert
  • query0
  • queryEntries
    Search for a given set of values, returning IndexEntry results
  • remove
  • update
  • query

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • getApplicationContext (Context)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • JList (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 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