Class InMemoryHttpTraceRepository
- java.lang.Object
- org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository
- All Implemented Interfaces:
HttpTraceRepository
public class InMemoryHttpTraceRepository extends Object implements HttpTraceRepository
In-memory implementation ofHttpTraceRepository
.- Since:
- 2.0.0
Constructor Summary
Constructors Constructor Description InMemoryHttpTraceRepository()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(HttpTrace trace)
Adds a trace to the repository.List<HttpTrace>
findAll()
Find allHttpTrace
objects contained in the repository.void
setCapacity(int capacity)
Set the capacity of the in-memory repository.void
setReverse(boolean reverse)
Flag to say that the repository lists traces in reverse order.
Constructor Detail
InMemoryHttpTraceRepository
public InMemoryHttpTraceRepository()
Method Detail
setReverse
public void setReverse(boolean reverse)
Flag to say that the repository lists traces in reverse order.- Parameters:
reverse
- flag value (default true)
setCapacity
public void setCapacity(int capacity)
Set the capacity of the in-memory repository.- Parameters:
capacity
- the capacity
findAll
public List<HttpTrace> findAll()
Description copied from interface:HttpTraceRepository
Find allHttpTrace
objects contained in the repository.- Specified by:
findAll
in interfaceHttpTraceRepository
- Returns:
- the results
add
public void add(HttpTrace trace)
Description copied from interface:HttpTraceRepository
Adds a trace to the repository.- Specified by:
add
in interfaceHttpTraceRepository
- Parameters:
trace
- the trace to add