reactor.util.annotation.Nullable类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(348)

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

Nullable介绍

暂无

代码示例

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

@Override
@Nullable
public Consumer<? super Throwable> onErrorCall() {
  return onErrorCall;
}

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

@Override
@Nullable
public Runnable onCancelCall() {
  return onCancelCall;
}

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

/**
 * Complete with the given value.
 * <p>Calling this method multiple times or after the other
 * terminating methods has no effect (the value is purely ignored). Calling this method with
 * a {@code null} value will be silently accepted as a call to
 * {@link #success()} by standard implementations.
 *
 * @param value the value to complete with
 */
void success(@Nullable T value);

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.CANCELLED) {
    return true;
  }
  return null;
}

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.ACTUAL) {
    return main;
  }
  return null;
}

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

@Override
@Nullable
public T get() {
  return value;
}

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

@Nullable
@Override
public Subscription getSubscription() {
  return null;
}

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

private AssemblySnapshot(boolean checkpointed, @Nullable String description, Supplier<String> assemblyInformationSupplier) {
  this.checkpointed = checkpointed;
  this.description = description;
  this.assemblyInformationSupplier = assemblyInformationSupplier;
}

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

@Override
@Nullable
public Object call() throws Exception {
  return null; /* Scalar optimizations on empty */
}

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

@Override
@Nullable
public Object block(Duration m) {
  return null;
}

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

@Override
@Nullable
public T poll() {
  int i = index;
  T[] a = array;
  if (i != a.length) {
    T t = Objects.requireNonNull(a[i], "Array returned null value");
    index = i + 1;
    return t;
  }
  return null;
}

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

@Override
  @Nullable
  public Object scanUnsafe(Scannable.Attr key) {
    if (key == Scannable.Attr.PREFETCH) return getPrefetch();
    if (key == Scannable.Attr.PARENT) return source;
    return null;
  }
}

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.PREFETCH) return getPrefetch();
  if (key == Attr.PARENT) return source;
  return null;
}

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.TERMINATED) return done;
  if (key == Attr.PARENT) return s;
  return super.scanUnsafe(key);
}

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.ACTUAL) {
    return main;
  }
  return super.scanUnsafe(key);
}

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

@Override
  @Nullable
  public Object scanUnsafe(Attr key) {
    if (key == Attr.TERMINATED || key == Attr.CANCELLED) return terminado;
    return InnerProducer.super.scanUnsafe(key);
  }
}

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

@Override
  @Nullable
  public Object scanUnsafe(Attr key) {
    if (key == Attr.PARENT) return s;
    if (key == Attr.TERMINATED) return done;
    return InnerOperator.super.scanUnsafe(key);
  }
}

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.PARENT) return s;
  if (key == Attr.REQUESTED_FROM_DOWNSTREAM) return requested;
  if (key == Attr.TERMINATED) return done;
  if (key == Attr.CANCELLED) return cancelled;
  if (key == Attr.BUFFERED) return value != null ? 1 : 0;
  if (key == Attr.ERROR) return error;
  if (key == Attr.PREFETCH) return Integer.MAX_VALUE;
  return InnerOperator.super.scanUnsafe(key);
}

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

@Override
@Nullable
public Object scanUnsafe(Attr key) {
  if (key == Attr.TERMINATED) return done;
  if (key == Attr.PARENT) return s;
  return InnerOperator.super.scanUnsafe(key);
}

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

@Override
@Nullable
public R poll() {
  SourceAndArray e = queue.poll();
  if (e == null) {
    return null;
  }
  R r = combiner.apply(e.array);
  e.source.requestOne();
  return r;
}

相关文章

Nullable类方法