Tabnine Logo
HollowRecord.getDelegate
Code IndexAdd Tabnine to your IDE (free)

How to use
getDelegate
method
in
com.netflix.hollow.api.objects.HollowRecord

Best Java code snippets using com.netflix.hollow.api.objects.HollowRecord.getDelegate (Showing top 1 results out of 315)

origin: Netflix/hollow

public HollowObjectCacheProvider(HollowTypeDataAccess typeDataAccess, HollowTypeAPI typeAPI, HollowFactory<T> factory, HollowObjectCacheProvider<T> previous) {
  if(typeDataAccess != null) {
    PopulatedOrdinalListener listener = typeDataAccess.getTypeState().getListener(PopulatedOrdinalListener.class);
    BitSet populatedOrdinals = listener.getPopulatedOrdinals();
    BitSet previousOrdinals = listener.getPreviousOrdinals();
    int length = Math.max(populatedOrdinals.length(), previousOrdinals.length());
    List<T> arr = new ArrayList<T>(length);
    for(int ordinal = 0; ordinal < length; ordinal++) {
      while(ordinal >= arr.size())
        arr.add(null);
      if(previous != null && previousOrdinals.get(ordinal) && populatedOrdinals.get(ordinal)) {
        T cached = previous.getHollowObject(ordinal);
        arr.set(ordinal, cached);
        if(cached instanceof HollowRecord)
          ((HollowCachedDelegate)((HollowRecord)cached).getDelegate()).updateTypeAPI(typeAPI);
      } else if(populatedOrdinals.get(ordinal)){
        arr.set(ordinal, instantiateCachedObject(factory, typeDataAccess, typeAPI, ordinal));
      }
    }
    if(typeDataAccess instanceof HollowTypeReadState) {
      this.factory = factory;
      this.typeAPI = typeAPI;
      this.typeReadState = (HollowTypeReadState)typeDataAccess;
      this.typeReadState.addListener(this);
    }
    this.cachedItems = arr;
  } else {
    this.cachedItems = Collections.emptyList();
  }
}
com.netflix.hollow.api.objectsHollowRecordgetDelegate

Popular methods of HollowRecord

  • getOrdinal
  • getSchema
  • getTypeDataAccess

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • Kernel (java.awt.image)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Vim 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