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

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

Best Java code snippets using com.netflix.hollow.core.util.IntMap$IntMapEntryIterator.getKey (Showing top 4 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 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$IntMapEntryIteratorgetKey

Popular methods of IntMap$IntMapEntryIterator

  • getValue
  • next
  • <init>

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top Sublime Text 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