io.reactivex.Single.timeout0()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(114)

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

Single.timeout0介绍

暂无

代码示例

代码示例来源:origin: ReactiveX/RxJava

/**
 * Signals a TimeoutException if the current Single doesn't signal a success value within the
 * specified timeout window.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} signals the TimeoutException on the {@link Scheduler} you specify.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @param scheduler the target scheduler where the timeout is awaited and the TimeoutException
 *                  signalled
 * @return the new Single instance
 * @since 2.0
 */
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> timeout(long timeout, TimeUnit unit, Scheduler scheduler) {
  return timeout0(timeout, unit, scheduler, null);
}

代码示例来源:origin: ReactiveX/RxJava

/**
 * Signals a TimeoutException if the current Single doesn't signal a success value within the
 * specified timeout window.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} signals the TimeoutException on the {@code computation} {@link Scheduler}.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @return the new Single instance
 * @since 2.0
 */
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public final Single<T> timeout(long timeout, TimeUnit unit) {
  return timeout0(timeout, unit, Schedulers.computation(), null);
}

代码示例来源:origin: redisson/redisson

/**
 * Signals a TimeoutException if the current Single doesn't signal a success value within the
 * specified timeout window.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} signals the TimeoutException on the {@link Scheduler} you specify.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @param scheduler the target scheduler where the timeout is awaited and the TimeoutException
 *                  signalled
 * @return the new Single instance
 * @since 2.0
 */
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> timeout(long timeout, TimeUnit unit, Scheduler scheduler) {
  return timeout0(timeout, unit, scheduler, null);
}

代码示例来源:origin: redisson/redisson

/**
 * Signals a TimeoutException if the current Single doesn't signal a success value within the
 * specified timeout window.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} signals the TimeoutException on the {@code computation} {@link Scheduler}.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @return the new Single instance
 * @since 2.0
 */
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public final Single<T> timeout(long timeout, TimeUnit unit) {
  return timeout0(timeout, unit, Schedulers.computation(), null);
}

代码示例来源:origin: ReactiveX/RxJava

/**
 * Runs the current Single and if it doesn't signal within the specified timeout window, it is
 * disposed and the other SingleSource subscribed to.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} subscribes to the other SingleSource on the {@link Scheduler} you specify.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @param scheduler the scheduler where the timeout is awaited and the subscription to other happens
 * @param other the other SingleSource that gets subscribed to if the current Single times out
 * @return the new Single instance
 * @since 2.0
 */
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> timeout(long timeout, TimeUnit unit, Scheduler scheduler, SingleSource<? extends T> other) {
  ObjectHelper.requireNonNull(other, "other is null");
  return timeout0(timeout, unit, scheduler, other);
}

代码示例来源:origin: redisson/redisson

/**
 * Runs the current Single and if it doesn't signal within the specified timeout window, it is
 * cancelled and the other SingleSource subscribed to.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} subscribes to the other SingleSource on the {@link Scheduler} you specify.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @param scheduler the scheduler where the timeout is awaited and the subscription to other happens
 * @param other the other SingleSource that gets subscribed to if the current Single times out
 * @return the new Single instance
 * @since 2.0
 */
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> timeout(long timeout, TimeUnit unit, Scheduler scheduler, SingleSource<? extends T> other) {
  ObjectHelper.requireNonNull(other, "other is null");
  return timeout0(timeout, unit, scheduler, other);
}

代码示例来源:origin: ReactiveX/RxJava

/**
 * Runs the current Single and if it doesn't signal within the specified timeout window, it is
 * disposed and the other SingleSource subscribed to.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} subscribes to the other SingleSource on
 *  the {@code computation} {@link Scheduler}.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @param other the other SingleSource that gets subscribed to if the current Single times out
 * @return the new Single instance
 * @throws NullPointerException
 *             if other is null, or
 *             if unit is null, or
 *             if scheduler is null
 * @since 2.0
 */
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public final Single<T> timeout(long timeout, TimeUnit unit, SingleSource<? extends T> other) {
  ObjectHelper.requireNonNull(other, "other is null");
  return timeout0(timeout, unit, Schedulers.computation(), other);
}

代码示例来源:origin: redisson/redisson

/**
 * Runs the current Single and if it doesn't signal within the specified timeout window, it is
 * cancelled and the other SingleSource subscribed to.
 * <dl>
 *  <dt><b>Scheduler:</b></dt>
 *  <dd>{@code timeout} subscribes to the other SingleSource on
 *  the {@code computation} {@link Scheduler}.</dd>
 * </dl>
 * @param timeout the timeout amount
 * @param unit the time unit
 * @param other the other SingleSource that gets subscribed to if the current Single times out
 * @return the new Single instance
 * @throws NullPointerException
 *             if other is null, or
 *             if unit is null, or
 *             if scheduler is null
 * @since 2.0
 */
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public final Single<T> timeout(long timeout, TimeUnit unit, SingleSource<? extends T> other) {
  ObjectHelper.requireNonNull(other, "other is null");
  return timeout0(timeout, unit, Schedulers.computation(), other);
}

相关文章

微信公众号

最新文章

更多