public interface Fuseable
Fuseable.QueueSubscription
.Modifier and Type | Interface and Description |
---|---|
static interface |
Fuseable.ConditionalSubscriber<T>
A subscriber variant that can immediately tell if it consumed
the value or not, directly allowing a new value to be sent if
it didn't.
|
static interface |
Fuseable.QueueSubscription<T>
Support contract for queue-fusion based optimizations on subscriptions.
|
static interface |
Fuseable.ScalarCallable<T>
Marker interface indicating that the target can return a value or null,
otherwise fail immediately and thus a viable target for assembly-time
optimizations.
|
static interface |
Fuseable.SynchronousSubscription<T>
Base class for synchronous sources which have fixed size and can
emit their items in a pull fashion, thus avoiding the request-accounting
overhead in many cases.
|
Modifier and Type | Field and Description |
---|---|
static int |
ANY
Indicates the QueueSubscription should decide what fusion it performs (input only).
|
static int |
ASYNC
Indicates the QueueSubscription can perform only async-fusion.
|
static int |
NONE
Indicates the QueueSubscription can't support the requested mode.
|
static int |
SYNC
Indicates the QueueSubscription can perform sync-fusion.
|
static int |
THREAD_BARRIER
Indicates that the queue will be drained from another thread
thus any queue-exit computation may be invalid at that point.
|
static final int ANY
static final int ASYNC
static final int NONE
static final int SYNC
static final int THREAD_BARRIER
For example, an asyncSource.map().publishOn().subscribe()
sequence where asyncSource
is async-fuseable: publishOn may fuse the whole sequence into a single Queue. That in turn
could invoke the mapper function from its poll()
method from another thread,
whereas the unfused sequence would have invoked the mapper on the previous thread.
If such mapper invocation is costly, it would escape its thread boundary this way.