/** * Create a QueueBasedSubscriber, backed by a JDK LinkedBlockingQueue * * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by the provided Queue * * @param q Queue backing the reactiveSubscriber * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final Queue<T> q, final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( q, counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by a Queue that will be created with the provided QueueFactory * * @param factory QueueFactory * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final QueueFactory<T> factory, final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( factory, counter, maxConcurrency); }
@Override public Subscriber<Long> createSubscriber() { return new QueueBasedSubscriber(new QueueBasedSubscriber.Counter(),500); }
/** * Create a QueueBasedSubscriber, backed by the provided Queue * * @param q Queue backing the reactiveSubscriber * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final Queue<T> q, final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( q, counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by the provided Queue * * @param q Queue backing the reactiveSubscriber * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final Queue<T> q, final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( q, counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by a JDK LinkedBlockingQueue * * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by a Queue that will be created with the provided QueueFactory * * @param factory QueueFactory * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final QueueFactory<T> factory, final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( factory, counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by a JDK LinkedBlockingQueue * * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( counter, maxConcurrency); }
/** * Create a QueueBasedSubscriber, backed by a Queue that will be created with the provided QueueFactory * * @param factory QueueFactory * @param counter Counter for tracking connections to the queue and data volumes * @param maxConcurrency Maximum number of subscriptions * @return QueueBasedSubscriber */ public static <T> QueueBasedSubscriber<T> subscriber(final QueueFactory<T> factory, final Counter counter, final int maxConcurrency) { return new QueueBasedSubscriber<>( factory, counter, maxConcurrency); }