<commit_before>package hm.binkley.labs;

import reactor.Environment;
import reactor.bus.Event;
import reactor.bus.EventBus;

import java.util.concurrent.CountDownLatch;

import static java.lang.System.out;
import static reactor.bus.selector.Selectors.$;

/**
 * {@code ReagentMain} <strong>needs documentation</strong>.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @todo Needs documentation
 * @see <a href="http://projectreactor.io/docs/reference/#reactor-bus">reactor-bus</a>
 */
public final class ReagentMain {
    static {
        Environment.initialize();
    }

    public static void main(final String... args)
            throws InterruptedException {
        // Because main() exits before bus can process, force it to wait
        final CountDownLatch done = new CountDownLatch(1);
        final EventBus bus = EventBus.create(Environment.get());

        bus.on($("topic"), ev -> {
            out.println(ev);
            done.countDown();
        });

        bus.notify("topic", Event.wrap("Hello World!"));

        done.await();
    }<commit_msg>Try reactor with types.<commit_after>package hm.binkley.labs;

import reactor.Environment;
import reactor.bus.EventBus;

import java.util.concurrent.CountDownLatch;

import static java.lang.System.out;
import static reactor.bus.selector.Selectors.T;

/**
 * {@code ReagentMain} <strong>needs documentation</strong>.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @todo Needs documentation
 * @see <a href="http://projectreactor.io/docs/reference/#reactor-bus">reactor-bus</a>
 */
public final class ReagentMain {
    static {
        Environment.initialize();
    }

    public static void main(final String... args)
            throws InterruptedException {
        // Because main() exits before bus can process, force it to wait
        final CountDownLatch done = new CountDownLatch(1);
        final EventBus bus = EventBus.create(Environment.get());

        bus.on(T(Foo.class), ev -> {
            out.println(ev);
            done.countDown();
        });

        bus.notify(new Bar());

        done.await();
    }

    public static abstract class Foo {
        @Override
        public String toString() {
            return "I'm a Foo!";
        }
    }

    public static final class Bar
            extends Foo {
        @Override
        public String toString() {
            return "I'm a Bar!";
        }
    }
{'fraction_non_alphanumeric': 0.13045284586622352, 'fraction_numerical': 0.0008309098462816784, 'mean_word_length': 2.6156156156156154, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2887433', 'n_tokens_mistral': 713, 'n_tokens_neox': 688, 'n_words': 170}