polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [2/6] zest-java git commit: Minor edits in Metrics API/SPI
Date Mon, 26 Sep 2016 16:14:50 GMT
Minor edits in Metrics API/SPI

Removing redundant modifiers, fixing javadoc typos ...


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/ee501b4f
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/ee501b4f
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/ee501b4f

Branch: refs/heads/develop
Commit: ee501b4fcfe9f93c8ab6a573804b97209dd1df4e
Parents: 91cc592
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon Sep 19 21:27:04 2016 -0700
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon Sep 19 21:27:04 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/zest/api/metrics/MetricsHealthCheck.java | 2 +-
 .../java/org/apache/zest/api/metrics/MetricsHistogram.java   | 3 +--
 .../java/org/apache/zest/api/metrics/MetricsProvider.java    | 6 +++---
 .../main/java/org/apache/zest/api/metrics/MetricsTimer.java  | 2 +-
 .../main/java/org/apache/zest/spi/metrics/DefaultMetric.java | 8 +-------
 5 files changed, 7 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/ee501b4f/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheck.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheck.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheck.java
index b81b0fb..4c97e66 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheck.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheck.java
@@ -28,7 +28,7 @@ public interface MetricsHealthCheck extends Metric
     Result check()
         throws Exception;
 
-    public final class Result
+    final class Result
     {
         private final boolean healthy;
         private final String message;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/ee501b4f/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogram.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogram.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogram.java
index ed4f1c0..6fa7a5d 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogram.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogram.java
@@ -23,8 +23,7 @@ package org.apache.zest.api.metrics;
 /**
  * A metric which calculates the distribution of a value.
  *
- * @see <a href="http://www.johndcook.com/standard_deviation.html">Accurately computing
running
- *      variance</a>
+ * @see <a href="http://www.johndcook.com/standard_deviation.html">Accurately computing
running variance</a>
  */
 public interface MetricsHistogram extends Metric
 {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/ee501b4f/core/api/src/main/java/org/apache/zest/api/metrics/MetricsProvider.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsProvider.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsProvider.java
index 9754d42..be898a6 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsProvider.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsProvider.java
@@ -23,7 +23,7 @@ package org.apache.zest.api.metrics;
 /**
  * Metrics Provider SPI.
  * <p>
- * The Zest Runtime will automatically ook for a service that implements the MetricsProvider
interdace
+ * The Zest Runtime will automatically look for a service that implements the MetricsProvider
interface
  * and use it for internal Runtime metrics, such as the UnitOfWork measuring the time from
creation to close.
  * </p>
  * <p>
@@ -31,7 +31,7 @@ package org.apache.zest.api.metrics;
  * will use the same MetricsProvider.
  * </p>
  * <p>
- * Note that the usual visibitlity rules applies, so you might have more than one MetricsProvider
server,
+ * Note that the usual visibility rules applies, so you might have more than one MetricsProvider
server,
  * perhaps per layer.
  * </p>
  */
@@ -40,7 +40,7 @@ public interface MetricsProvider
     /**
      * Creates a new factory instance.
      *
-     * The instanctiation is done by providing a Metric type, which is one of
+     * The instantiation is done by providing a Metric type, which is one of
      * <ul>
      * <li>{@link MetricsCounter}</li>
      * <li>{@link MetricsGauge}</li>

http://git-wip-us.apache.org/repos/asf/zest-java/blob/ee501b4f/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimer.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimer.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimer.java
index 84fe7be..a302dbe 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimer.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimer.java
@@ -33,7 +33,7 @@ public interface MetricsTimer extends Metric
     /**
      * Timer Metrics Context.
      */
-    public interface Context
+    interface Context
     {
         /**
          * Stop the Timer Metrics.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/ee501b4f/core/spi/src/main/java/org/apache/zest/spi/metrics/DefaultMetric.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/zest/spi/metrics/DefaultMetric.java b/core/spi/src/main/java/org/apache/zest/spi/metrics/DefaultMetric.java
index 280186c..f2968a6 100644
--- a/core/spi/src/main/java/org/apache/zest/spi/metrics/DefaultMetric.java
+++ b/core/spi/src/main/java/org/apache/zest/spi/metrics/DefaultMetric.java
@@ -58,13 +58,7 @@ public final class DefaultMetric
     @Override
     public Context start()
     {
-        return new Context()
-        {
-            @Override
-            public void stop()
-            {
-            }
-        };
+        return () -> {};
     }
 
     @Override


Mime
View raw message