Package cern.nxcals.api.ingestion
Interface Publisher<V>
- Type Parameters:
V- Type of value to be published. in a form ofResult.
- All Superinterfaces:
AutoCloseable,Closeable
NXCALS Ingestion API main interface. It defines methods to send data to the underlying system returning confirmation
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault ResultPublishes synchronously the given value to the NXCALS system.default CompletableFuture<Result> publishAsync(V value) Publishes asynchronously the given value to the NXCALS system.publishAsync(V value, Executor executor) Publishes asynchronously the given value to the NXCALS system.
-
Method Details
-
publish
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
Publishes asynchronously the given value to the NXCALS system. The invocation is performed using theForkJoinPool.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
Publishes asynchronously the given value to the NXCALS system. The invocation is performed using the provided executor.- Parameters:
value- the value to be publishedexecutor- the executor to perform the publication within.- Returns:
- result of the publication
-