Class InMemoryTraceRepository
- java.lang.Object
- org.springframework.boot.actuate.trace.InMemoryTraceRepository
- All Implemented Interfaces:
TraceRepository
public class InMemoryTraceRepository extends Object implements TraceRepository
In-memory implementation ofTraceRepository
.
Constructor Summary
Constructors Constructor Description InMemoryTraceRepository()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Map<String,Object> map)
Add a newTrace
object at the current time.List<Trace>
findAll()
Find allTrace
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
InMemoryTraceRepository
public InMemoryTraceRepository()
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<Trace> findAll()
Description copied from interface:TraceRepository
Find allTrace
objects contained in the repository.- Specified by:
findAll
in interfaceTraceRepository
- Returns:
- the results
add
public void add(Map<String,Object> map)
Description copied from interface:TraceRepository
Add a newTrace
object at the current time.- Specified by:
add
in interfaceTraceRepository
- Parameters:
map
- trace information