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

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

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

Operators.validate介绍

[英]Evaluate if a request is strictly positive otherwise #reportBadRequest(long)
[中]评估一个请求是否严格是肯定的,否则#reportBadRequest(长)

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
void request(WriteResultPublisher publisher, long n) {
  Operators.validate(n);
}
@Override

代码示例来源:origin: spring-projects/spring-framework

@Override
  void request(WriteResultPublisher publisher, long n) {
    Operators.validate(n);
  }
},

代码示例来源:origin: org.springframework/spring-web

@Override
void request(WriteResultPublisher publisher, long n) {
  Operators.validate(n);
}
@Override

代码示例来源:origin: org.springframework/spring-web

@Override
  void request(WriteResultPublisher publisher, long n) {
    Operators.validate(n);
  }
},

代码示例来源: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: resilience4j/resilience4j

@Override
public final void request(long n) {
  if (Operators.validate(n)) {
    Subscription s = this.subscription;
    if (s != null) {
      s.request(n);
    }
  }
}

代码示例来源: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 onSubscribe(Subscription s) {
  if (Operators.validate(this.s, s)) {
    this.s = s;
    actual.onSubscribe(this);
  }
}

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

@SuppressWarnings("unchecked")
@Override
public void onSubscribe(Subscription s) {
  if (Operators.validate(this.s, s)) {
    this.s = s;
    if (s instanceof QueueSubscription) {
      this.qs = (QueueSubscription<T>) s;
    }
    actual.onSubscribe(this);
  }
}

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

@Override
public void onSubscribe(Subscription s) {
  if (Operators.validate(this.s, s)) {
    this.s = s;
    actual.onSubscribe(this);
  }
}

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

@Override
public final void request(long n) {
  if (Operators.validate(n)) {
    Operators.addCapCancellable(REQUESTED, this, n);
    drainParent();
  }
}

代码示例来源: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.addCapCancellable(REQUESTED, this, n);
    parent.drain();
  }
}

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

@Override
public void onSubscribe(Subscription s) {
  if (Operators.validate(this.s, s)) {
    this.s = s;
    this.qs = Operators.as(s);
    actual.onSubscribe(this);
  }
}

相关文章