/** * Helper method to execute a two-sink entity source. * * @param multiSink the multi-sink source to run. * @param source1 the first source to feed to the sink. * @param source2 the second source to feed to the sink. * @param exceptionHandler the exception handler to attach to threads. * @return the sink entity inspector containing the result. * @throws Exception if something goes wrong. */ public static SinkEntityInspector run(MultiSinkRunnableSource multiSink, RunnableSource source1, RunnableSource source2, Thread.UncaughtExceptionHandler exceptionHandler) throws Exception { SinkEntityInspector inspector = new SinkEntityInspector(); source1.setSink(multiSink.getSink(0)); source2.setSink(multiSink.getSink(1)); multiSink.setSink(inspector); runCore(multiSink, source1, source2, exceptionHandler); return inspector; }
/** * Helper method to execute a two-sink entity source. * * @param multiSink the multi-sink source to run. * @param source1 the first source to feed to the sink. * @param source2 the second source to feed to the sink. * @param exceptionHandler the exception handler to attach to threads. * @return the sink entity inspector containing the result. * @throws Exception if something goes wrong. */ public static SinkEntityInspector run(MultiSinkRunnableSource multiSink, RunnableSource source1, RunnableSource source2, Thread.UncaughtExceptionHandler exceptionHandler) throws Exception { SinkEntityInspector inspector = new SinkEntityInspector(); source1.setSink(multiSink.getSink(0)); source2.setSink(multiSink.getSink(1)); multiSink.setSink(inspector); runCore(multiSink, source1, source2, exceptionHandler); return inspector; }