congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IndexEntry
Code IndexAdd Tabnine to your IDE (free)

How to use
IndexEntry
in
org.apache.jackrabbit.oak.plugins.index.property.strategy

Best Java code snippets using org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexEntry (Showing top 6 results out of 315)

origin: apache/jackrabbit-oak

  @Override
  public IndexEntry produce(NodeState indexHit, String pathName) {
    PropertyState s = indexHit.getProperty("entry");
    return new IndexEntry(s.getValue(Type.STRING, 0), pathName);
  }
});
origin: apache/jackrabbit-oak

private void check(Entry<Mount, NodeState> indexEntry, Entry<Mount, NodeState> indexEntry2, Context ctx, ErrorHolder errorHolder) {
  String indexName = rootIndexDef.getName();
  
  // optimisation: sort strategies to ensuer that we query all the entries from the mount and check them
  // against the default. this way we'll run a significantly smaller number of checks. The assumption is
  // that the non-default mount will always hold a larger number of entries
  TreeSet<StrategyWrapper> wrappers = new TreeSet<>();
  wrappers.add(getWrapper(indexEntry, indexName, ctx));
  wrappers.add(getWrapper(indexEntry2, indexName, ctx));
  
  StrategyWrapper wrapper = wrappers.first();
  StrategyWrapper wrapper2 = wrappers.last();
  
  LOG.info("Checking index definitions for {} between mounts {} and {}", indexName, wrapper.mount.getName(), wrapper2.mount.getName());
  
  for ( IndexEntry hit : wrapper.queryAll() ) {
    Optional<IndexEntry> result = wrapper2.queryOne(hit.getPropertyValue());
    if ( result.isPresent() ) {
      IndexEntry hit2 = result.get();
      if ( reportedConflictingValues.add(hit.getPropertyValue())) {
        errorHolder.report(wrapper.nodeStore, hit.getPath(), wrapper2.nodeStore, hit2.getPath(), 
            hit.getPropertyValue(), "duplicate unique index entry");
      }
    }
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

  @Override
  public IndexEntry produce(NodeState indexHit, String pathName) {
    PropertyState s = indexHit.getProperty("entry");
    return new IndexEntry(s.getValue(Type.STRING, 0), pathName);
  }
});
origin: org.apache.jackrabbit/oak-core

  @Override
  public IndexEntry produce(NodeState indexHit, String pathName) {
    PropertyState s = indexHit.getProperty("entry");
    return new IndexEntry(s.getValue(Type.STRING, 0), pathName);
  }
});
origin: apache/jackrabbit-oak

@Test
public void queryEntries_All() {
  
  Iterable<IndexEntry> hits = store.queryEntries(FilterImpl.newTestInstance(), indexName, indexMeta.getNodeState(), null);
  
  assertThat(hits, containsInAnyOrder(new IndexEntry("/some/node1", "key1"), new IndexEntry("/some/node2", "key2")));
}

origin: apache/jackrabbit-oak

@Test
public void queryEntries_some() {
  Iterable<IndexEntry> hits = store.queryEntries(FilterImpl.newTestInstance(), indexName, indexMeta.getNodeState(), Arrays.asList("key1"));
  
  assertThat(hits, containsInAnyOrder(new IndexEntry("/some/node1", "key1")));
}

org.apache.jackrabbit.oak.plugins.index.property.strategyIndexEntry

Javadoc

An entry in the index

Most used methods

  • <init>
  • getPath
  • getPropertyValue

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Best IntelliJ plugins
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