本文整理汇总了Java中reactor.core.publisher.Operators.reportSubscriptionSet方法的典型用法代码示例。如果您正苦于以下问题:Java Operators.reportSubscriptionSet方法的具体用法?Java Operators.reportSubscriptionSet怎么用?Java Operators.reportSubscriptionSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reactor.core.publisher.Operators
的用法示例。
在下文中一共展示了Operators.reportSubscriptionSet方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setWithoutRequesting
import reactor.core.publisher.Operators; //导入方法依赖的package包/类
/**
* Sets the Subscription once but does not request anything.
* @param s the Subscription to push
* @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;
}
}
}
示例2: setWithoutRequesting
import reactor.core.publisher.Operators; //导入方法依赖的package包/类
/**
* Sets the Subscription once but does not request anything.
* @param s the Subscription to push
* @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;
}
}
}
示例3: setWithoutRequesting
import reactor.core.publisher.Operators; //导入方法依赖的package包/类
/**
* 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;
}
}
}
示例4: set
import reactor.core.publisher.Operators; //导入方法依赖的package包/类
/**
* Atomically sets the single subscription and requests the missed amount from it.
*
* @param s
* @return false if this arbiter is cancelled or there was a subscription already push
*/
protected final boolean set(Subscription s) {
Objects.requireNonNull(s, "s");
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)) {
long r = REQUESTED.getAndSet(this, 0L);
if (r != 0L) {
s.request(r);
}
return true;
}
a = this.s;
if (a != Operators.cancelledSubscription()) {
s.cancel();
return false;
}
Operators.reportSubscriptionSet();
return false;
}
示例5: set
import reactor.core.publisher.Operators; //导入方法依赖的package包/类
/**
* Atomically sets the single subscription and requests the missed amount from it.
*
* @param s
* @return false if this arbiter is cancelled or there was a subscription already push
*/
protected final boolean set(Subscription s) {
Objects.requireNonNull(s, "s");
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)) {
long r = REQUESTED.getAndSet(this, 0L);
if (r != 0L) {
s.request(r);
}
return true;
}
a = this.s;
if (a != Operators.cancelledSubscription()) {
s.cancel();
return false;
}
Operators.reportSubscriptionSet();
return false;
}
示例6: set
import reactor.core.publisher.Operators; //导入方法依赖的package包/类
/**
* Atomically sets the single subscription and requests the missed amount from it.
*
* @param s
* @return false if this arbiter is cancelled or there was a subscription already set
*/
protected final boolean set(Subscription s) {
Objects.requireNonNull(s, "s");
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)) {
long r = REQUESTED.getAndSet(this, 0L);
if (r != 0L) {
s.request(r);
}
return true;
}
a = this.s;
if (a != Operators.cancelledSubscription()) {
s.cancel();
return false;
}
Operators.reportSubscriptionSet();
return false;
}