@Test public void testFromGitTopologyVisualizer() { final String text = "Topology\n" + "Sub-topologies:\n" + "Sub-topology: 0\n" + "\tSource: KSTREAM-SOURCE-0000000000 (topics: [conversation-meta])\n" + "\t--> KSTREAM-TRANSFORM-0000000001\n" + "\tProcessor: KSTREAM-TRANSFORM-0000000001 (stores: [conversation-meta-state])\n" + "\t--> KSTREAM-KEY-SELECT-0000000002\n" + "\t<-- KSTREAM-SOURCE-0000000000\n" + "\tProcessor: KSTREAM-KEY-SELECT-0000000002 (stores: [])\n" + "\t--> KSTREAM-FILTER-0000000005\n" + "\t<-- KSTREAM-TRANSFORM-0000000001\n" + "\tProcessor: KSTREAM-FILTER-0000000005 (stores: [])\n" + "\t--> KSTREAM-SINK-0000000004\n" + "\t<-- KSTREAM-KEY-SELECT-0000000002\n" + "\tSink: KSTREAM-SINK-0000000004 (topic: count-resolved-repartition)\n" + "\t<-- KSTREAM-FILTER-0000000005\n" + "Sub-topology: 1\n" + "\tSource: KSTREAM-SOURCE-0000000006 (topics: [count-resolved-repartition])\n" + "\t--> KSTREAM-AGGREGATE-0000000003\n" + "\tProcessor: KSTREAM-AGGREGATE-0000000003 (stores: [count-resolved])\n" + "\t--> KTABLE-TOSTREAM-0000000007\n" + "\t<-- KSTREAM-SOURCE-0000000006\n" + "\tProcessor: KTABLE-TOSTREAM-0000000007 (stores: [])\n" + "\t--> KSTREAM-SINK-0000000008\n" + "\t<-- KSTREAM-AGGREGATE-0000000003\n" + "\tSink: KSTREAM-SINK-0000000008 (topic: streams-count-resolved)\n" + "\t<-- KTABLE-TOSTREAM-0000000007\n" + "\t\t\t"; final KStreamsTopologyDescriptionParser graph = new KStreamsTopologyDescriptionParser(text); System.out.println(graph); assertEquals(9, graph.size()); }
public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } KStreamsTopologyDescriptionParser(@Nonnull final String script); }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } KStreamsTopologyDescriptionParser(@Nonnull final String script); @Nonnull static String replaceProperties(@Nonnull final String script,
                                         @Nonnull final Properties properties); @Nonnull static String properties2str(@Nonnull final Properties properties); @Nullable String getProperty(@Nonnull final String key, @Nullable final String dflt); int size(); @Override @Nonnull String toString(); @Nonnull Optional<TopologyElement> findForId(@Nonnull final String id); @Nonnull @MustNotContainNull List<Topologies> getTopologies(); }
KStreamsTopologyDescriptionParser { public int size() { return this.topologies.stream().mapToInt(x -> x.size()).sum(); } KStreamsTopologyDescriptionParser(@Nonnull final String script); @Nonnull static String replaceProperties(@Nonnull final String script,
                                         @Nonnull final Properties properties); @Nonnull static String properties2str(@Nonnull final Properties properties); @Nullable String getProperty(@Nonnull final String key, @Nullable final String dflt); int size(); @Override @Nonnull String toString(); @Nonnull Optional<TopologyElement> findForId(@Nonnull final String id); @Nonnull @MustNotContainNull List<Topologies> getTopologies();  }