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

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

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

origin: Netflix/hollow

@Override
public HollowRecord instantiateElement(int elementOrdinal) {
  return GenericHollowRecordHelper.instantiate(getTypeDataAccess().getDataAccess(), getSchema().getElementType(), elementOrdinal);
}
origin: Netflix/hollow

@Override
public boolean contains(HollowSet<T> set, int ordinal, Object o) {
  if(getSchema().getHashKey() != null) {
    for(int i=0;i<ordinals.length;i++) {
      if(ordinals[i] != -1 && set.equalsElement(ordinals[i], o))
        return true;
    }
  } else {
    int hashCode = dataAccess.getDataAccess().getHashCodeFinder().hashCode(o);

    int bucket = HashCodes.hashInt(hashCode) & hashMask;

    while(ordinals[bucket] != -1) {
      if(set.equalsElement(ordinals[bucket], o))
        return true;
      bucket ++;
      bucket &= hashMask;
    }
  }
  return false;
}

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.dataaccessHollowSetTypeDataAccessgetDataAccess

Popular methods of HollowSetTypeDataAccess

  • contains
    Generally, the method #findElement(int,Object...) may be more useful.
  • potentialMatchOrdinalIterator
  • size
  • findElement
    Returns The matching ordinal of the element from the set at the specified ordinal which matches the
  • 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)
  • Top plugins for Android Studio
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