Fix JavaDoc errors introduced in Timings v1

This commit is contained in:
Literallie 2016-01-21 17:30:05 -06:00 committed by Zach Brown
parent e0cb11b8c6
commit 5faccece77
1 changed files with 36 additions and 41 deletions

View File

@ -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>
Date: Fri, 8 Jan 2016 23:12:28 -0600
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
new file mode 100644
index 0000000..2ac1237
index 0000000..4d990b1
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -0,0 +1,72 @@
@ -302,8 +302,8 @@ index 0000000..2ac1237
+ public void startTiming();
+
+ /**
+ * Stops timing and records the data. Propagates the data up to group handlers.
+ * <p/>
+ * <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
+ *
+ * Will automatically be called when this Timing is used with try-with-resources
+ */
+ public void stopTiming();
@ -316,9 +316,9 @@ index 0000000..2ac1237
+ public void startTimingIfSync();
+
+ /**
+ * Stops timing and records the data. Propagates the data up to group handlers.
+ * <p/>
+ * Will automatically be called when this Timing is used with try-with-resources
+ * <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>
+ *
+ * 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
new file mode 100644
index 0000000..6ad0ca6
index 0000000..b62e428
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingData.java
@@ -0,0 +1,105 @@
@ -377,8 +377,8 @@ index 0000000..6ad0ca6
+import static co.aikar.util.JSONUtil.toArray;
+
+/**
+ * Lightweight object for tracking timing data
+ * <p/>
+ * <p>Lightweight object for tracking timing data</p>
+ *
+ * This is broken out to reduce memory usage
+ */
+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
new file mode 100644
index 0000000..6084afe
index 0000000..623dda4
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
@@ -0,0 +1,102 @@
@ -1035,8 +1035,8 @@ index 0000000..6084afe
+import java.util.Map;
+
+/**
+ * Used as a basis for fast HashMap key comparisons for the Timing Map.
+ * <p/>
+ * <p>Used as a basis for fast HashMap key comparisons for the Timing Map.</p>
+ *
+ * This class uses interned strings giving us the ability to do an identity check instead of equals() on the strings
+ */
+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
new file mode 100644
index 0000000..e51e232
index 0000000..0f7be03
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -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
+ * start/stop methods called directly, as the children will call it for you.
+ * <p/>
+ * Parent Timers are used to group multiple subsections togethers and get a summary of them combined
+ * <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.</p>
+ *
+ * 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
+ *
+ * @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/>
+ * <p>Sets whether or not the Spigot Timings system should be enabled</p>
+ *
+ * Calling this will reset timing data.
+ *
+ * @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/>
+ * When Verbose is disabled, high-frequency timings will not be available
+ * <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>
+ *
+ * @return Enabled or not
+ */
@ -1267,8 +1267,8 @@ index 0000000..e51e232
+ }
+
+ /**
+ * Gets the interval between Timing History report generation.
+ * <p/>
+ * <p>Gets the interval between Timing History report generation.</p>
+ *
+ * Defaults to 5 minutes (6000 ticks)
+ *
+ * @return Interval in ticks
@ -1278,9 +1278,9 @@ index 0000000..e51e232
+ }
+
+ /**
+ * Sets the interval between Timing History report generations.
+ * <p/>
+ * Defaults to 5 minutes (6000 ticks)
+ * <p>Sets the interval between Timing History report generations.</p>
+ *
+ * <p>Defaults to 5 minutes (6000 ticks)</p>
+ *
+ * This will recheck your history length, so lowering this value will lower your
+ * 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.
+ *
+ * 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) {
+ 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
new file mode 100644
index 0000000..d27aa9b
index 0000000..67c39df
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
@@ -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/>
+ * <p>Due to access restrictions, we need a helper method to get a Command TimingHandler with String group</p>
+ *
+ * Plugins should never call this
+ *
+ * @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
new file mode 100644
index 0000000..7de04fb
index 0000000..8d0f269
--- /dev/null
+++ 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
+ *
@ -2282,11 +2282,8 @@ index 0000000..7de04fb
+import com.google.common.base.Function;
+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.
+ *
+ * .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.
+ *
+ * @param <K> Key
+ * @param <V> Value
+ */
+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
+ * @param backingMap
+ * @param loader
+ * @param loader The loader
+ */
+ public LoadingIntMap(Function<Integer, V> loader) {
+ this.loader = loader;