@Test public void testDelareStream() { TestDeclarer testDeclarer = new TestDeclarer(); BatchingOutputFieldsDeclarer declarer = new BatchingOutputFieldsDeclarer(testDeclarer); declarer.declareStream("streamId", new Fields("dummy")); Assert.assertFalse(testDeclarer.directBuffer.get(0).booleanValue()); Assert.assertTrue(testDeclarer.directBuffer.get(1).booleanValue()); Assert.assertEquals(new Fields("dummy").toList(), testDeclarer.schemaBuffer.get(0).toList()); Assert.assertEquals(new Fields("dummy").toList(), testDeclarer.schemaBuffer.get(1).toList()); Assert.assertEquals("streamId", testDeclarer.streamIdBuffer.get(0)); Assert .assertEquals(BatchingOutputFieldsDeclarer.STREAM_PREFIX + "streamId", testDeclarer.streamIdBuffer.get(1)); }
@Override public void declareStream(String streamId, Fields schema) { this.declareStream(streamId, false, schema); }
BatchingOutputFieldsDeclarer implements OutputFieldsDeclarer { @Override public void declareStream(String streamId, Fields schema) { this.declareStream(streamId, false, schema); } }
BatchingOutputFieldsDeclarer implements OutputFieldsDeclarer { @Override public void declareStream(String streamId, Fields schema) { this.declareStream(streamId, false, schema); } BatchingOutputFieldsDeclarer(OutputFieldsDeclarer declarer); }
BatchingOutputFieldsDeclarer implements OutputFieldsDeclarer { @Override public void declareStream(String streamId, Fields schema) { this.declareStream(streamId, false, schema); } BatchingOutputFieldsDeclarer(OutputFieldsDeclarer declarer); @Override void declare(Fields schema); @Override void declare(boolean direct, Fields schema); @Override void declareStream(String streamId, Fields schema); @Override void declareStream(String streamId, boolean direct, Fields schema); }
BatchingOutputFieldsDeclarer implements OutputFieldsDeclarer { @Override public void declareStream(String streamId, Fields schema) { this.declareStream(streamId, false, schema); } BatchingOutputFieldsDeclarer(OutputFieldsDeclarer declarer); @Override void declare(Fields schema); @Override void declare(boolean direct, Fields schema); @Override void declareStream(String streamId, Fields schema); @Override void declareStream(String streamId, boolean direct, Fields schema); final static String STREAM_PREFIX; }