com.oath.cyclops.async.adapters.Queue.ensureOpen()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(107)

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

Queue.ensureOpen介绍

暂无

代码示例

代码示例来源:origin: aol/cyclops

public T poll(final long time, final TimeUnit unit) throws QueueTimeoutException {
  return this.ensureOpen(time, unit);
}

代码示例来源:origin: aol/cyclops

public T get() {
  return ensureOpen(this.timeout, this.timeUnit);
}

代码示例来源:origin: aol/cyclops

public ReactiveSeq<Collection<T>> streamBatchNoTimeout(final Continueable s, final Function<Supplier<T>, Supplier<Collection<T>>> batcher) {
  this.sub = s;
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStreamBatch(batcher.apply(() -> ensureOpen(this.timeout, this.timeUnit)), s));
}

代码示例来源:origin: aol/cyclops

public ReactiveSeq<Collection<T>> streamBatch(final Continueable s,
    final Function<BiFunction<Long, TimeUnit, T>, Supplier<Collection<T>>> batcher) {
  this.sub = s;
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStreamBatch(batcher.apply((timeout, timeUnit) -> ensureOpen(timeout, timeUnit)), s));
}
public ReactiveSeq<Seq<T>> streamGroupedByTime(long time, TimeUnit t){

代码示例来源:origin: aol/cyclops

public ReactiveSeq<CompletableFuture<T>> streamControlFutures(final Continueable s, final Function<Supplier<T>, CompletableFuture<T>> batcher) {
  this.sub = s;
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStreamFutures(() -> batcher.apply(() -> ensureOpen(this.timeout, this.timeUnit)), s));
}

代码示例来源:origin: aol/cyclops

public ReactiveSeq<T> streamControl(final Continueable s, final Function<Supplier<T>, Supplier<T>> batcher) {
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStream(batcher.apply(() -> ensureOpen(this.timeout, this.timeUnit)), s));
}

代码示例来源:origin: com.oath.cyclops/cyclops

public T get() {
  return ensureOpen(this.timeout, this.timeUnit);
}

代码示例来源:origin: com.oath.cyclops/cyclops

public T poll(final long time, final TimeUnit unit) throws QueueTimeoutException {
  return this.ensureOpen(time, unit);
}

代码示例来源:origin: com.oath.cyclops/cyclops

public ReactiveSeq<CompletableFuture<T>> streamControlFutures(final Continueable s, final Function<Supplier<T>, CompletableFuture<T>> batcher) {
  this.sub = s;
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStreamFutures(() -> batcher.apply(() -> ensureOpen(this.timeout, this.timeUnit)), s));
}

代码示例来源:origin: com.oath.cyclops/cyclops

public ReactiveSeq<Collection<T>> streamBatchNoTimeout(final Continueable s, final Function<Supplier<T>, Supplier<Collection<T>>> batcher) {
  this.sub = s;
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStreamBatch(batcher.apply(() -> ensureOpen(this.timeout, this.timeUnit)), s));
}

代码示例来源:origin: com.oath.cyclops/cyclops

public ReactiveSeq<Collection<T>> streamBatch(final Continueable s,
    final Function<BiFunction<Long, TimeUnit, T>, Supplier<Collection<T>>> batcher) {
  this.sub = s;
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStreamBatch(batcher.apply((timeout, timeUnit) -> ensureOpen(timeout, timeUnit)), s));
}
public ReactiveSeq<Seq<T>> streamGroupedByTime(long time, TimeUnit t){

代码示例来源:origin: com.oath.cyclops/cyclops

public ReactiveSeq<T> streamControl(final Continueable s, final Function<Supplier<T>, Supplier<T>> batcher) {
  listeningStreams.incrementAndGet(); //assumes all Streams that ever connected, remain connected
  return ReactiveSeq.fromStream(closingStream(batcher.apply(() -> ensureOpen(this.timeout, this.timeUnit)), s));
}

相关文章