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

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

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

Operators.reportMoreProduced介绍

[英]Log an IllegalStateException that indicates more than the requested amount was produced.
[中]记录一个IllegalStateException,该异常指示产生的量超过了请求的量。

代码示例

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

final void producedOne() {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      r--;
      if (r < 0L) {
        reportMoreProduced();
        r = 0;
      }
      requested = r;
    } else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  addCap(MISSED_PRODUCED, this, 1L);
  drain();
}

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

public final void produced(long n) {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      long u = r - n;
      if (u < 0L) {
        reportMoreProduced();
        u = 0;
      }
      requested = u;
    } else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  addCap(MISSED_PRODUCED, this, n);
  drain();
}

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

long v = u - mp;
if (v < 0L) {
  reportMoreProduced();
  v = 0;

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

public final void produced(long n) {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      long u = r - n;
      if (u < 0L) {
        reportMoreProduced();
        u = 0;
      }
      requested = u;
    } else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  addCap(MISSED_PRODUCED, this, n);
  drain();
}

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

final void producedOne() {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      r--;
      if (r < 0L) {
        reportMoreProduced();
        r = 0;
      }
      requested = r;
    } else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  addCap(MISSED_PRODUCED, this, 1L);
  drain();
}

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

final void produced(long n) {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      long u = r - n;
      if (u < 0L) {
        Operators.reportMoreProduced();
        u = 0;
      }
      requested = u;
    }
    else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  Operators.addCap(MISSED_PRODUCED, this, n);
  drain();
}

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

final void produced(long n) {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      long u = r - n;
      if (u < 0L) {
        Operators.reportMoreProduced();
        u = 0;
      }
      requested = u;
    }
    else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  Operators.addCap(MISSED_PRODUCED, this, n);
  drain();
}

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

final void produced(long n) {
  if (unbounded) {
    return;
  }
  if (wip == 0 && WIP.compareAndSet(this, 0, 1)) {
    long r = requested;
    if (r != Long.MAX_VALUE) {
      long u = r - n;
      if (u < 0L) {
        Operators.reportMoreProduced();
        u = 0;
      }
      requested = u;
    }
    else {
      unbounded = true;
    }
    if (WIP.decrementAndGet(this) == 0) {
      return;
    }
    drainLoop();
    return;
  }
  Operators.addCap(MISSED_PRODUCED, this, n);
  drain();
}

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

long v = u - mp;
if (v < 0L) {
  reportMoreProduced();
  v = 0;

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

long v = u - mp;
if (v < 0L) {
  Operators.reportMoreProduced();
  v = 0;

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

long v = u - mp;
if (v < 0L) {
  Operators.reportMoreProduced();
  v = 0;

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

long v = u - mp;
if (v < 0L) {
  Operators.reportMoreProduced();
  v = 0;

相关文章