X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Freactor%2FReaction.java;h=f7a8c2c49437c676df8d14ce3ff76b61283ee6a8;hb=4aa0a149254611a863c784069e4ca0b7ca9b9e8f;hp=0e0b3590c2d0025bb7d038babab04212597fd464;hpb=47cf51685ee61e1e2da6202436344ee58ef96f14;p=rhynodge.git diff --git a/src/main/java/net/pterodactylus/reactor/Reaction.java b/src/main/java/net/pterodactylus/reactor/Reaction.java index 0e0b359..f7a8c2c 100644 --- a/src/main/java/net/pterodactylus/reactor/Reaction.java +++ b/src/main/java/net/pterodactylus/reactor/Reaction.java @@ -42,6 +42,9 @@ public class Reaction { /** The previous state of the query. */ private S previousState; + /** The interval in which to run queries (in milliseconds). */ + private long updateInterval; + /** * Creates a new reaction. * @@ -107,4 +110,25 @@ public class Reaction { return previousState; } + /** + * Returns the update interval of this reaction. + * + * @return The update interval of this reaction (in milliseconds) + */ + public long updateInterval() { + return updateInterval; + } + + /** + * Sets the update interval of this reaction. + * + * @param updateInterval + * The update interval of this reaction (in milliseconds) + * @return This reaction + */ + public Reaction setUpdateInterval(long updateInterval) { + this.updateInterval = updateInterval; + return this; + } + }