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

How to use
instantiateValue
method
in
com.netflix.hollow.api.objects.HollowMap

Best Java code snippets using com.netflix.hollow.api.objects.HollowMap.instantiateValue (Showing top 4 results out of 315)

origin: Netflix/hollow

@Override
public V findValue(HollowMap<K, V> map, int ordinal, Object... hashKey) {
  int valueOrdinal = dataAccess.findValue(ordinal, hashKey);
  if(valueOrdinal != -1)
    return map.instantiateValue(valueOrdinal);
  return null;
}
origin: Netflix/hollow

@Override
public V findValue(HollowMap<K, V> map, int ordinal, Object... hashKey) {
  int valueOrdinal = dataAccess.findValue(ordinal, hashKey);
  if(valueOrdinal != -1)
    return map.instantiateValue(valueOrdinal);
  return null;
}
origin: Netflix/hollow

@Override
public V get(HollowMap<K, V> map, int ordinal, Object key) {
  if(getSchema().getHashKey() != null) {
    for(int i=0;i<ordinals.length;i+=2) {
      if(ordinals[i] != -1 && map.equalsKey(ordinals[i], key))
        return map.instantiateValue(ordinals[i+1]);
    }
  } else {
    int hashCode = dataAccess.getDataAccess().getHashCodeFinder().hashCode(key);
    int bucket = (HashCodes.hashInt(hashCode) & hashMask) * 2;

    while(ordinals[bucket] != -1) {
      if(map.equalsKey(ordinals[bucket], key)) {
        return map.instantiateValue(ordinals[bucket + 1]);
      }

      bucket += 2;
      bucket &= ordinals.length - 1;
    }
  }
  return null;
}
origin: Netflix/hollow

@Override
public V get(HollowMap<K, V> map, int ordinal, Object key) {
  HollowMapEntryOrdinalIterator iter;
  
  if(getSchema().getHashKey() != null) {
    iter = dataAccess.ordinalIterator(ordinal);
  } else {
    int hashCode = dataAccess.getDataAccess().getHashCodeFinder().hashCode(key);
    iter = dataAccess.potentialMatchOrdinalIterator(ordinal, hashCode);
  }
  
  while(iter.next()) {
    if(map.equalsKey(iter.getKey(), key))
      return map.instantiateValue(iter.getValue());
  }
  return null;
}
com.netflix.hollow.api.objectsHollowMapinstantiateValue

Popular methods of HollowMap

  • equalsKey
  • equalsValue
  • instantiateKey

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Best plugins for Eclipse
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