Implements an instant (no delay) for use with {@link Mono#repeatWhenEmpty(Function)}

@return an instant (no delay) {@link Publisher}
351206
public static Function<Flux<Long>, Publisher<?>> instant() {
        return iterations -> iterations
            .flatMap(iteration -> Mono
                .just(0L)
                .doOnSubscribe(logDelay(Duration.ZERO)), 1);
    }
1217281
public <T> SimpleReactStream<T> fromPublisher(final Publisher<? extends T> publisher) {
        Objects.requireNonNull(publisher);
        Publisher<T> narrowed = (Publisher<T>)publisher;
        return from(Spouts.from(narrowed));
    }
688724
public long set(ReadablePartial partial, long instant) {
        for (int i = 0, isize = partial.size(); i < isize; i++) {
            instant = partial.getFieldType(i).getField(this).set(instant, partial.getValue(i));
        }
        return instant;
    }
1028672
@Nonnull
  @ReturnsMutableCopy
  public static HasInputStream once (@Nonnull final ISupplier <? extends InputStream> aISP)
  {
    return new HasInputStream (aISP, false);
  }
1081969
public static <T> T convertPublisher(Object object, Class<T> publisherType) {
        Objects.requireNonNull(object, "Invalid argument [object]: " + object);
        Objects.requireNonNull(object, "Invalid argument [publisherType]: " + publisherType);
        if (object instanceof CompletableFuture) {
            @SuppressWarnings("unchecked") Publisher<T> futurePublisher = (Publisher<T>) Publishers.fromCompletableFuture(() -> ((CompletableFuture) object));
            return ConversionService.SHARED.convert(futurePublisher, publisherType)
                    .orElseThrow(() -> new IllegalArgumentException("Unsupported Reactive type: " + object.getClass()));
        } else {
            return ConversionService.SHARED.convert(object, publisherType)
                    .orElseThrow(() -> new IllegalArgumentException("Unsupported Reactive type: " + object.getClass()));
        }
    }
635896
public static <T> Publisher<T> fromCompletableFuture(Supplier<CompletableFuture<T>> futureSupplier) {
        return new CompletableFuturePublisher<>(futureSupplier);
    }
1201416
static <T> TableIterator<T> empty() {
        return new TableIterator<>(
                () -> CompletableFuture.completedFuture(null),
                ignored -> CompletableFuture.completedFuture(null),
                new ArrayDeque<>(),
                ForkJoinPool.commonPool());
    }
208821
@Override
    public Instant plus(long amountToAdd, TemporalUnit unit) {
        if (unit instanceof ChronoUnit) {
            switch ((ChronoUnit) unit) {
                case NANOS: return plusNanos(amountToAdd);
                case MICROS: return plus(amountToAdd / 1000000, (amountToAdd % 1000000) * 1000);
                case MILLIS: return plusMillis(amountToAdd);
                case SECONDS: return plusSeconds(amountToAdd);
                case MINUTES: return plusSeconds(Jdk8Methods.safeMultiply(amountToAdd, SECONDS_PER_MINUTE));
                case HOURS: return plusSeconds(Jdk8Methods.safeMultiply(amountToAdd, SECONDS_PER_HOUR));
                case HALF_DAYS: return plusSeconds(Jdk8Methods.safeMultiply(amountToAdd, SECONDS_PER_DAY / 2));
                case DAYS: return plusSeconds(Jdk8Methods.safeMultiply(amountToAdd, SECONDS_PER_DAY));
            }
            throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit);
        }
        return unit.addTo(this, amountToAdd);
    }
962175
function (fn) {
    if (fn.length === 1) {
      fn = _.wrap(fn, function(func, evt, callback) {
        func(evt);
        callback(null);
      });
    }

    this.publisher = fn;

    return this;
  }
1313219
public <T> Iterator<T> iterator( Publisher<T> pub, int batchSize ) {
        if ( batchSize > KxReactiveStreams.MAX_BATCH_SIZE ) {
            throw new RuntimeException("batch size exceeds max of "+ KxReactiveStreams.MAX_BATCH_SIZE);
        }
        KxSubscriber<T> subs = new KxSubscriber<T>(batchSize);
        pub.subscribe(subs);

        return subs;
    }
1229704
public static Instant toInstant(Timestamp sqlTimestamp) {
        return Instant.ofEpochSecond(sqlTimestamp.getTime() / 1000, sqlTimestamp.getNanos());
    }
1070588
public boolean becomePublisher() {
        if (publisherThreadID.get() != -1) {
            return false;
        }
        publisherThreadID.set(Thread.currentThread().getId());
        return true;
    }
1181548
@javax.annotation.Nonnull
  public com.simiacryptus.util.StreamNanoHTTPD init() throws IOException {
    com.simiacryptus.util.StreamNanoHTTPD.this.start(30000);
    new Thread(() -> {
      try {
        Thread.sleep(100);
        if(null != gatewayUri) Desktop.getDesktop().browse(gatewayUri);
      } catch (@javax.annotation.Nonnull final Exception e) {
        e.printStackTrace();
      }
    }).start();
    return this;
  }
248853
ServerMember update(Status status, Instant time) {
    if (this.status != status) {
      this.status = Assert.notNull(status, "status");
      if (time.isAfter(updated)) {
        this.updated = Assert.notNull(time, "time");
      }
      if (statusChangeListeners != null) {
        statusChangeListeners.accept(status);
      }
    }
    return this;
  }
246070
public static long toMicros(Instant instant) {
        return TimeUnit.SECONDS.toMicros(instant.getEpochSecond()) + TimeUnit.NANOSECONDS.toMicros(instant.getNano());
    }
755054
public <T> FutureStream<T> fromPublisher(final Publisher<? extends T> publisher) {
        Objects.requireNonNull(publisher);
        Publisher<T> narrowed = (Publisher<T>)publisher;
        return fromStream(Spouts.from(narrowed));
    }
118671
public ApiFuture<String> publish(String message) {
    ByteString data = ByteString.copyFromUtf8(message);
    PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(data).build();
    ApiFuture<String> messageIdFuture = publisher.publish(pubsubMessage);
    ApiFutures.addCallback(
        messageIdFuture,
        new ApiFutureCallback<String>() {
          public void onSuccess(String messageId) {
            System.out.println("published with message id: " + messageId);
          }

          public void onFailure(Throwable t) {
            System.out.println("failed to publish: " + t);
          }
        },
        Executors.newSingleThreadExecutor());
    return messageIdFuture;
  }