提交 24526f2b 编写于 作者: P pengys5

fix comments

上级 ebdfe399
...@@ -11,22 +11,21 @@ import org.apache.logging.log4j.LogManager; ...@@ -11,22 +11,21 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
/** /**
* The <code>AbstractClusterWorker</code> should be implemented by any class whose instances * The <code>AbstractClusterWorker</code> implementations represent workers,
* are intended to provide receive remote message that message will transfer across different jvm * which receive remote messages.
* which running in same server or another address server.
* <p> * <p>
* Usually the implemented class used to receive persistence data or aggregation the metric. * Usually, the implementations are doing persistent, or aggregate works.
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public abstract class AbstractClusterWorker extends AbstractWorker { public abstract class AbstractClusterWorker extends AbstractWorker {
/** /**
* Constructs a <code>AbstractClusterWorker</code> with the worker role and context. * Construct an <code>AbstractClusterWorker</code> with the worker role and context.
* *
* @param role The responsibility of worker in cluster, more than one workers can have * @param role If multi-workers are for load balance, they should be more likely called worker instance.
* same responsibility which use to provide load balancing ability. * Meaning, each worker have multi instances.
* @param clusterContext See {@link ClusterWorkerContext} * @param clusterContext See {@link ClusterWorkerContext}
* @param selfContext See {@link LocalWorkerContext} * @param selfContext See {@link LocalWorkerContext}
*/ */
...@@ -35,7 +34,7 @@ public abstract class AbstractClusterWorker extends AbstractWorker { ...@@ -35,7 +34,7 @@ public abstract class AbstractClusterWorker extends AbstractWorker {
} }
/** /**
* Receive message * This method use for message producer to call for send message.
* *
* @param message The persistence data or metric data. * @param message The persistence data or metric data.
* @throws Exception The Exception happen in {@link #onWork(Object)} * @throws Exception The Exception happen in {@link #onWork(Object)}
...@@ -45,7 +44,7 @@ public abstract class AbstractClusterWorker extends AbstractWorker { ...@@ -45,7 +44,7 @@ public abstract class AbstractClusterWorker extends AbstractWorker {
} }
/** /**
* The data process logic in this method. * This method use for message receiver to analyse message.
* *
* @param message Cast the message object to a expect subclass. * @param message Cast the message object to a expect subclass.
* @throws Exception Don't handle the exception, throw it. * @throws Exception Don't handle the exception, throw it.
......
...@@ -4,12 +4,12 @@ import akka.actor.ActorRef; ...@@ -4,12 +4,12 @@ import akka.actor.ActorRef;
import akka.actor.Props; import akka.actor.Props;
/** /**
* The <code>AbstractClusterWorkerProvider</code> should be implemented by any class whose instances * The <code>AbstractClusterWorkerProvider</code> implementations represent providers,
* are intended to provide create the class instance whose implemented {@link AbstractClusterWorker}. * which create instance of cluster workers whose implemented {@link AbstractClusterWorker}.
* <p> * <p>
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public abstract class AbstractClusterWorkerProvider<T extends AbstractClusterWorker> extends AbstractWorkerProvider<T> { public abstract class AbstractClusterWorkerProvider<T extends AbstractClusterWorker> extends AbstractWorkerProvider<T> {
......
...@@ -6,16 +6,16 @@ import com.lmax.disruptor.EventHandler; ...@@ -6,16 +6,16 @@ import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.RingBuffer; import com.lmax.disruptor.RingBuffer;
/** /**
* The <code>AbstractLocalAsyncWorker</code> should be implemented by any class whose instances * The <code>AbstractLocalAsyncWorker</code> implementations represent workers,
* are intended to provide receive asynchronous message in same jvm. * which receive local asynchronous message.
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public abstract class AbstractLocalAsyncWorker extends AbstractLocalWorker { public abstract class AbstractLocalAsyncWorker extends AbstractLocalWorker {
/** /**
* Constructs a <code>AbstractLocalAsyncWorker</code> with the worker role and context. * Construct an <code>AbstractLocalAsyncWorker</code> with the worker role and context.
* *
* @param role The responsibility of worker in cluster, more than one workers can have * @param role The responsibility of worker in cluster, more than one workers can have
* same responsibility which use to provide load balancing ability. * same responsibility which use to provide load balancing ability.
......
package com.a.eye.skywalking.collector.actor.selector; package com.a.eye.skywalking.collector.actor.selector;
/** /**
* The <code>AbstractHashMessage</code> should be implemented by any class whose instances * The <code>AbstractHashMessage</code> implementations represent aggregate message,
* are intended to provide send message with {@link HashCodeSelector}. * which use to aggregate metric.
* Make the message aggregator's worker selector use of {@link HashCodeSelector}.
* <p> * <p>
* Usually the implemented class used to persistence data to database
* or aggregation the metric.
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public abstract class AbstractHashMessage { public abstract class AbstractHashMessage {
private int hashCode; private int hashCode;
......
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
* message to same {@link WorkerRef}. Usually, use to database operate which avoid dirty data. * message to same {@link WorkerRef}. Usually, use to database operate which avoid dirty data.
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public class HashCodeSelector implements WorkerSelector<WorkerRef> { public class HashCodeSelector implements WorkerSelector<WorkerRef> {
......
...@@ -10,7 +10,7 @@ import java.util.List; ...@@ -10,7 +10,7 @@ import java.util.List;
* It choose {@link WorkerRef} nearly random, by round-robin. * It choose {@link WorkerRef} nearly random, by round-robin.
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public class RollingSelector implements WorkerSelector<WorkerRef> { public class RollingSelector implements WorkerSelector<WorkerRef> {
......
...@@ -12,7 +12,7 @@ import java.util.List; ...@@ -12,7 +12,7 @@ import java.util.List;
* Actually, the <code>WorkerRef</code> is designed to provide a routing ability in the collector cluster * Actually, the <code>WorkerRef</code> is designed to provide a routing ability in the collector cluster
* *
* @author pengys5 * @author pengys5
* @since feature3.0 * @since v3.0-2017
*/ */
public interface WorkerSelector<T extends WorkerRef> { public interface WorkerSelector<T extends WorkerRef> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册