Skip to content

Commit

Permalink
Fix javadoc syntax for JDK8's javadoc engine
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrille-leclerc committed May 13, 2015
1 parent bfb8125 commit 93e5728
Show file tree
Hide file tree
Showing 25 changed files with 105 additions and 115 deletions.
20 changes: 10 additions & 10 deletions src/main/java/org/jmxtrans/embedded/EmbeddedJmxTrans.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,29 @@
import java.util.concurrent.atomic.AtomicBoolean;

/**
* <p/>
*
* <strong>JMX Queries</strong>
* <p/>
*
* If the JMX query returns several mbeans (thanks to '*' or '?' wildcards),
* then the configured attributes are collected on all the returned mbeans.
* <p/>
* <p/>
*
*
* <strong>Output Writers</strong>
* <p/>
*
* {@linkplain OutputWriter}s can be defined at the query level or globally at the {@link EmbeddedJmxTrans} level.
* The {@linkplain OutputWriter}s that are effective for a {@linkplain Query} are accessible
* via {@link Query#getEffectiveOutputWriters()}
* <p/>
* <p/>
*
*
* <strong>Collected Metrics / Query Results</strong>
* <p/>
*
* Default behavior is to store the query results at the query level (see {@linkplain Query#queryResults}) to resolve the
* effective {@linkplain OutputWriter}s at result export time ({@linkplain org.jmxtrans.embedded.Query#getEffectiveOutputWriters()}).
* <br/>
*
* The drawback is to limit the benefits of batching result
* to a backend (see {@link org.jmxtrans.embedded.Query#exportCollectedMetrics()}) and the size limit of the results list to prevent
* {@linkplain OutOfMemoryError} in case of export slowness.
* <p/>
*
* An optimization would be, if only one {@linkplain OutputWriter} is defined in the whole {@linkplain EmbeddedJmxTrans}, to
* replace all the query-local result queues by one global result-queue.
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jmxtrans/embedded/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void collectMetrics() {
/**
* Export the collected metrics to the {@linkplain OutputWriter}s associated with this {@linkplain Query}
* (see {@link #getEffectiveOutputWriters()}).
* <p/>
*
* Metrics are batched according to {@link EmbeddedJmxTrans#getExportBatchSize()}
*
* @return the number of exported {@linkplain QueryResult}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jmxtrans/embedded/QueryAttribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/**
* Describe a JMX MBean attribute to collect and hold the attribute collection logic.
* <p/>
*
* Collected values are sent to a {@linkplain java.util.concurrent.BlockingQueue}
* for later export to the target monitoring systems
* (see {@link #collectMetrics(javax.management.ObjectName, Object, long, java.util.Queue)}).
Expand All @@ -57,7 +57,7 @@ public class QueryAttribute {
private String name;
/**
* Used to build the name of the {@link QueryResult} that will be exported.
* <p/>
*
* <code>null</code> if not defined in the configuration. The {@link #name} is then used to build to {@linkplain QueryResult}
*
* @see org.jmxtrans.embedded.QueryResult#getName()
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/jmxtrans/embedded/ResultNameStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@

/**
* Build a {@linkplain QueryResult#name} from a collected metric ({@linkplain QueryAttribute}, {@linkplain Query}).
* <p/>
*
* Build name must be escaped to be compatible with all {@linkplain org.jmxtrans.embedded.output.OutputWriter}.
* The approach is to escape non alpha-numeric chars.
* <p/>
*
* Expressions support '#' based keywords (e.g. <code>#hostname#</code>) and with '%' based variables mapped to objectname properties.
* <p/>
* Supported '#' based 'functions':
*
* <table>
* <caption>Supported '#' based 'functions'</caption>
* <tr>
* <th>Function</th>
* <th>Description</th>
Expand Down Expand Up @@ -259,8 +259,8 @@ protected String resolveExpression(String expression, ObjectName exactObjectName
}

/**
* Transforms an {@linkplain ObjectName} into a plain {@linkplain String} only composed of (a->Z, A-Z, '_').
* <p/>
* Transforms an {@linkplain ObjectName} into a plain {@linkplain String} only composed of (a-z, A-Z, '_').
*
* '_' is the escape char for not compliant chars.
*/
protected String escapeObjectName(ObjectName objectName) {
Expand All @@ -283,7 +283,7 @@ protected String escapeObjectName(ObjectName objectName) {
}

/**
* Escape all non a->z,A->Z, 0->9 and '-' with a '_'.
* Escape all non a-z,A-Z, 0-9 and '-' with a '_'.
*
* @param str the string to escape
* @param result the {@linkplain StringBuilder} in which the escaped string is appended
Expand All @@ -293,9 +293,9 @@ private void appendEscapedNonAlphaNumericChars(String str, StringBuilder result)
}

/**
* Escape all non a->z,A->Z, 0->9 and '-' with a '_'.
* <p/>
* '.' is escaped with a '_' if {@code escapeDot} is <code>true</code>.
* Escape all non a-z,A-Z, 0-9 and '-' with a '_'.
*
* '.' is escaped with a '_' if {@code escapeDot} is {$code true}.
*
* @param str the string to escape
* @param escapeDot indicates whether '.' should be escaped into '_' or not.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void stop() throws Exception {

/**
* Convert value of this setting to a Java <b>int</b>.
* <p/>
*
* If the setting is not found or is not an int, an exception is thrown.
*
* @param name name of the setting / property
Expand All @@ -89,7 +89,7 @@ protected int getIntSetting(String name) throws IllegalArgumentException {

/**
* Convert value of this setting to a Java <b>int</b>.
* <p/>
*
* If the property is not found, the <code>defaultValue</code> is returned. If the property is not an int, an exception is thrown.
*
* @param name name of the property
Expand All @@ -113,7 +113,7 @@ protected int getIntSetting(String name, int defaultValue) throws IllegalArgumen

/**
* Convert value of this setting to a Java <b>long</b>.
* <p/>
*
* If the property is not found, the <code>defaultValue</code> is returned. If the property is not a long, an exception is thrown.
*
* @param name name of the property
Expand All @@ -137,7 +137,7 @@ protected long getLongSetting(String name, long defaultValue) throws IllegalArgu

/**
* Convert value of this setting to a Java <b>boolean</b> (via {@link Boolean#parseBoolean(String)}).
* <p/>
*
* If the property is not found, the <code>defaultValue</code> is returned.
*
* @param name name of the property
Expand All @@ -157,7 +157,7 @@ protected boolean getBooleanSetting(String name, boolean defaultValue) {

/**
* Convert value of this setting to a Java <b>int</b>.
* <p/>
*
* If the setting is not found, an exception is thrown.
*
* @param name name of the property
Expand All @@ -173,7 +173,7 @@ protected String getStringSetting(String name) throws IllegalArgumentException {

/**
* Return the value of the given property.
* <p/>
*
* If the property is not found, the <code>defaultValue</code> is returned.
*
* @param name name of the property
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jmxtrans/embedded/output/ConsoleWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@

/**
* Output results to <code>stdout</code>.
* <p/>
*
* Settings:
* <ul>
* <li>"enabled": flag to enable/disable the writer. Optional, default value: <code>true</code>.</li>
* <li>"enabled": flag to enable/disable the writer. Optional, default value: {$code true}.</li>
* </ul>
* <p/>
*
* Output: Graphite's <a href="http://graphite.readthedocs.org/en/0.9.10/feeding-carbon.html#the-plaintext-protocol">
* Carbon Plan Text protocol</a>
* <pre>
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/org/jmxtrans/embedded/output/CopperEggWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@
import java.lang.management.ManagementFactory;

/**
* <a href="https://copperegg.com//">CopperEgg Metrics</a> implementation of the {@linkplain org.jmxtrans.embedded.output.OutputWriter}.
* <p/>
* This implementation uses v2 of the CopperEgg API <a href="http://dev.copperegg.com/">
* <p/>
* <a href="https://copperegg.com/">CopperEgg Metrics</a> implementation of the {@linkplain org.jmxtrans.embedded.output.OutputWriter}.
*
* This implementation uses v2 of the <a href="http://dev.copperegg.com/">CopperEgg API</a>
*
* Settings:
* <ul>
* <li>"{@code url}": CopperEgg API server URL.
* Optional, default value: {@value #DEFAULT_COPPEREGG_API_URL}.</li>
* Optional, default value: {@link #DEFAULT_COPPEREGG_API_URL}.</li>
* <li>"{@code user}": CopperEgg user. Mandatory</li>
* <li>"{@code token}": CopperEgg APIKEY. Mandatory</li>
* <li>"{@code coppereggApiTimeoutInMillis}": read timeout of the calls to CopperEgg HTTP API.
* Optional, default value: {@value #DEFAULT_COPPEREGG_API_TIMEOUT_IN_MILLIS}.</li>
* <li>"{@code enabled}": flag to enable/disable the writer. Optional, default value: <code>true</code>.</li>
* <li>"{@code source}": CopperEgg . Optional, default value: {@value #DEFAULT_SOURCE} (the hostname of the server).</li>
* Optional, default value: {@link #DEFAULT_COPPEREGG_API_TIMEOUT_IN_MILLIS}.</li>
* <li>"{@code enabled}": flag to enable/disable the writer. Optional, default value: {$code true}.</li>
* <li>"{@code source}": CopperEgg . Optional, default value: {@link #DEFAULT_SOURCE} (the hostname of the server).</li>
* </ul>
* LibratoWriter.java author:
* @author <a href="mailto:cleclerc@cloudbees.com">Cyrille Le Clerc</a>
Expand Down Expand Up @@ -161,7 +161,7 @@ public class CopperEggWriter extends AbstractOutputWriter implements OutputWrite
private String source;

/**
* Load settings<p/>
* Load settings
*/
@Override
public void start() {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/jmxtrans/embedded/output/CsvWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
* output writer configuration because this aggregates all of the different
* attributes returned by the query into a single line in a csv file, using the
* {@link org.jmxtrans.embedded.QueryResult#getName()} as the value of the
* header.<p/>
* header.
*
* The query can contain multiple MBeans by pattern matched ObjectName
* <p/>
*
* Example query configuration:
* <code><pre>
* <pre><code>
* "queries": [
* {
* "outputWriters": [
Expand All @@ -48,7 +48,7 @@
* ]
* }
*]
* </pre></code>
* </code></pre>
*
* See <a href="https://github.com/jmxtrans/embedded-jmxtrans/wiki/Configuration">embedded-jmxtrans configuration</a> for more details.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@

/**
* <a href="http://graphite.readthedocs.org/">Graphite</a> implementation of the {@linkplain OutputWriter}.
* <p/>
*
* This implementation uses <a href="http://graphite.readthedocs.org/en/0.9.10/feeding-carbon.html#the-plaintext-protocol">
* Carbon Plan Text protocol</a> over HTTP.
*
* Read <a href="https://answers.launchpad.net/graphite/+question/213436">this thread</a> in order to implement a HTTP
* listener in front of Carbon backend.
* <p/>
*
* Settings:
* <ul>
* <li>"url": complete url of the Graphite proxy server. Mandatory</li>
Expand All @@ -68,11 +69,6 @@ public class GraphiteHttpWriter extends AbstractOutputWriter implements OutputWr

private URL graphiteHttpUrl;

/**
* Load settings, initialize the {@link org.apache.commons.httpclient .HttpClient.HttpClient} client and test the connection to the graphite server.
* <p/>
* a {@link Logger#warn(String)} message is emitted if the connection to the graphite server fails.
*/
@Override
public void start() {
String url = getStringSetting(SETTING_URL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
import org.jmxtrans.embedded.EmbeddedJmxTransException;
import org.jmxtrans.embedded.QueryResult;
import org.jmxtrans.embedded.util.jmx.JmxUtils2;
import org.jmxtrans.embedded.util.net.HostAndPort;
import org.jmxtrans.embedded.util.net.SocketOutputStream;
import org.jmxtrans.embedded.util.net.SocketWriter;
Expand All @@ -37,26 +36,24 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.management.ObjectName;
import java.lang.management.ManagementFactory;
import java.nio.ByteBuffer;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
* <a href="http://graphite.readthedocs.org/">Graphite</a> implementation of the {@linkplain OutputWriter}.
* <p/>
*
* This implementation uses <a href="http://graphite.readthedocs.org/en/0.9.10/feeding-carbon.html#the-pickle-protocol">
* Carbon Pickle protocol</a> over TCP/IP.
* <p/>
*
* Settings:
* <ul>
* <li>"host": hostname or ip address of the Graphite server. Mandatory</li>
* <li>"port": listen port for the TCP Plain Text Protocol of the Graphite server.
* Optional, default value: {@value #DEFAULT_GRAPHITE_SERVER_PORT}.</li>
* <li>"namePrefix": prefix append to the metrics name.
* Optional, default value: {@value #DEFAULT_NAME_PREFIX}.</li>
* <li>"enabled": flag to enable/disable the writer. Optional, default value: <code>true</code>.</li>
* <li>"enabled": flag to enable/disable the writer. Optional, default value: {$code true}.</li>
* <li>"graphite.socketConnectTimeoutInMillis": timeout for the socketConnect in millis.
* Optional, default value {@link SocketOutputStreamPoolFactory#DEFAULT_SOCKET_CONNECT_TIMEOUT_IN_MILLIS}</li>
* </ul>
Expand All @@ -78,7 +75,7 @@ public class GraphitePickleWriter extends AbstractOutputWriter implements Output

/**
* Load settings, initialize the {@link SocketWriter} pool and test the connection to the graphite server.
* <p/>
*
* a {@link Logger#warn(String)} message is emitted if the connection to the graphite server fails.
*/
@Override
Expand Down
11 changes: 4 additions & 7 deletions src/main/java/org/jmxtrans/embedded/output/GraphiteWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,30 @@
import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
import org.jmxtrans.embedded.QueryResult;
import org.jmxtrans.embedded.util.jmx.JmxUtils2;
import org.jmxtrans.embedded.util.net.HostAndPort;
import org.jmxtrans.embedded.util.net.SocketWriter;
import org.jmxtrans.embedded.util.pool.SocketWriterPoolFactory;
import org.jmxtrans.embedded.util.pool.UDPSocketWriterPoolFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.management.ObjectName;
import java.lang.management.ManagementFactory;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeUnit;

/**
* <a href="http://graphite.readthedocs.org/">Graphite</a> implementation of the {@linkplain OutputWriter}.
* <p/>
*
* This implementation uses <a href="http://graphite.readthedocs.org/en/0.9.10/feeding-carbon.html#the-plaintext-protocol">
* Carbon Plan Text protocol</a> over TCP/IP.
* <p/>
*
* Settings:
* <ul>
* <li>"host": hostname or ip address of the Graphite server. Mandatory</li>
* <li>"port": listen port for the TCP Plain Text Protocol of the Graphite server.
* Optional, default value: {@value #DEFAULT_GRAPHITE_SERVER_PORT}.</li>
* <li>"namePrefix": prefix append to the metrics name.
* Optional, default value: {@value #DEFAULT_NAME_PREFIX}.</li>
* <li>"enabled": flag to enable/disable the writer. Optional, default value: <code>true</code>.</li>
* <li>"enabled": flag to enable/disable the writer. Optional, default value: {$code true}.</li>
* <li>"graphite.socketConnectTimeoutInMillis": timeout for the socketConnect in millis.
* Optional, default value: {@link SocketWriterPoolFactory#DEFAULT_SOCKET_CONNECT_TIMEOUT_IN_MILLIS}
* </li>
Expand Down Expand Up @@ -83,7 +80,7 @@ public class GraphiteWriter extends AbstractOutputWriter implements OutputWriter

/**
* Load settings, initialize the {@link SocketWriter} pool and test the connection to the graphite server.
* <p/>
*
* a {@link Logger#warn(String)} message is emitted if the connection to the graphite server fails.
*/
@Override
Expand Down
Loading

0 comments on commit 93e5728

Please sign in to comment.