
org.kairosdb.metrics4j.internal.TestingCollectorContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics4j Show documentation
Show all versions of metrics4j Show documentation
Java library for reporting metrics to any timeseries database.
The newest version!
package org.kairosdb.metrics4j.internal;
import java.time.Instant;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
This class is only used when metrics4j is used within a unit test.
*/
public class TestingCollectorContext implements CollectorContext
{
private final CollectorCollection m_collection;
public TestingCollectorContext(CollectorCollection collection)
{
m_collection = collection;
}
@Override
public CollectorCollection getCollection()
{
return m_collection;
}
@Override
public Map getTags()
{
return Collections.emptyMap();
}
@Override
public List getSinkQueueList()
{
return Collections.emptyList();
}
@Override
public void reportMetrics(Instant now)
{
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy