Tabnine Logo
HollowEffigyFactory.effigy
Code IndexAdd Tabnine to your IDE (free)

How to use
effigy
method
in
com.netflix.hollow.diffview.effigy.HollowEffigyFactory

Best Java code snippets using com.netflix.hollow.diffview.effigy.HollowEffigyFactory.effigy (Showing top 5 results out of 315)

origin: Netflix/hollow

private List<Field> createCollectionFields(HollowEffigy effigy) {
  List<Field> fields = new ArrayList<Field>();
  HollowCollectionTypeDataAccess typeDataAccess = (HollowCollectionTypeDataAccess) effigy.dataAccess;
  HollowCollectionSchema schema = typeDataAccess.getSchema();
  HollowOrdinalIterator iter = typeDataAccess.ordinalIterator(effigy.ordinal);
  int elementOrdinal = iter.next();
  while(elementOrdinal != NO_MORE_ORDINALS) {
    HollowEffigy elementEffigy = effigy(typeDataAccess.getDataAccess(), schema.getElementType(), elementOrdinal);
    fields.add(new Field("element", elementEffigy));
    elementOrdinal = iter.next();
  }
  
  return fields;
}
origin: Netflix/hollow

private List<Field> createMapFields(HollowEffigy effigy) {
  List<Field> fields = new ArrayList<Field>();
  HollowMapTypeDataAccess typeDataAccess = (HollowMapTypeDataAccess)effigy.dataAccess;
  HollowMapSchema schema = typeDataAccess.getSchema();
  HollowMapEntryOrdinalIterator iter = typeDataAccess.ordinalIterator(effigy.ordinal);
  while(iter.next()) {
    HollowEffigy entryEffigy = new HollowEffigy("Map.Entry");
    entryEffigy.add(new Field("key", effigy(typeDataAccess.getDataAccess(), schema.getKeyType(), iter.getKey())));
    entryEffigy.add(new Field("value", effigy(typeDataAccess.getDataAccess(), schema.getValueType(), iter.getValue())));
    fields.add(new Field("entry", "Map.Entry", entryEffigy));
  }
  
  return fields;
}
origin: Netflix/hollow

public HollowDiffViewRow getHollowDiffViewRows() {
  HollowEffigy fromEffigy, toEffigy;
  if(diffUI != null && diffUI.getCustomHollowEffigyFactory(typeName) != null) {
    CustomHollowEffigyFactory effigyFactory = diffUI.getCustomHollowEffigyFactory(typeName);
    synchronized(effigyFactory) {
      effigyFactory.setFromHollowRecord(fromDataAccess.getTypeDataAccess(typeName), fromOrdinal);
      effigyFactory.setToHollowRecord(toDataAccess.getTypeDataAccess(typeName), toOrdinal);
      effigyFactory.generateEffigies();
      fromEffigy = effigyFactory.getFromEffigy();
      toEffigy = effigyFactory.getToEffigy();
    }
  } else {
    HollowEffigyFactory effigyFactory = new HollowEffigyFactory();
    fromEffigy = fromOrdinal == -1 ? null : effigyFactory.effigy(fromDataAccess, typeName, fromOrdinal);
    toEffigy = toOrdinal == -1 ? null : effigyFactory.effigy(toDataAccess, typeName, toOrdinal);
  }
  HollowDiffViewRow rootRow = createRootRow(fromEffigy, toEffigy);
  traverseEffigyToCreateViewRows(rootRow);
  return rootRow;
}
origin: Netflix/hollow

  break;
case REFERENCE:
  fieldValue = effigy(typeDataAccess.getDataAccess(), schema.getReferencedType(i), typeDataAccess.readOrdinal(effigy.ordinal, i));
origin: Netflix/hollow

@Test
public void test() throws IOException {
  HollowDiff diff = new FakeHollowDiffGenerator().createFakeDiff();
  HollowEffigyFactory effigyFactory = new HollowEffigyFactory();
  HollowEffigy fromEffigy = effigyFactory.effigy(diff.getFromStateEngine(), "TypeA", 0);
  HollowEffigy toEffigy = effigyFactory.effigy(diff.getToStateEngine(), "TypeA", 0);
  HollowEffigyDiffRecord diffRecord = new HollowEffigyDiffRecord(fromEffigy);
  Assert.assertEquals(8, diffRecord.calculateDiff(toEffigy, 8));
}
com.netflix.hollow.diffview.effigyHollowEffigyFactoryeffigy

Popular methods of HollowEffigyFactory

  • <init>
  • createCollectionFields
  • createFields
  • createMapFields
  • createObjectFields
  • memoize

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JOptionPane (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for WebStorm
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