本文整理了Java中reactor.core.publisher.Operators.onErrorDroppedMulticast()
方法的一些代码示例,展示了Operators.onErrorDroppedMulticast()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operators.onErrorDroppedMulticast()
方法的具体详情如下:
包路径:reactor.core.publisher.Operators
类名称:Operators
方法名:onErrorDroppedMulticast
[英]An unexpected exception is about to be dropped from an operator that has multiple subscribers (and thus potentially multiple Context with local onErrorDropped handlers).
[中]将从具有多个订阅者(因此可能具有多个本地处理程序的上下文)的运算符中删除意外异常。
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDroppedMulticast(t);
return;
}
if (Exceptions.addThrowable(ERROR, this, t)) {
done = true;
drain();
}
else {
Operators.onErrorDroppedMulticast(t);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
if (main.state != this) {
Operators.onErrorDroppedMulticast(t);
return;
}
signalCached(Signal.error(t));
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
Objects.requireNonNull(t, "onError");
if (done) {
Operators.onErrorDropped(t, currentContext());
return;
}
if (Exceptions.addThrowable(ERROR, this, t)) {
done = true;
drain();
}
else {
Operators.onErrorDroppedMulticast(t);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onError(Throwable t) {
FluxReplay.ReplayBuffer<T> b = buffer;
if (b.isDone()) {
Operators.onErrorDroppedMulticast(t);
}
else {
b.onError(t);
@SuppressWarnings("unchecked") FluxReplay.ReplaySubscription<T>[] a =
SUBSCRIBERS.getAndSet(this, TERMINATED);
for (FluxReplay.ReplaySubscription<T> rs : a) {
b.replay(rs);
}
}
}
代码示例来源:origin: reactor/reactor-core
@Override
@SuppressWarnings("unchecked")
public final void onError(Throwable cause) {
Objects.requireNonNull(cause, "onError cannot be null");
if (UPSTREAM.getAndSet(this, Operators.cancelledSubscription())
== Operators.cancelledSubscription()) {
Operators.onErrorDroppedMulticast(cause);
return;
}
error = cause;
value = null;
source = null;
for (NextInner<O> as : SUBSCRIBERS.getAndSet(this, TERMINATED)) {
as.onError(cause);
}
waitStrategy.signalAllWhenBlocking();
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onNext(T t) {
if (done) {
if (t != null) {
Operators.onNextDropped(t, currentContext());
}
return;
}
if (sourceMode == Fuseable.ASYNC) {
drain();
return;
}
if (!queue.offer(t)) {
Throwable ex = Operators.onOperatorError(s,
Exceptions.failWithOverflow(Exceptions.BACKPRESSURE_ERROR_QUEUE_FULL), t, currentContext());
if (!Exceptions.addThrowable(ERROR, this, ex)) {
Operators.onErrorDroppedMulticast(ex);
return;
}
done = true;
}
drain();
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
public void onError(Throwable t) {
if (done) {
Operators.onErrorDroppedMulticast(t);
return;
}
if (Exceptions.addThrowable(ERROR, this, t)) {
done = true;
drain();
}
else {
Operators.onErrorDroppedMulticast(t);
}
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
public void onError(Throwable t) {
if (main.state != this) {
Operators.onErrorDroppedMulticast(t);
return;
}
signalCached(Signal.error(t));
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
public void onError(Throwable t) {
Objects.requireNonNull(t, "onError");
if (done) {
Operators.onErrorDropped(t, currentContext());
return;
}
if (Exceptions.addThrowable(ERROR, this, t)) {
done = true;
drain();
}
else {
Operators.onErrorDroppedMulticast(t);
}
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
public void onError(Throwable t) {
FluxReplay.ReplayBuffer<T> b = buffer;
if (b.isDone()) {
Operators.onErrorDroppedMulticast(t);
}
else {
b.onError(t);
@SuppressWarnings("unchecked") FluxReplay.ReplaySubscription<T>[] a =
SUBSCRIBERS.getAndSet(this, TERMINATED);
for (FluxReplay.ReplaySubscription<T> rs : a) {
b.replay(rs);
}
}
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
@SuppressWarnings("unchecked")
public final void onError(Throwable cause) {
Objects.requireNonNull(cause, "onError cannot be null");
if (UPSTREAM.getAndSet(this, Operators.cancelledSubscription())
== Operators.cancelledSubscription()) {
Operators.onErrorDroppedMulticast(cause);
return;
}
error = cause;
value = null;
source = null;
for (NextInner<O> as : SUBSCRIBERS.getAndSet(this, TERMINATED)) {
as.onError(cause);
}
waitStrategy.signalAllWhenBlocking();
}
代码示例来源:origin: io.projectreactor/reactor-core
@Override
public void onNext(T t) {
if (done) {
if (t != null) {
Operators.onNextDropped(t, currentContext());
}
return;
}
if (sourceMode == Fuseable.ASYNC) {
drain();
return;
}
if (!queue.offer(t)) {
Throwable ex = Operators.onOperatorError(s,
Exceptions.failWithOverflow(Exceptions.BACKPRESSURE_ERROR_QUEUE_FULL), t, currentContext());
if (!Exceptions.addThrowable(ERROR, this, ex)) {
Operators.onErrorDroppedMulticast(ex);
return;
}
done = true;
}
drain();
}
内容来源于网络,如有侵权,请联系作者删除!