本文整理了Java中reactor.core.publisher.Mono.timestamp()
方法的一些代码示例,展示了Mono.timestamp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mono.timestamp()
方法的具体详情如下:
包路径:reactor.core.publisher.Mono
类名称:Mono
方法名:timestamp
[英]If this Mono is valued, emit a reactor.util.function.Tuple2 pair of T1 the current clock time in millis (as a Long measured by the Schedulers#parallel() Scheduler) and T2 the emitted data (as a T).
[中]如果这个Mono是有价值的,就发射一个反应器。util。作用Tuple2对T1以毫秒为单位表示当前时钟时间(由调度程序#parallel()调度程序测量的长度),T2表示发出的数据(以T为单位)。
代码示例来源:origin: reactor/reactor-core
/**
* If this {@link Mono} is valued, emit a {@link reactor.util.function.Tuple2} pair of
* T1 the current clock time in millis (as a {@link Long} measured by the
* {@link Schedulers#parallel() parallel} Scheduler) and T2 the emitted data (as a {@code T}).
*
* <p>
* <img class="marble" src="doc-files/marbles/timestampForMono.svg" alt="">
*
* @return a timestamped {@link Mono}
*/
public final Mono<Tuple2<Long, T>> timestamp() {
return timestamp(Schedulers.parallel());
}
代码示例来源:origin: reactor/reactor-core
Mono<Tuple2<Long, String>> scenario_aMonoCanBeTimestamped(){
return Mono.just("test")
.timestamp();
}
代码示例来源:origin: com.aol.cyclops/cyclops-reactor
/**
* @param scheduler
* @return
* @see reactor.core.publisher.Mono#timestamp(reactor.core.scheduler.TimedScheduler)
*/
public final Mono<Tuple2<Long, T>> timestamp(TimedScheduler scheduler) {
return boxed.timestamp(scheduler);
}
代码示例来源:origin: com.aol.cyclops/cyclops-reactor
/**
* @return
* @see reactor.core.publisher.Mono#timestamp()
*/
public final Mono<Tuple2<Long, T>> timestamp() {
return boxed.timestamp();
}
/**
代码示例来源:origin: io.projectreactor/reactor-core
/**
* If this {@link Mono} is valued, emit a {@link reactor.util.function.Tuple2} pair of
* T1 the current clock time in millis (as a {@link Long} measured by the
* {@link Schedulers#parallel() parallel} Scheduler) and T2 the emitted data (as a {@code T}).
*
* <p>
* <img class="marble" src="doc-files/marbles/timestampForMono.svg" alt="">
*
* @return a timestamped {@link Mono}
*/
public final Mono<Tuple2<Long, T>> timestamp() {
return timestamp(Schedulers.parallel());
}
内容来源于网络,如有侵权,请联系作者删除!