From 10a73b7ef7910fae0010ea7e06c6ed303a90dc29 Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 24 May 2019 18:54:33 +0100 Subject: Send tick monitoring messages async --- .../lucko/spark/common/command/modules/TickMonitoringModule.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spark-common/src/main/java/me/lucko/spark/common/command') diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/TickMonitoringModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/TickMonitoringModule.java index 75d5d36..da26dea 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/TickMonitoringModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/TickMonitoringModule.java @@ -20,6 +20,7 @@ package me.lucko.spark.common.command.modules; +import me.lucko.spark.common.SparkPlatform; import me.lucko.spark.common.command.Command; import me.lucko.spark.common.command.CommandModule; import me.lucko.spark.common.command.CommandResponseHandler; @@ -68,7 +69,7 @@ public class TickMonitoringModule implements CommandModule { threshold = 100; } - this.activeTickMonitor = new ReportingTickMonitor(resp, this.tickCounter, threshold, !arguments.boolFlag("without-gc")); + this.activeTickMonitor = new ReportingTickMonitor(platform, resp, this.tickCounter, threshold, !arguments.boolFlag("without-gc")); this.tickCounter.addTickTask(this.activeTickMonitor); } else { close(); @@ -83,8 +84,8 @@ public class TickMonitoringModule implements CommandModule { private class ReportingTickMonitor extends TickMonitor { private final CommandResponseHandler resp; - ReportingTickMonitor(CommandResponseHandler resp, TickCounter tickCounter, int percentageChangeThreshold, boolean monitorGc) { - super(tickCounter, percentageChangeThreshold, monitorGc); + ReportingTickMonitor(SparkPlatform platform, CommandResponseHandler resp, TickCounter tickCounter, int percentageChangeThreshold, boolean monitorGc) { + super(platform, tickCounter, percentageChangeThreshold, monitorGc); this.resp = resp; } -- cgit