Class SimpleInMemoryRepository<T>
- java.lang.Object
- org.springframework.boot.actuate.metrics.util.SimpleInMemoryRepository<T>
- Type Parameters:
T
- the type to store
public class SimpleInMemoryRepository<T> extends Object
Repository utility that stores stuff in memory with period-separated String keys.
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SimpleInMemoryRepository.Callback<T>
Callback used to update a value.
Constructor Summary
Constructors Constructor Description SimpleInMemoryRepository()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count()
Iterable<T>
findAll()
Iterable<T>
findAllWithPrefix(String prefix)
T
findOne(String name)
protected NavigableMap<String,T>
getValues()
void
remove(String name)
void
set(String name, T value)
void
setValues(ConcurrentNavigableMap<String,T> values)
T
update(String name, SimpleInMemoryRepository.Callback<T> callback)
Constructor Detail
SimpleInMemoryRepository
public SimpleInMemoryRepository()
Method Detail
update
public T update(String name, SimpleInMemoryRepository.Callback<T> callback)
count
public long count()
findAllWithPrefix
public Iterable<T> findAllWithPrefix(String prefix)
setValues
public void setValues(ConcurrentNavigableMap<String,T> values)
getValues
protected NavigableMap<String,T> getValues()