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

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

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

origin: Netflix/hollow

  public static boolean equalObject(String typeName, int ordinal, Object testObject) {
    if(testObject instanceof HollowRecord) {
      HollowRecord testRec = (HollowRecord)testObject;
      if(testRec.getOrdinal() == ordinal) {
        String otherType = testRec.getSchema().getName();

        return otherType.equals(typeName);
      }
    }
    return false;
  }
}
origin: Netflix/hollow

@Override
public String stringify(HollowRecord record) {
  return stringify(record.getTypeDataAccess().getDataAccess(),
      record.getSchema().getName(), record.getOrdinal());
}
origin: Netflix/hollow

@Override
public String stringify(HollowRecord record) {
  return stringify(record.getTypeDataAccess().getDataAccess(), record.getSchema().getName(), record.getOrdinal());
}
origin: Netflix/hollow

@Override
public void stringify(Writer writer, HollowRecord record) throws IOException {
  stringify(writer, record.getTypeDataAccess().getDataAccess(), record.getSchema().getName(),
      record.getOrdinal());
}
origin: Netflix/hollow

@Override
public void stringify(Writer writer, HollowRecord record) throws IOException {
  stringify(writer, record.getTypeDataAccess().getDataAccess(), record.getSchema().getName(), record.getOrdinal());
}
origin: Netflix/hollow

@Test
public void testCompletelyMissingMap() throws IOException {
  roundTripSnapshot();
  readStateEngine.setMissingDataHandler(new FakeMissingDataHandler());
  GenericHollowMap map = (GenericHollowMap) GenericHollowRecordHelper.instantiate(readStateEngine, "MissingMap", 0);
  Assert.assertEquals(2, map.size());
  Assert.assertTrue(map.containsKey(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 2)));
  Assert.assertEquals(300, map.get(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 3)).getOrdinal());
  Assert.assertFalse(map.containsKey(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 0)));
  Assert.assertNull(map.get(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 4)));
  Iterator<Map.Entry<HollowRecord, HollowRecord>> rec = map.entrySet().iterator();
  Assert.assertTrue(rec.hasNext());
  Map.Entry<HollowRecord, HollowRecord> next = rec.next();
  Assert.assertEquals(2, next.getKey().getOrdinal());
  Assert.assertEquals("MissingObject", next.getKey().getSchema().getName());
  Assert.assertEquals(200, next.getValue().getOrdinal());
  Assert.assertEquals("MissingObject", next.getValue().getSchema().getName());
  Assert.assertTrue(rec.hasNext());
  next = rec.next();
  Assert.assertEquals(3, next.getKey().getOrdinal());
  Assert.assertEquals("MissingObject", next.getKey().getSchema().getName());
  Assert.assertEquals(300, next.getValue().getOrdinal());
  Assert.assertEquals("MissingObject", next.getValue().getSchema().getName());
  Assert.assertEquals(300, map.get(next.getKey()).getOrdinal());
  Assert.assertEquals("MissingObject", map.get(next.getKey()).getSchema().getName());
  Assert.assertFalse(rec.hasNext());
}
origin: Netflix/hollow

@Test
public void testCompletelyMissingSet() throws IOException {
  roundTripSnapshot();
  readStateEngine.setMissingDataHandler(new FakeMissingDataHandler());
  GenericHollowSet set = (GenericHollowSet) GenericHollowRecordHelper.instantiate(readStateEngine, "MissingSet", 0);
  Assert.assertEquals(2, set.size());
  Assert.assertTrue(set.contains(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 2)));
  Assert.assertFalse(set.contains(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 0)));
  Iterator<HollowRecord> rec = set.iterator();
  Assert.assertTrue(rec.hasNext());
  HollowRecord next = rec.next();
  Assert.assertEquals(2, next.getOrdinal());
  Assert.assertEquals("MissingObject", next.getSchema().getName());
  Assert.assertTrue(rec.hasNext());
  next = rec.next();
  Assert.assertEquals(3, next.getOrdinal());
  Assert.assertEquals("MissingObject", next.getSchema().getName());
  Assert.assertFalse(rec.hasNext());
}
origin: Netflix/hollow

@Test
public void testCompletelyMissingList() throws IOException {
  roundTripSnapshot();
  readStateEngine.setMissingDataHandler(new FakeMissingDataHandler());
  GenericHollowList list = (GenericHollowList) GenericHollowRecordHelper.instantiate(readStateEngine, "MissingList", 0);
  Assert.assertEquals(2, list.size());
  Assert.assertTrue(list.contains(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 2)));
  Assert.assertFalse(list.contains(new FakeMissingHollowRecord(new HollowObjectMissingDataAccess(readStateEngine, "MissingObject"), 0)));
  Iterator<HollowRecord> rec = list.iterator();
  Assert.assertTrue(rec.hasNext());
  HollowRecord next = rec.next();
  Assert.assertEquals(2, next.getOrdinal());
  Assert.assertEquals("MissingObject", next.getSchema().getName());
  Assert.assertTrue(rec.hasNext());
  next = rec.next();
  Assert.assertEquals(3, next.getOrdinal());
  Assert.assertEquals("MissingObject", next.getSchema().getName());
  Assert.assertFalse(rec.hasNext());
}
com.netflix.hollow.api.objectsHollowRecordgetSchema

Popular methods of HollowRecord

  • getOrdinal
  • getDelegate
  • getTypeDataAccess

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • Menu (java.awt)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot alternatives
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