Interface Publisher<V>

Type Parameters:
V - Type of value to be published. in a form of Result.
All Superinterfaces:
AutoCloseable, Closeable

public interface Publisher<V> extends Closeable
NXCALS Ingestion API main interface. It defines methods to send data to the underlying system returning confirmation
  • Method Details

    • publish

      default Result publish(V value)
      Publishes synchronously the given value to the NXCALS system. The invocation is performed using the caller thread.
      Parameters:
      value - the value to be published
      Returns:
      result of the publication
    • publishAsync

      default CompletableFuture<Result> publishAsync(V value)
      Publishes asynchronously the given value to the NXCALS system. The invocation is performed using the ForkJoinPool.commonPool() (unless it does not support a parallelism level of at least two, in which case, a new Thread is created to run each task).
      Parameters:
      value - the value to be published
      Returns:
      result of the publication
    • publishAsync

      CompletableFuture<Result> publishAsync(V value, Executor executor)
      Publishes asynchronously the given value to the NXCALS system. The invocation is performed using the provided executor.
      Parameters:
      value - the value to be published
      executor - the executor to perform the publication within.
      Returns:
      result of the publication