Package io.fluxcapacitor.common
Class Backlog<T>
java.lang.Object
io.fluxcapacitor.common.Backlog<T>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBacklog(ThrowingFunction<List<T>, CompletableFuture<?>> consumer) protectedBacklog(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize) protectedBacklog(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize, ErrorHandler<List<T>> errorHandler) -
Method Summary
Modifier and TypeMethodDescriptionadd(Collection<? extends T> values) final CompletableFuture<Void> protected voidcompleteResults(long untilPosition, Throwable e) static <T> Backlog<T> forAsyncConsumer(ThrowingFunction<List<T>, CompletableFuture<?>> consumer) static <T> Backlog<T> forAsyncConsumer(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize) static <T> Backlog<T> forAsyncConsumer(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize, ErrorHandler<List<T>> errorHandler) static <T> Backlog<T> forConsumer(ThrowingConsumer<List<T>> consumer) static <T> Backlog<T> forConsumer(ThrowingConsumer<List<T>> consumer, int maxBatchSize) static <T> Backlog<T> forConsumer(ThrowingConsumer<List<T>> consumer, int maxBatchSize, ErrorHandler<List<T>> errorHandler) registerMonitor(Consumer<List<T>> monitor) voidshutDown()
-
Constructor Details
-
Backlog
-
Backlog
-
Backlog
protected Backlog(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize, ErrorHandler<List<T>> errorHandler)
-
-
Method Details
-
forConsumer
-
forConsumer
-
forConsumer
public static <T> Backlog<T> forConsumer(ThrowingConsumer<List<T>> consumer, int maxBatchSize, ErrorHandler<List<T>> errorHandler) -
forAsyncConsumer
public static <T> Backlog<T> forAsyncConsumer(ThrowingFunction<List<T>, CompletableFuture<?>> consumer) -
forAsyncConsumer
public static <T> Backlog<T> forAsyncConsumer(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize) -
forAsyncConsumer
public static <T> Backlog<T> forAsyncConsumer(ThrowingFunction<List<T>, CompletableFuture<?>> consumer, int maxBatchSize, ErrorHandler<List<T>> errorHandler) -
add
-
add
-
completeResults
-
registerMonitor
- Specified by:
registerMonitorin interfaceMonitored<T>
-
shutDown
public void shutDown()
-