当前位置: 首页>>代码示例>>Java>>正文


Java Operators.reportSubscriptionSet方法代码示例

本文整理汇总了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;
        }
    }
}
 
开发者ID:apptik,项目名称:RHub,代码行数:25,代码来源:AssertSubscriber.java

示例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;
		}
	}
}
 
开发者ID:reactor,项目名称:reactor-core,代码行数:25,代码来源:AssertSubscriber.java

示例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;
    }
  }
}
 
开发者ID:the-james-burton,项目名称:the-turbine,代码行数:25,代码来源:AssertSubscriber.java

示例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;
}
 
开发者ID:apptik,项目名称:RHub,代码行数:41,代码来源:AssertSubscriber.java

示例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;
}
 
开发者ID:reactor,项目名称:reactor-core,代码行数:41,代码来源:AssertSubscriber.java

示例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;
}
 
开发者ID:the-james-burton,项目名称:the-turbine,代码行数:41,代码来源:AssertSubscriber.java


注:本文中的reactor.core.publisher.Operators.reportSubscriptionSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。