X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fdata%2Ffilter%2FTimeCounterFilter.java;h=1864b1c6856917eeb923c527d440cde0cb7c6d08;hb=c548332c486d812bfce23a9121219bf86ecc5588;hp=a5282003a862b8cbe428c89d19b3c828deb71c3e;hpb=09f8bd2297dc864e24baa67c65be97104e00c320;p=sonitus.git diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/TimeCounterFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/TimeCounterFilter.java index a528200..1864b1c 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/TimeCounterFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/TimeCounterFilter.java @@ -23,6 +23,8 @@ import java.util.concurrent.atomic.AtomicLong; import net.pterodactylus.sonitus.data.Filter; import net.pterodactylus.sonitus.data.Metadata; +import com.google.common.eventbus.EventBus; + /** * {@link Filter} implementation that uses the number of bytes that have been * {@link #process(byte[]) processed} together with the {@link Metadata} to @@ -42,24 +44,28 @@ public class TimeCounterFilter extends DummyFilter { * Creates a new time counter filter that automatically resets the counter when * the metadata is {@link #metadataUpdated(Metadata) updated}. * + * @param eventBus + * The event bus * @param name * The name of the filter */ - public TimeCounterFilter(String name) { - this(name, true); + public TimeCounterFilter(EventBus eventBus, String name) { + this(eventBus, name, true); } /** * Creates a new time counter filter. * + * @param eventBus + * The event bus * @param name * The name of the filter * @param resetOnMetadataUpdate * {@code true} if the counter should automatically be reset if the metadata * is updated, {@code false} otherwise */ - public TimeCounterFilter(String name, boolean resetOnMetadataUpdate) { - super(name); + public TimeCounterFilter(EventBus eventBus, String name, boolean resetOnMetadataUpdate) { + super(eventBus, name); this.resetOnMetadataUpdate = resetOnMetadataUpdate; }