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

How to use
potentialMatchOrdinalIterator
method
in
com.netflix.hollow.core.read.dataaccess.HollowSetTypeDataAccess

Best Java code snippets using com.netflix.hollow.core.read.dataaccess.HollowSetTypeDataAccess.potentialMatchOrdinalIterator (Showing top 4 results out of 315)

origin: Netflix/hollow

public HollowOrdinalIterator potentialMatchOrdinalIterator(int ordinal, int hashCode) {
  return getTypeDataAccess().potentialMatchOrdinalIterator(ordinal, hashCode);
}

origin: Netflix/hollow

@Override
public HollowOrdinalIterator potentialMatchOrdinalIterator(int ordinal, int hashCode) {
  sampler().recordIterator();
  recordStackTrace();
  if(!ordinalIsPresent(ordinal))
    return ((HollowSetTypeDataAccess)dataAccess.getTypeDataAccess(getSchema().getName(), ordinal)).potentialMatchOrdinalIterator(ordinal, hashCode);
  return removedRecords().potentialMatchOrdinalIterator(getMappedOrdinal(ordinal), hashCode);
}
origin: Netflix/hollow

private void assertRecord(HollowDataAccess dataAccess, int ordinal, int... expectedElements) {
  HollowSetTypeDataAccess typeDataAccess = (HollowSetTypeDataAccess)dataAccess.getTypeDataAccess("TestSet");
  test:
  for(int expected : expectedElements) {
    HollowOrdinalIterator iter = typeDataAccess.potentialMatchOrdinalIterator(ordinal, expected);
    int actual = iter.next();
    while(actual != HollowOrdinalIterator.NO_MORE_ORDINALS) {
      if(actual == expected)
        continue test;
      actual = iter.next();
    }
    Assert.fail("Did not find expected element " + expected + " for ordinal " + ordinal);
  }
}
origin: Netflix/hollow

@Override
public boolean contains(HollowSet<T> set, int ordinal, Object o) {
  HollowOrdinalIterator iter;
  
  if(getSchema().getHashKey() != null) {
    iter = dataAccess.ordinalIterator(ordinal);
  } else {
    int hashCode = dataAccess.getDataAccess().getHashCodeFinder().hashCode(o);
    iter = dataAccess.potentialMatchOrdinalIterator(ordinal, hashCode);
  }
  int potentialOrdinal = iter.next();
  while(potentialOrdinal != HollowOrdinalIterator.NO_MORE_ORDINALS) {
    if(set.equalsElement(potentialOrdinal, o))
      return true;
    potentialOrdinal = iter.next();
  }
  return false;
}

com.netflix.hollow.core.read.dataaccessHollowSetTypeDataAccesspotentialMatchOrdinalIterator

Popular methods of HollowSetTypeDataAccess

  • contains
    Generally, the method #findElement(int,Object...) may be more useful.
  • size
  • findElement
    Returns The matching ordinal of the element from the set at the specified ordinal which matches the
  • getDataAccess
  • getSchema
  • ordinalIterator
  • relativeBucketValue

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JLabel (javax.swing)
  • JList (javax.swing)
  • Github Copilot alternatives
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