Tabnine Logo
IntMap$IntMapEntryIterator
Code IndexAdd Tabnine to your IDE (free)

How to use
IntMap$IntMapEntryIterator
in
com.netflix.hollow.core.util

Best Java code snippets using com.netflix.hollow.core.util.IntMap$IntMapEntryIterator (Showing top 5 results out of 315)

origin: Netflix/hollow

public HistoryStateTypeChanges(HollowHistoricalState historicalState, String typeName, HollowHistoryRecordNamer recordNamer, String... groupedFieldNames) {
  this.stateVersion = historicalState.getVersion();
  this.typeName = typeName;
  this.groupedFieldNames = groupedFieldNames;
  this.modifiedRecords = new RecordDiffTreeNode("", "Modified", "Modified", historicalState, recordNamer);
  this.addedRecords = new RecordDiffTreeNode("", "Added", "Added", historicalState, recordNamer);
  this.removedRecords = new RecordDiffTreeNode("", "Removed", "Removed", historicalState, recordNamer);
  HollowHistoricalStateTypeKeyOrdinalMapping typeKeyMapping = historicalState.getKeyOrdinalMapping().getTypeMappings().get(typeName);
  HollowObjectTypeDataAccess dataAccess = (HollowObjectTypeDataAccess) historicalState.getDataAccess().getTypeDataAccess(typeName);
  int[] groupedFieldIndexes = getGroupedFieldIndexes(groupedFieldNames, typeKeyMapping.getKeyIndex().getKeyFields());
  
  IntMapEntryIterator removedIter = typeKeyMapping.removedOrdinalMappingIterator();
  IntMapEntryIterator addedIter = typeKeyMapping.addedOrdinalMappingIterator();
  while(removedIter.next()) {
    int fromOrdinal = removedIter.getValue();
    int toOrdinal = typeKeyMapping.findAddedOrdinal(removedIter.getKey());
    if(toOrdinal != -1) {
      addRecordDiff(modifiedRecords, historicalState, typeKeyMapping, recordNamer, dataAccess, removedIter.getKey(), fromOrdinal, toOrdinal, groupedFieldIndexes);
    } else {
      addRecordDiff(removedRecords, historicalState, typeKeyMapping, recordNamer, dataAccess, removedIter.getKey(), fromOrdinal, toOrdinal, groupedFieldIndexes);
    }
  }
  while(addedIter.next()) {
    if(typeKeyMapping.findRemovedOrdinal(addedIter.getKey()) == -1) {
      int toOrdinal = addedIter.getValue();
      addRecordDiff(addedRecords, historicalState, typeKeyMapping, recordNamer, dataAccess, addedIter.getKey(), -1, toOrdinal, groupedFieldIndexes);
    }
  }
}

origin: Netflix/hollow

public IntMapEntryIterator iterator() {
  return new IntMapEntryIterator();
}
origin: Netflix/hollow

public void finish() {
  IntMapEntryIterator iter = addedOrdinalMap.iterator();
  while(iter.next()) {
    if(removedOrdinalMap.get(iter.getKey()) != -1)
      numberOfModifiedRecords++;
  }
  numberOfNewRecords = addedOrdinalMap.size() - numberOfModifiedRecords;
  numberOfRemovedRecords = removedOrdinalMap.size() - numberOfModifiedRecords;
}
origin: Netflix/hollow

private IntMap remapPreviousOrdinalMapping(IntMap previousOrdinalMapping, String typeName, OrdinalRemapper ordinalRemapper) {
  IntMapEntryIterator ordinalMappingIter = previousOrdinalMapping.iterator();
  IntMap ordinalLookupMap = new IntMap(previousOrdinalMapping.size());
  while(ordinalMappingIter.next())
    ordinalLookupMap.put(ordinalRemapper.getMappedOrdinal(typeName, ordinalMappingIter.getKey()), ordinalMappingIter.getValue());
  return ordinalLookupMap;
}
origin: Netflix/hollow

public HollowHistoricalStateTypeKeyOrdinalMapping remap(OrdinalRemapper remapper) {
  IntMap newAddedOrdinalMap = new IntMap(addedOrdinalMap.size());
  IntMapEntryIterator addedIter = addedOrdinalMap.iterator();
  while(addedIter.next())
    newAddedOrdinalMap.put(addedIter.getKey(), remapper.getMappedOrdinal(typeName, addedIter.getValue()));
  IntMap newRemovedOrdinalMap = new IntMap(removedOrdinalMap.size());
  IntMapEntryIterator removedIter = removedOrdinalMap.iterator();
  while(removedIter.next())
    newRemovedOrdinalMap.put(removedIter.getKey(), remapper.getMappedOrdinal(typeName, removedIter.getValue()));
  return new HollowHistoricalStateTypeKeyOrdinalMapping(typeName, keyIndex, newAddedOrdinalMap, newRemovedOrdinalMap);
}
com.netflix.hollow.core.utilIntMap$IntMapEntryIterator

Most used methods

  • getKey
  • getValue
  • next
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • Permission (java.security)
    Legacy security code; do not use.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Option (scala)
  • From CI to AI: The AI layer in your organization
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