Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
peng-yongsheng committed Apr 12, 2017
1 parent ebdfe39 commit 24526f2
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@
import org.apache.logging.log4j.Logger;

/**
* The <code>AbstractClusterWorker</code> should be implemented by any class whose instances
* are intended to provide receive remote message that message will transfer across different jvm
* which running in same server or another address server.
* The <code>AbstractClusterWorker</code> implementations represent workers,
* which receive remote messages.
* <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
* @since feature3.0
* @since v3.0-2017
*/
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
* same responsibility which use to provide load balancing ability.
* @param role If multi-workers are for load balance, they should be more likely called worker instance.
* Meaning, each worker have multi instances.
* @param clusterContext See {@link ClusterWorkerContext}
* @param selfContext See {@link LocalWorkerContext}
*/
Expand All @@ -35,7 +34,7 @@ protected AbstractClusterWorker(Role role, ClusterWorkerContext clusterContext,
}

/**
* Receive message
* This method use for message producer to call for send message.
*
* @param message The persistence data or metric data.
* @throws Exception The Exception happen in {@link #onWork(Object)}
Expand All @@ -45,7 +44,7 @@ final public void allocateJob(Object message) throws Exception {
}

/**
* 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.
* @throws Exception Don't handle the exception, throw it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import akka.actor.Props;

/**
* The <code>AbstractClusterWorkerProvider</code> should be implemented by any class whose instances
* are intended to provide create the class instance whose implemented {@link AbstractClusterWorker}.
* The <code>AbstractClusterWorkerProvider</code> implementations represent providers,
* which create instance of cluster workers whose implemented {@link AbstractClusterWorker}.
* <p>
*
* @author pengys5
* @since feature3.0
* @since v3.0-2017
*/
public abstract class AbstractClusterWorkerProvider<T extends AbstractClusterWorker> extends AbstractWorkerProvider<T> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
import com.lmax.disruptor.RingBuffer;

/**
* The <code>AbstractLocalAsyncWorker</code> should be implemented by any class whose instances
* are intended to provide receive asynchronous message in same jvm.
* The <code>AbstractLocalAsyncWorker</code> implementations represent workers,
* which receive local asynchronous message.
*
* @author pengys5
* @since feature3.0
* @since v3.0-2017
*/
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
* same responsibility which use to provide load balancing ability.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.a.eye.skywalking.collector.actor.selector;

/**
* The <code>AbstractHashMessage</code> should be implemented by any class whose instances
* are intended to provide send message with {@link HashCodeSelector}.
* The <code>AbstractHashMessage</code> implementations represent aggregate message,
* which use to aggregate metric.
* Make the message aggregator's worker selector use of {@link HashCodeSelector}.
* <p>
* Usually the implemented class used to persistence data to database
* or aggregation the metric.
*
* @author pengys5
* @since feature3.0
* @since v3.0-2017
*/
public abstract class AbstractHashMessage {
private int hashCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* message to same {@link WorkerRef}. Usually, use to database operate which avoid dirty data.
*
* @author pengys5
* @since feature3.0
* @since v3.0-2017
*/
public class HashCodeSelector implements WorkerSelector<WorkerRef> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* It choose {@link WorkerRef} nearly random, by round-robin.
*
* @author pengys5
* @since feature3.0
* @since v3.0-2017
*/
public class RollingSelector implements WorkerSelector<WorkerRef> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Actually, the <code>WorkerRef</code> is designed to provide a routing ability in the collector cluster
*
* @author pengys5
* @since feature3.0
* @since v3.0-2017
*/
public interface WorkerSelector<T extends WorkerRef> {

Expand Down

0 comments on commit 24526f2

Please sign in to comment.