Package io.github.resilience4j.consumer
Class CircularEventConsumer<T>
- java.lang.Object
-
- io.github.resilience4j.consumer.CircularEventConsumer<T>
-
- All Implemented Interfaces:
io.github.resilience4j.core.EventConsumer<T>
public class CircularEventConsumer<T> extends java.lang.Object implements io.github.resilience4j.core.EventConsumer<T>A consumer which stores CircuitBreakerEvents in a circular buffer with a fixed capacity.
-
-
Constructor Summary
Constructors Constructor Description CircularEventConsumer(int capacity)Creates anCircuitBreakerEventConsumerwith the given (fixed) capacity
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumeEvent(T event)io.vavr.collection.List<T>getBufferedEvents()Returns a list containing all of the buffered events.
-
-
-
Method Detail
-
consumeEvent
public void consumeEvent(T event)
- Specified by:
consumeEventin interfaceio.github.resilience4j.core.EventConsumer<T>
-
getBufferedEvents
public io.vavr.collection.List<T> getBufferedEvents()
Returns a list containing all of the buffered events.- Returns:
- a list containing all of the buffered events.
-
-