本文整理了Java中reactor.core.publisher.Operators.scalarSubscription()
方法的一些代码示例,展示了Operators.scalarSubscription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operators.scalarSubscription()
方法的具体详情如下:
包路径:reactor.core.publisher.Operators
类名称:Operators
方法名:scalarSubscription
[英]Represents a fuseable Subscription that emits a single constant value synchronously to a Subscriber or consumer.
[中]表示同步向订阅者或使用者发送单个常量值的可融合订阅。
代码示例来源:origin: reactor/reactor-core
@Override
public void subscribe(CoreSubscriber<? super T> actual) {
actual.onSubscribe(Operators.scalarSubscription(actual, value));
}
代码示例来源:origin: reactor/reactor-core
@SuppressWarnings("unchecked")
public void subscribe(CoreSubscriber<? super Context> actual) {
Context ctx = actual.currentContext();
actual.onSubscribe(Operators.scalarSubscription(actual, ctx));
}
代码示例来源:origin: reactor/reactor-core
@Override
@SuppressWarnings("unchecked")
public void subscribe(CoreSubscriber<? super Integer> actual) {
long st = start;
long en = end;
if (st == en) {
Operators.complete(actual);
return;
} else
if (st + 1 == en) {
actual.onSubscribe(Operators.scalarSubscription(actual, (int)st));
return;
}
if (actual instanceof ConditionalSubscriber) {
actual.onSubscribe(new RangeSubscriptionConditional((ConditionalSubscriber<? super Integer>) actual, st, en));
return;
}
actual.onSubscribe(new RangeSubscription(actual, st, en));
}
代码示例来源:origin: reactor/reactor-core
onSubscribeInner(Operators.scalarSubscription(actual, v));
代码示例来源:origin: reactor/reactor-core
onSubscribe(Operators.scalarSubscription(this, initialValue));
seedSubscriber =
new ScanSeedSubscriber<>(this, accumulator, initialValue);
代码示例来源:origin: reactor/reactor-core
s.onSubscribe(Operators.scalarSubscription(s, v));
代码示例来源:origin: io.projectreactor/reactor-core
@Override
public void subscribe(CoreSubscriber<? super T> actual) {
actual.onSubscribe(Operators.scalarSubscription(actual, value));
}
代码示例来源:origin: io.projectreactor/reactor-core
@SuppressWarnings("unchecked")
public void subscribe(CoreSubscriber<? super Context> actual) {
Context ctx = actual.currentContext();
actual.onSubscribe(Operators.scalarSubscription(actual, ctx));
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
@SuppressWarnings("unchecked")
public void subscribe(CoreSubscriber<? super Integer> actual) {
long st = start;
long en = end;
if (st == en) {
Operators.complete(actual);
return;
} else
if (st + 1 == en) {
actual.onSubscribe(Operators.scalarSubscription(actual, (int)st));
return;
}
if (actual instanceof ConditionalSubscriber) {
actual.onSubscribe(new RangeSubscriptionConditional((ConditionalSubscriber<? super Integer>) actual, st, en));
return;
}
actual.onSubscribe(new RangeSubscription(actual, st, en));
}
代码示例来源:origin: io.projectreactor/reactor-core
onSubscribeInner(Operators.scalarSubscription(actual, v));
代码示例来源:origin: reactor/reactor-netty
innerActive = true;
inner.promise = promise;
inner.onSubscribe(Operators.scalarSubscription(inner, vr));
代码示例来源:origin: io.projectreactor.ipc/reactor-netty
innerActive = true;
inner.promise = promise;
inner.onSubscribe(Operators.scalarSubscription(inner, vr));
代码示例来源:origin: io.projectreactor.netty/reactor-netty
innerActive = true;
inner.promise = promise;
inner.onSubscribe(Operators.scalarSubscription(inner, vr));
代码示例来源:origin: io.projectreactor/reactor-core
onSubscribe(Operators.scalarSubscription(this, initialValue));
seedSubscriber =
new ScanSeedSubscriber<>(this, accumulator, initialValue);
代码示例来源:origin: io.projectreactor/reactor-core
s.onSubscribe(Operators.scalarSubscription(s, v));
内容来源于网络,如有侵权,请联系作者删除!