// Path: core/src/main/java/pocketbus/internal/Registry.java
// public interface Registry {
//     /**
//      * @param target the target that has subscribe annotations
//      * @return the SubscriptionRegistration for the given target
//      */
//     <T> SubscriptionRegistration getRegistration(T target);
// }


import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
import io.reactivex.Observable;
import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import pocketbus.internal.Registry;
package pocketbus;




public class Bus {
    private static final String TAG = "PocketBus";
    private static final Object DEFAULT_LOCK = new Object();

    private static Bus defaultBus;
    private static boolean debug = false;

    @NonNull
    private final Scheduler mainScheduler;
    @NonNull
    private final Scheduler currentScheduler;
    @NonNull
    private final Scheduler backgroundScheduler;

    protected final int eventCleanupCount;
    @NonNull
    private final AtomicInteger eventCounter = new AtomicInteger();

    @NonNull
    private final Map<Class, List<Subscription>> mainThreadListeners = new LinkedHashMap<>();
    @NonNull
    private final Map<Class, List<Subscription>> backgroundThreadListeners = new LinkedHashMap<>();
    @NonNull
    private final Map<Class, List<Subscription>> currentThreadListeners = new LinkedHashMap<>();

    @NonNull
    private final Map<Class<?>, ? super Object> stickyEvents = new LinkedHashMap<>();
    @NonNull
    private final Object listenerLock = new Object();
    @NonNull
    private final Object stickyLock = new Object();
    @Nullable
// Path: core/src/main/java/pocketbus/internal/Registry.java
// public interface Registry {
//     /**
//      * @param target the target that has subscribe annotations
//      * @return the SubscriptionRegistration for the given target
//      */
//     <T> SubscriptionRegistration getRegistration(T target);
// }


// Path: library/src/main/java/pocketbus/Bus.java
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
import io.reactivex.Observable;
import io.reactivex.Scheduler;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import pocketbus.internal.Registry;

package pocketbus;




public class Bus {
    private static final String TAG = "PocketBus";
    private static final Object DEFAULT_LOCK = new Object();

    private static Bus defaultBus;
    private static boolean debug = false;

    @NonNull
    private final Scheduler mainScheduler;
    @NonNull
    private final Scheduler currentScheduler;
    @NonNull
    private final Scheduler backgroundScheduler;

    protected final int eventCleanupCount;
    @NonNull
    private final AtomicInteger eventCounter = new AtomicInteger();

    @NonNull
    private final Map<Class, List<Subscription>> mainThreadListeners = new LinkedHashMap<>();
    @NonNull
    private final Map<Class, List<Subscription>> backgroundThreadListeners = new LinkedHashMap<>();
    @NonNull
    private final Map<Class, List<Subscription>> currentThreadListeners = new LinkedHashMap<>();

    @NonNull
    private final Map<Class<?>, ? super Object> stickyEvents = new LinkedHashMap<>();
    @NonNull
    private final Object listenerLock = new Object();
    @NonNull
    private final Object stickyLock = new Object();
    @Nullable
    private Registry registry = null;