public abstract class InMemoryMetricRepository<M extends Metric> extends java.lang.Object implements MetricRepository<M>
Constructor and Description |
---|
InMemoryMetricRepository() |
Modifier and Type | Method and Description |
---|---|
long |
count() |
protected abstract M |
create(java.lang.String name) |
void |
delete(java.lang.Iterable<? extends M> metrics) |
void |
delete(M metric) |
void |
delete(java.lang.String name) |
void |
deleteAll() |
boolean |
exists(java.lang.String s) |
java.util.List<M> |
findAll() |
java.util.List<M> |
findAll(java.lang.Iterable<java.lang.String> keys) |
M |
findOne(java.lang.String name) |
protected M |
getOrCreate(java.lang.String name) |
<S extends M> |
save(java.lang.Iterable<S> metrics) |
<S extends M> |
save(S metric) |
public <S extends M> S save(S metric)
public <S extends M> java.lang.Iterable<S> save(java.lang.Iterable<S> metrics)
public void delete(java.lang.String name)
public void delete(M metric)
public void delete(java.lang.Iterable<? extends M> metrics)
public M findOne(java.lang.String name)
public boolean exists(java.lang.String s)
public java.util.List<M> findAll()
public java.util.List<M> findAll(java.lang.Iterable<java.lang.String> keys)
public long count()
public void deleteAll()
protected M getOrCreate(java.lang.String name)
protected abstract M create(java.lang.String name)