Fix JavaDoc errors introduced in Timings v1
This commit is contained in:
parent
e0cb11b8c6
commit
5faccece77
@ -1,4 +1,4 @@
|
|||||||
From 32fbda75d86e0e21c17f414a6e01c1f51eb369a2 Mon Sep 17 00:00:00 2001
|
From 4f9f4ee4270ba3bf65c69559bbd1e8157f70c78e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 8 Jan 2016 23:12:28 -0600
|
Date: Fri, 8 Jan 2016 23:12:28 -0600
|
||||||
Subject: [PATCH] Timings v2
|
Subject: [PATCH] Timings v2
|
||||||
@ -263,7 +263,7 @@ index 0000000..e3da034
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..2ac1237
|
index 0000000..4d990b1
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/Timing.java
|
+++ b/src/main/java/co/aikar/timings/Timing.java
|
||||||
@@ -0,0 +1,72 @@
|
@@ -0,0 +1,72 @@
|
||||||
@ -302,8 +302,8 @@ index 0000000..2ac1237
|
|||||||
+ public void startTiming();
|
+ public void startTiming();
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Stops timing and records the data. Propagates the data up to group handlers.
|
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Will automatically be called when this Timing is used with try-with-resources
|
+ * Will automatically be called when this Timing is used with try-with-resources
|
||||||
+ */
|
+ */
|
||||||
+ public void stopTiming();
|
+ public void stopTiming();
|
||||||
@ -316,9 +316,9 @@ index 0000000..2ac1237
|
|||||||
+ public void startTimingIfSync();
|
+ public void startTimingIfSync();
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Stops timing and records the data. Propagates the data up to group handlers.
|
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Will automatically be called when this Timing is used with try-with-resources
|
+ * <p>Will automatically be called when this Timing is used with try-with-resources</p>
|
||||||
+ *
|
+ *
|
||||||
+ * But only if we are on the primary thread.
|
+ * But only if we are on the primary thread.
|
||||||
+ */
|
+ */
|
||||||
@ -341,7 +341,7 @@ index 0000000..2ac1237
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
|
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..6ad0ca6
|
index 0000000..b62e428
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/TimingData.java
|
+++ b/src/main/java/co/aikar/timings/TimingData.java
|
||||||
@@ -0,0 +1,105 @@
|
@@ -0,0 +1,105 @@
|
||||||
@ -377,8 +377,8 @@ index 0000000..6ad0ca6
|
|||||||
+import static co.aikar.util.JSONUtil.toArray;
|
+import static co.aikar.util.JSONUtil.toArray;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Lightweight object for tracking timing data
|
+ * <p>Lightweight object for tracking timing data</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * This is broken out to reduce memory usage
|
+ * This is broken out to reduce memory usage
|
||||||
+ */
|
+ */
|
||||||
+class TimingData {
|
+class TimingData {
|
||||||
@ -998,7 +998,7 @@ index 0000000..eac4e21
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..6084afe
|
index 0000000..623dda4
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
||||||
@@ -0,0 +1,102 @@
|
@@ -0,0 +1,102 @@
|
||||||
@ -1035,8 +1035,8 @@ index 0000000..6084afe
|
|||||||
+import java.util.Map;
|
+import java.util.Map;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Used as a basis for fast HashMap key comparisons for the Timing Map.
|
+ * <p>Used as a basis for fast HashMap key comparisons for the Timing Map.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * This class uses interned strings giving us the ability to do an identity check instead of equals() on the strings
|
+ * This class uses interned strings giving us the ability to do an identity check instead of equals() on the strings
|
||||||
+ */
|
+ */
|
||||||
+final class TimingIdentifier {
|
+final class TimingIdentifier {
|
||||||
@ -1106,7 +1106,7 @@ index 0000000..6084afe
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..e51e232
|
index 0000000..0f7be03
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||||
@@ -0,0 +1,273 @@
|
@@ -0,0 +1,273 @@
|
||||||
@ -1172,10 +1172,10 @@ index 0000000..e51e232
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Returns a handler that has a groupHandler timer handler. Parent timers should not have their
|
+ * <p>Returns a handler that has a groupHandler timer handler. Parent timers should not have their
|
||||||
+ * start/stop methods called directly, as the children will call it for you.
|
+ * start/stop methods called directly, as the children will call it for you.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Parent Timers are used to group multiple subsections togethers and get a summary of them combined
|
+ * Parent Timers are used to group multiple subsections together and get a summary of them combined
|
||||||
+ * Parent Handler can not be changed after first call
|
+ * Parent Handler can not be changed after first call
|
||||||
+ *
|
+ *
|
||||||
+ * @param plugin Plugin to own the Timing
|
+ * @param plugin Plugin to own the Timing
|
||||||
@ -1231,8 +1231,8 @@ index 0000000..e51e232
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Sets whether or not the Spigot Timings system should be enabled
|
+ * <p>Sets whether or not the Spigot Timings system should be enabled</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Calling this will reset timing data.
|
+ * Calling this will reset timing data.
|
||||||
+ *
|
+ *
|
||||||
+ * @param enabled Should timings be reported
|
+ * @param enabled Should timings be reported
|
||||||
@ -1243,9 +1243,9 @@ index 0000000..e51e232
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Gets whether or not the Verbose level of timings is enabled.
|
+ * <p>Sets whether or not the Timings should monitor at Verbose level.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * When Verbose is disabled, high-frequency timings will not be available
|
+ * <p>When Verbose is disabled, high-frequency timings will not be available.</p>
|
||||||
+ *
|
+ *
|
||||||
+ * @return Enabled or not
|
+ * @return Enabled or not
|
||||||
+ */
|
+ */
|
||||||
@ -1267,8 +1267,8 @@ index 0000000..e51e232
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Gets the interval between Timing History report generation.
|
+ * <p>Gets the interval between Timing History report generation.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Defaults to 5 minutes (6000 ticks)
|
+ * Defaults to 5 minutes (6000 ticks)
|
||||||
+ *
|
+ *
|
||||||
+ * @return Interval in ticks
|
+ * @return Interval in ticks
|
||||||
@ -1278,9 +1278,9 @@ index 0000000..e51e232
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Sets the interval between Timing History report generations.
|
+ * <p>Sets the interval between Timing History report generations.</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Defaults to 5 minutes (6000 ticks)
|
+ * <p>Defaults to 5 minutes (6000 ticks)</p>
|
||||||
+ *
|
+ *
|
||||||
+ * This will recheck your history length, so lowering this value will lower your
|
+ * This will recheck your history length, so lowering this value will lower your
|
||||||
+ * history length if you need more than 60 history windows.
|
+ * history length if you need more than 60 history windows.
|
||||||
@ -1347,7 +1347,7 @@ index 0000000..e51e232
|
|||||||
+ * Generates a report and sends it to the specified command sender.
|
+ * Generates a report and sends it to the specified command sender.
|
||||||
+ *
|
+ *
|
||||||
+ * If sender is null, ConsoleCommandSender will be used.
|
+ * If sender is null, ConsoleCommandSender will be used.
|
||||||
+ * @param sender
|
+ * @param sender The sender to send to, or null to use the ConsoleCommandSender
|
||||||
+ */
|
+ */
|
||||||
+ public static void generateReport(CommandSender sender) {
|
+ public static void generateReport(CommandSender sender) {
|
||||||
+ if (sender == null) {
|
+ if (sender == null) {
|
||||||
@ -1880,7 +1880,7 @@ index 0000000..dd78647
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
|
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..d27aa9b
|
index 0000000..67c39df
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
|
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||||
@@ -0,0 +1,194 @@
|
@@ -0,0 +1,194 @@
|
||||||
@ -2033,8 +2033,8 @@ index 0000000..d27aa9b
|
|||||||
+
|
+
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Due to access restrictions, we need a helper method to get a Command TimingHandler with String group
|
+ * <p>Due to access restrictions, we need a helper method to get a Command TimingHandler with String group</p>
|
||||||
+ * <p/>
|
+ *
|
||||||
+ * Plugins should never call this
|
+ * Plugins should never call this
|
||||||
+ *
|
+ *
|
||||||
+ * @param pluginName Plugin this command is associated with
|
+ * @param pluginName Plugin this command is associated with
|
||||||
@ -2266,10 +2266,10 @@ index 0000000..5fdf7c4
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
|
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..7de04fb
|
index 0000000..8d0f269
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
|
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
|
||||||
@@ -0,0 +1,68 @@
|
@@ -0,0 +1,63 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2015. Starlis LLC / dba Empire Minecraft
|
+ * Copyright (c) 2015. Starlis LLC / dba Empire Minecraft
|
||||||
+ *
|
+ *
|
||||||
@ -2282,11 +2282,8 @@ index 0000000..7de04fb
|
|||||||
+import com.google.common.base.Function;
|
+import com.google.common.base.Function;
|
||||||
+import gnu.trove.map.hash.TIntObjectHashMap;
|
+import gnu.trove.map.hash.TIntObjectHashMap;
|
||||||
+
|
+
|
||||||
+import java.lang.reflect.Constructor;
|
|
||||||
+import java.util.*;
|
|
||||||
+
|
|
||||||
+/**
|
+/**
|
||||||
+ * Allows you to pass a Loader function that when a key is accessed that doesn't exists,
|
+ * Allows you to pass a Loader function that when a key is accessed that doesn't exist,
|
||||||
+ * automatically loads the entry into the map by calling the loader Function.
|
+ * automatically loads the entry into the map by calling the loader Function.
|
||||||
+ *
|
+ *
|
||||||
+ * .get() Will only return null if the Loader can return null.
|
+ * .get() Will only return null if the Loader can return null.
|
||||||
@ -2297,7 +2294,6 @@ index 0000000..7de04fb
|
|||||||
+ *
|
+ *
|
||||||
+ * Do not wrap the backing map with Collections.synchronizedMap.
|
+ * Do not wrap the backing map with Collections.synchronizedMap.
|
||||||
+ *
|
+ *
|
||||||
+ * @param <K> Key
|
|
||||||
+ * @param <V> Value
|
+ * @param <V> Value
|
||||||
+ */
|
+ */
|
||||||
+public class LoadingIntMap<V> extends TIntObjectHashMap<V> {
|
+public class LoadingIntMap<V> extends TIntObjectHashMap<V> {
|
||||||
@ -2305,8 +2301,7 @@ index 0000000..7de04fb
|
|||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
+ * Initializes an auto loading map using specified loader and backing map
|
+ * Initializes an auto loading map using specified loader and backing map
|
||||||
+ * @param backingMap
|
+ * @param loader The loader
|
||||||
+ * @param loader
|
|
||||||
+ */
|
+ */
|
||||||
+ public LoadingIntMap(Function<Integer, V> loader) {
|
+ public LoadingIntMap(Function<Integer, V> loader) {
|
||||||
+ this.loader = loader;
|
+ this.loader = loader;
|
||||||
|
Loading…
Reference in New Issue
Block a user