fix comments
This commit is contained in:
parent
ebdfe3991f
commit
24526f2b9d
|
|
@ -11,22 +11,21 @@ import org.apache.logging.log4j.LogManager;
|
|||
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}
|
||||
*/
|
||||
|
|
@ -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.
|
||||
* @throws Exception The Exception happen in {@link #onWork(Object)}
|
||||
|
|
@ -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.
|
||||
* @throws Exception Don't handle the exception, throw it.
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import akka.actor.ActorRef;
|
|||
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> {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ import com.lmax.disruptor.EventHandler;
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
|||
* 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> {
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
* It choose {@link WorkerRef} nearly random, by round-robin.
|
||||
*
|
||||
* @author pengys5
|
||||
* @since feature3.0
|
||||
* @since v3.0-2017
|
||||
*/
|
||||
public class RollingSelector implements WorkerSelector<WorkerRef> {
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||
* 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> {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue