Support javadoc generation.

This commit is contained in:
wusheng 2017-10-12 21:43:10 +08:00
parent d47aa797c9
commit 5c56d41aa2
3 changed files with 34 additions and 12 deletions

View File

@ -45,10 +45,10 @@ public class DataCarrier<T> {
/**
* set a new IDataPartitioner.
* It will cover the current one or default one.(Default is {@link SimpleRollingPartitioner)}
* It will cover the current one or default one.(Default is {@link SimpleRollingPartitioner}
*
* @param dataPartitioner
* @return
* @param dataPartitioner implementation
* @return {@link DataCarrier} instance itself
*/
public DataCarrier setPartitioner(IDataPartitioner<T> dataPartitioner) {
this.channels.setPartitioner(dataPartitioner);
@ -57,9 +57,10 @@ public class DataCarrier<T> {
/**
* override the strategy at runtime.
* Notice, {@link Channels<T>} will override several channels one by one.
* Notice, {@link Channels} will override several channels one by one.
*
* @param strategy
* @param strategy {@link BufferStrategy}
* @return {@link DataCarrier} instance itself
*/
public DataCarrier setBufferStrategy(BufferStrategy strategy) {
this.channels.setStrategy(strategy);
@ -67,9 +68,9 @@ public class DataCarrier<T> {
}
/**
* produce data to buffer, using the givven {@link BufferStrategy}.
* produce data to buffer, using the given {@link BufferStrategy}.
*
* @param data
* @param data inserted into the channel.
* @return false means produce data failure. The data will not be consumed.
*/
public boolean produce(T data) {
@ -84,10 +85,11 @@ public class DataCarrier<T> {
/**
* set consumers to this Carrier.
* consumer begin to run when {@link DataCarrier<T>#produce(T)} begin to work.
* consumer begin to run when {@link DataCarrier<T>{@link #produce(Object)}} begin to work.
*
* @param consumerClass class of consumer
* @param num number of consumer threads
* @return {@link DataCarrier} instance itself
*/
public DataCarrier consume(Class<? extends IConsumer<T>> consumerClass, int num) {
if (consumerPool != null) {
@ -100,11 +102,11 @@ public class DataCarrier<T> {
/**
* set consumers to this Carrier.
* consumer begin to run when {@link DataCarrier<T>#produce(T)} begin to work.
* consumer begin to run when produce begin to work.
*
* @param consumer single instance of consumer, all consumer threads will all use this instance.
* @param num number of consumer threads
* @return
* @return {@link DataCarrier} instance itself
*/
public DataCarrier consume(IConsumer<T> consumer, int num) {
if (consumerPool != null) {

View File

@ -66,7 +66,7 @@ public class Channels<T> {
* override the strategy at runtime. Notice, this will override several channels one by one. So, when running
* setStrategy, each channel may use different BufferStrategy
*
* @param strategy
* @param strategy {@link BufferStrategy}
*/
public void setStrategy(BufferStrategy strategy) {
for (Buffer<T> buffer : bufferChannels) {
@ -77,7 +77,7 @@ public class Channels<T> {
/**
* get channelSize
*
* @return
* @return channel size
*/
public int getChannelSize() {
return this.bufferChannels.length;

20
pom.xml
View File

@ -266,6 +266,26 @@
</executions>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<aggregate>true</aggregate>
<charset>${project.build.sourceEncoding}</charset>
<encoding>${project.build.sourceEncoding}</encoding>
<docencoding>${project.build.sourceEncoding}</docencoding>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>