本文整理了Java中reactor.core.publisher.Operators.addCap()
方法的一些代码示例,展示了Operators.addCap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operators.addCap()
方法的具体详情如下:
包路径:reactor.core.publisher.Operators
类名称:Operators
方法名:addCap
[英]Cap an addition to Long.MAX_VALUE
[中]加上一个长的帽子。最大值
代码示例来源:origin: spring-projects/spring-framework
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
publisher.changeToDemandState(this);
}
}
},
代码示例来源:origin: spring-projects/spring-framework
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
// Did a concurrent read transition to NO_DEMAND just before us?
publisher.changeToDemandState(NO_DEMAND);
}
}
},
代码示例来源:origin: spring-projects/spring-framework
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
publisher.changeToDemandState(this);
}
}
代码示例来源:origin: spring-projects/spring-framework
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
// Did a concurrent read transition to NO_DEMAND just before us?
publisher.changeToDemandState(NO_DEMAND);
}
}
代码示例来源:origin: org.springframework/spring-web
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
publisher.changeToDemandState(this);
}
}
代码示例来源:origin: org.springframework/spring-web
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
// Did a concurrent read transition to NO_DEMAND just before us?
publisher.changeToDemandState(NO_DEMAND);
}
}
代码示例来源:origin: org.springframework/spring-web
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
// Did a concurrent read transition to NO_DEMAND just before us?
publisher.changeToDemandState(NO_DEMAND);
}
}
},
代码示例来源:origin: org.springframework/spring-web
@Override
<T> void request(AbstractListenerReadPublisher<T> publisher, long n) {
if (Operators.validate(n)) {
Operators.addCap(DEMAND_FIELD_UPDATER, publisher, n);
publisher.changeToDemandState(this);
}
}
},
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
parent.wasRequested = true;
}
}
代码示例来源:origin: reactor/reactor-core
public final void requested(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
Operators.addCap(REQUESTED, this, n);
drain();
}
代码示例来源:origin: reactor/reactor-core
@Override
public DefaultStepVerifierBuilder<T> thenRequest(long n) {
checkStrictlyPositive(n);
this.script.add(new RequestEvent<>(n, "thenRequest"));
this.hangCheckRequested = Operators.addCap(hangCheckRequested, n);
return this;
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
drain();
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
drainQueue();
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
drain();
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
Operators.addCap(REQUESTED, this, n);
drain();
}
}
代码示例来源:origin: reactor/reactor-core
@Override
public void onComplete() {
if(terminalSignal != null){
return;
}
terminalSignal = Signal.complete(this.cachedContext);
long p = produced;
if (p != 0L) {
Operators.addCap(REQUESTED, this, -p);
}
DrainUtils.postComplete(actual, this, REQUESTED, this, this);
}
代码示例来源:origin: reactor/reactor-core
@Override
public void request(long n) {
if (Operators.validate(n)) {
if (Operators.addCap(REQUESTED, this, n) == 0) {
if (n == Long.MAX_VALUE) {
fastPath();
} else {
slowPath(n);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!