reactor.core.publisher.Operators.reportSubscriptionSet()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中reactor.core.publisher.Operators.reportSubscriptionSet()方法的一些代码示例,展示了Operators.reportSubscriptionSet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operators.reportSubscriptionSet()方法的具体详情如下:
包路径:reactor.core.publisher.Operators
类名称:Operators
方法名:reportSubscriptionSet

Operators.reportSubscriptionSet介绍

[英]Log a Exceptions#duplicateOnSubscribeException() error.
[中]记录异常#DuplicationSubscribeeException()错误。

代码示例

代码示例来源:origin: reactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
    return;
  }
  s.request(Long.MAX_VALUE);
}

代码示例来源:origin: reactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!S.compareAndSet(this, null, s)) {
    s.cancel();
    if (this.s != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
  else {
    s.request(Long.MAX_VALUE);
  }
}

代码示例来源:origin: reactor/reactor-core

void setOther(Subscription s) {
  if (!OTHER.compareAndSet(this, null, s)) {
    s.cancel();
    if (other != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
    return;
  }
  s.request(Long.MAX_VALUE);
}

代码示例来源:origin: reactor/reactor-core

void setOther(Subscription s) {
  if (!OTHER.compareAndSet(this, null, s)) {
    s.cancel();
    if (other != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
}

代码示例来源:origin: reactor/reactor-core

void setOther(Subscription s) {
  if (!OTHER.compareAndSet(this, null, s)) {
    s.cancel();
    if (other != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
}

代码示例来源:origin: reactor/reactor-core

void setOther(Subscription s) {
  if (!OTHER.compareAndSet(this, null, s)) {
    s.cancel();
    if (other != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
}

代码示例来源:origin: reactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  } else {
    actual.onSubscribe(this);
  }
}

代码示例来源:origin: reactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
  else {
    actual.onSubscribe(this);
  }
}

代码示例来源:origin: reactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
  else {
    actual.onSubscribe(this);
  }
}

代码示例来源:origin: reactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  Subscription a = this.s;
  if (a == Operators.cancelledSubscription()) {
    s.cancel();
  }
  if (a != null) {
    s.cancel();
    Operators.reportSubscriptionSet();
    return;
  }
  if (S.compareAndSet(this, null, s)) {
    s.request(Operators.unboundedOrPrefetch(prefetch));
    return;
  }
  a = this.s;
  if (a != Operators.cancelledSubscription()) {
    s.cancel();
    Operators.reportSubscriptionSet();
  }
}

代码示例来源:origin: reactor/reactor-core

reportSubscriptionSet();
return false;
reportSubscriptionSet();
return false;

代码示例来源:origin: reactor/reactor-core

reportSubscriptionSet();
  return false;
reportSubscriptionSet();
return false;

代码示例来源:origin: reactor/reactor-core

/**
 * Sets the Subscription once but does not request anything.
 * @param s the Subscription to set
 * @return true if successful, false if the current subscription is not null
 */
protected final boolean setWithoutRequesting(Subscription s) {
  Objects.requireNonNull(s, "s");
  for (;;) {
    Subscription a = this.s;
    if (a == Operators.cancelledSubscription()) {
      s.cancel();
      return false;
    }
    if (a != null) {
      s.cancel();
      Operators.reportSubscriptionSet();
      return false;
    }
    if (S.compareAndSet(this, null, s)) {
      return true;
    }
  }
}

代码示例来源:origin: reactor/reactor-core

Operators.reportSubscriptionSet();
  return false;
Operators.reportSubscriptionSet();
return false;

代码示例来源:origin: io.projectreactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
    return;
  }
  s.request(Long.MAX_VALUE);
}

代码示例来源:origin: io.projectreactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!S.compareAndSet(this, null, s)) {
    s.cancel();
    if (this.s != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
  else {
    s.request(Long.MAX_VALUE);
  }
}

代码示例来源:origin: io.projectreactor/reactor-core

void setOther(Subscription s) {
  if (!OTHER.compareAndSet(this, null, s)) {
    s.cancel();
    if (other != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
}

代码示例来源:origin: io.projectreactor/reactor-core

void setOther(Subscription s) {
  if (!OTHER.compareAndSet(this, null, s)) {
    s.cancel();
    if (other != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
}

代码示例来源:origin: io.projectreactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  } else {
    actual.onSubscribe(this);
  }
}

代码示例来源:origin: io.projectreactor/reactor-core

@Override
public void onSubscribe(Subscription s) {
  if (!MAIN.compareAndSet(this, null, s)) {
    s.cancel();
    if (main != Operators.cancelledSubscription()) {
      Operators.reportSubscriptionSet();
    }
  }
  else {
    actual.onSubscribe(this);
  }
}

相关文章